From eeafc364cbd39edc794748a0f2c0626e09ee9bb5 Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Wed, 23 Mar 2016 09:26:52 -0700 Subject: Add doc target to ant build.xml Also fixed Javadoc errors. --- src/com/softsynth/math/Polynomial.java | 18 +++++++++--------- src/com/softsynth/math/PrimeFactors.java | 16 ++++++++-------- src/com/softsynth/shared/time/TimeStamp.java | 8 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src/com/softsynth') 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.
*
- * + * * @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 { } /** - * @return -1 if (this < t2), 0 if equal, or +1 + * @return -1 if (this < t2), 0 if equal, or +1 */ @Override public int compareTo(TimeStamp t2) { @@ -45,7 +45,7 @@ public class TimeStamp implements Comparable { /** * Create a new TimeStamp at a relative offset in seconds. - * + * * @param delta * @return earlier or later TimeStamp */ -- cgit v1.2.3