aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/softsynth
diff options
context:
space:
mode:
authorPhil Burk <[email protected]>2016-03-23 09:28:15 -0700
committerPhil Burk <[email protected]>2016-03-23 09:28:15 -0700
commiteb36cf83f1cca79e76c4ad44fc78077c9428790b (patch)
tree5f4bef6827f6bd9c29b1ccdf8f2a1fde5000381c /src/com/softsynth
parent431965f53739b2ed9608510781bfc7b9d3b4b0e2 (diff)
parenteeafc364cbd39edc794748a0f2c0626e09ee9bb5 (diff)
Merge pull request #28 from philburk/docs
Docs
Diffstat (limited to 'src/com/softsynth')
-rw-r--r--src/com/softsynth/math/Polynomial.java18
-rw-r--r--src/com/softsynth/math/PrimeFactors.java16
-rw-r--r--src/com/softsynth/shared/time/TimeStamp.java8
3 files changed, 21 insertions, 21 deletions
diff --git a/src/com/softsynth/math/Polynomial.java b/src/com/softsynth/math/Polynomial.java
index 8670e97..5f29f38 100644
--- a/src/com/softsynth/math/Polynomial.java
+++ b/src/com/softsynth/math/Polynomial.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,13 +23,13 @@ import java.util.Vector;
* Implement polynomial using Vector as coefficient holder. Element index is power of X, value at a
* given index is coefficient.<br>
* <br>
- *
+ *
* @author Nick Didkovsky, (C) 1997 Phil Burk and Nick Didkovsky
*/
public class Polynomial {
- private Vector terms;
+ private final Vector terms;
class DoubleHolder {
double value;
@@ -118,14 +118,14 @@ public class Polynomial {
return ((DoubleHolder) terms.elementAt(power)).get();
}
- /** @ return number of terms in this polynomial */
+ /** @return number of terms in this polynomial */
public int size() {
return terms.size();
}
/**
* Add two polynomials together
- *
+ *
* @return new Polynomial that is the sum of p1 and p2
*/
public static Polynomial plus(Polynomial p1, Polynomial p2) {
@@ -138,7 +138,7 @@ public class Polynomial {
/**
* Subtract polynomial from another. (First arg - Second arg)
- *
+ *
* @return new Polynomial p1 - p2
*/
public static Polynomial minus(Polynomial p1, Polynomial p2) {
@@ -151,7 +151,7 @@ public class Polynomial {
/**
* Multiply two Polynomials
- *
+ *
* @return new Polynomial that is the product p1 * p2
*/
@@ -167,7 +167,7 @@ public class Polynomial {
/**
* Multiply a Polynomial by a scaler
- *
+ *
* @return new Polynomial that is the product p1 * p2
*/
diff --git a/src/com/softsynth/math/PrimeFactors.java b/src/com/softsynth/math/PrimeFactors.java
index 5607951..06c0d55 100644
--- a/src/com/softsynth/math/PrimeFactors.java
+++ b/src/com/softsynth/math/PrimeFactors.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@ import java.util.ArrayList;
/**
* Tool for factoring primes and prime ratios. This class contains a static array of primes
* generated using the Sieve of Eratosthenes.
- *
+ *
* @author Phil Burk (C) 2011 Mobileer Inc
*/
public class PrimeFactors {
@@ -170,13 +170,13 @@ public class PrimeFactors {
/**
* Get prime from table.
- *
- * @warning Do not exceed getPrimeCount()-1.
- * @param i
+ *
+ *
+ * @param n Warning: Do not exceed getPrimeCount()-1.
* @return Nth prime number, the 0th prime is 2
*/
- public static int getPrime(int i) {
- return primes[i];
+ public static int getPrime(int n) {
+ return primes[n];
}
/**
diff --git a/src/com/softsynth/shared/time/TimeStamp.java b/src/com/softsynth/shared/time/TimeStamp.java
index fd054d2..6d243ed 100644
--- a/src/com/softsynth/shared/time/TimeStamp.java
+++ b/src/com/softsynth/shared/time/TimeStamp.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@ public class TimeStamp implements Comparable<TimeStamp> {
}
/**
- * @return -1 if (this < t2), 0 if equal, or +1
+ * @return -1 if (this &lt; t2), 0 if equal, or +1
*/
@Override
public int compareTo(TimeStamp t2) {
@@ -45,7 +45,7 @@ public class TimeStamp implements Comparable<TimeStamp> {
/**
* Create a new TimeStamp at a relative offset in seconds.
- *
+ *
* @param delta
* @return earlier or later TimeStamp
*/