You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2015/11/22 16:24:36 UTC
[2/6] [math] Added missing @since tags.
Added missing @since tags.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/a6b74ac5
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/a6b74ac5
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/a6b74ac5
Branch: refs/heads/field-ode
Commit: a6b74ac508a2637d254a90f012974bab8b261e27
Parents: b38ce47
Author: Phil Steitz <ph...@gmail.com>
Authored: Sun Nov 15 13:24:06 2015 -0700
Committer: Phil Steitz <ph...@gmail.com>
Committed: Sun Nov 15 13:24:06 2015 -0700
----------------------------------------------------------------------
.../java/org/apache/commons/math3/ml/neuralnet/Network.java | 1 +
.../java/org/apache/commons/math3/ml/neuralnet/Neuron.java | 3 +++
.../commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.java | 8 +++++++-
.../commons/math3/ml/neuralnet/twod/util/HitHistogram.java | 1 +
.../commons/math3/ml/neuralnet/twod/util/LocationFinder.java | 1 +
.../math3/ml/neuralnet/twod/util/MapDataVisualization.java | 1 +
.../math3/ml/neuralnet/twod/util/MapVisualization.java | 1 +
.../math3/ml/neuralnet/twod/util/QuantizationError.java | 1 +
.../math3/ml/neuralnet/twod/util/SmoothedDataHistogram.java | 1 +
.../ml/neuralnet/twod/util/TopographicErrorHistogram.java | 1 +
.../math3/ml/neuralnet/twod/util/UnifiedDistanceMatrix.java | 1 +
src/main/java/org/apache/commons/math3/util/MathArrays.java | 5 +++++
12 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/Network.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/Network.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/Network.java
index 70d8bb2..4b208a3 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/Network.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/Network.java
@@ -141,6 +141,7 @@ public class Network
* Updating one will not affect the other.
*
* @return a new instance with the same state as this instance.
+ * @since 3.6
*/
public synchronized Network copy() {
final Network copy = new Network(nextId.get(),
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/Neuron.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/Neuron.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/Neuron.java
index 300fa50..8cae3ea 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/Neuron.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/Neuron.java
@@ -72,6 +72,7 @@ public class Neuron implements Serializable {
* Updating one will not affect the other.
*
* @return a new instance with the same state as this instance.
+ * @since 3.6
*/
public synchronized Neuron copy() {
final Neuron copy = new Neuron(getIdentifier(),
@@ -173,6 +174,7 @@ public class Neuron implements Serializable {
* may be required to ensure consistency.
*
* @return the number of update attempts.
+ * @since 3.6
*/
public long getNumberOfAttemptedUpdates() {
return numberOfAttemptedUpdates.get();
@@ -187,6 +189,7 @@ public class Neuron implements Serializable {
* may be required to ensure consistency.
*
* @return the number of successful updates.
+ * @since 3.6
*/
public long getNumberOfSuccessfulUpdates() {
return numberOfSuccessfulUpdates.get();
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.java
index d1c692e..5277bc5 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/NeuronSquareMesh2D.java
@@ -67,6 +67,7 @@ public class NeuronSquareMesh2D
/**
* Horizontal (along row) direction.
+ * @since 3.6
*/
public enum HorizontalDirection {
/** Column at the right of the current column. */
@@ -78,6 +79,7 @@ public class NeuronSquareMesh2D
}
/**
* Vertical (along column) direction.
+ * @since 3.6
*/
public enum VerticalDirection {
/** Row above the current row. */
@@ -229,6 +231,7 @@ public class NeuronSquareMesh2D
* Updating one will not affect the other.
*
* @return a new instance with the same state as this instance.
+ * @since 3.6
*/
public synchronized NeuronSquareMesh2D copy() {
final long[][] idGrid = new long[numberOfRows][numberOfColumns];
@@ -245,7 +248,10 @@ public class NeuronSquareMesh2D
idGrid);
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ * @since 3.6
+ */
public Iterator<Neuron> iterator() {
return network.iterator();
}
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/HitHistogram.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/HitHistogram.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/HitHistogram.java
index 6a8eeaa..06cee98 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/HitHistogram.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/HitHistogram.java
@@ -26,6 +26,7 @@ import org.apache.commons.math3.ml.distance.DistanceMeasure;
* Computes the hit histogram.
* Each bin will contain the number of data for which the corresponding
* neuron is the best matching unit.
+ * @since 3.6
*/
public class HitHistogram implements MapDataVisualization {
/** Distance. */
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/LocationFinder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/LocationFinder.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/LocationFinder.java
index 794af18..e4ece61 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/LocationFinder.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/LocationFinder.java
@@ -25,6 +25,7 @@ import org.apache.commons.math3.exception.MathIllegalStateException;
/**
* Helper class to find the grid coordinates of a neuron.
+ * @since 3.6
*/
public class LocationFinder {
/** Identifier to location mapping. */
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapDataVisualization.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapDataVisualization.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapDataVisualization.java
index 1570e8b..71fab43 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapDataVisualization.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapDataVisualization.java
@@ -22,6 +22,7 @@ import org.apache.commons.math3.ml.neuralnet.twod.NeuronSquareMesh2D;
/**
* Interface for algorithms that compute some metrics of the projection of
* data on a 2D-map.
+ * @since 3.6
*/
public interface MapDataVisualization {
/**
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapVisualization.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapVisualization.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapVisualization.java
index a4453f5..9304d76 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapVisualization.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/MapVisualization.java
@@ -21,6 +21,7 @@ import org.apache.commons.math3.ml.neuralnet.twod.NeuronSquareMesh2D;
/**
* Interface for algorithms that compute some property of a 2D-map.
+ * @since 3.6
*/
public interface MapVisualization {
/**
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/QuantizationError.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/QuantizationError.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/QuantizationError.java
index a3a1aa2..2264478 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/QuantizationError.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/QuantizationError.java
@@ -26,6 +26,7 @@ import org.apache.commons.math3.ml.distance.DistanceMeasure;
* Computes the quantization error histogram.
* Each bin will contain the average of the distances between samples
* mapped to the corresponding unit and the weight vector of that unit.
+ * @since 3.6
*/
public class QuantizationError implements MapDataVisualization {
/** Distance. */
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/SmoothedDataHistogram.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/SmoothedDataHistogram.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/SmoothedDataHistogram.java
index a8d2622..33e4143 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/SmoothedDataHistogram.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/SmoothedDataHistogram.java
@@ -31,6 +31,7 @@ import org.apache.commons.math3.exception.NumberIsTooSmallException;
* <br>
* by Elias Pampalk, Andreas Rauber and Dieter Merkl.
* </quote>
+ * @since 3.6
*/
public class SmoothedDataHistogram implements MapDataVisualization {
/** Smoothing parameter. */
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/TopographicErrorHistogram.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/TopographicErrorHistogram.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/TopographicErrorHistogram.java
index 48dd53a..b831de8 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/TopographicErrorHistogram.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/TopographicErrorHistogram.java
@@ -28,6 +28,7 @@ import org.apache.commons.math3.util.Pair;
* Computes the topographic error histogram.
* Each bin will contain the number of data for which the first and
* second best matching units are not adjacent in the map.
+ * @since 3.6
*/
public class TopographicErrorHistogram implements MapDataVisualization {
/** Distance. */
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/UnifiedDistanceMatrix.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/UnifiedDistanceMatrix.java b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/UnifiedDistanceMatrix.java
index 0bfc06e..aee982a 100644
--- a/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/UnifiedDistanceMatrix.java
+++ b/src/main/java/org/apache/commons/math3/ml/neuralnet/twod/util/UnifiedDistanceMatrix.java
@@ -26,6 +26,7 @@ import org.apache.commons.math3.ml.distance.DistanceMeasure;
/**
* <a href="http://en.wikipedia.org/wiki/U-Matrix">U-Matrix</a>
* visualization of high-dimensional data projection.
+ * @since 3.6
*/
public class UnifiedDistanceMatrix implements MapVisualization {
/** Whether to show distance between each pair of neighbouring units. */
http://git-wip-us.apache.org/repos/asf/commons-math/blob/a6b74ac5/src/main/java/org/apache/commons/math3/util/MathArrays.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/util/MathArrays.java b/src/main/java/org/apache/commons/math3/util/MathArrays.java
index c199be5..2c9fcb3 100644
--- a/src/main/java/org/apache/commons/math3/util/MathArrays.java
+++ b/src/main/java/org/apache/commons/math3/util/MathArrays.java
@@ -249,6 +249,7 @@ public class MathArrays {
* @param v1 Cartesian coordinates of the first vector.
* @param v2 Cartesian coordinates of the second vector.
* @return the cosine of the angle between the vectors.
+ * @since 3.6
*/
public static double cosAngle(double[] v1, double[] v2) {
return linearCombination(v1, v2) / (safeNorm(v1) * safeNorm(v2));
@@ -391,6 +392,7 @@ public class MathArrays {
* @return {@code true} if the arrays have the same length.
* @throws DimensionMismatchException if the lengths differ and
* {@code abort} is {@code true}.
+ * @since 3.6
*/
public static boolean checkEqualLength(double[] a,
double[] b,
@@ -411,6 +413,7 @@ public class MathArrays {
* @param a Array.
* @param b Array.
* @throws DimensionMismatchException if the lengths differ.
+ * @since 3.6
*/
public static void checkEqualLength(double[] a,
double[] b) {
@@ -427,6 +430,7 @@ public class MathArrays {
* @return {@code true} if the arrays have the same length.
* @throws DimensionMismatchException if the lengths differ and
* {@code abort} is {@code true}.
+ * @since 3.6
*/
public static boolean checkEqualLength(int[] a,
int[] b,
@@ -447,6 +451,7 @@ public class MathArrays {
* @param a Array.
* @param b Array.
* @throws DimensionMismatchException if the lengths differ.
+ * @since 3.6
*/
public static void checkEqualLength(int[] a,
int[] b) {