IGNITE-5018 review and improve javadocs in ML module

Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7b2e3888
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7b2e3888
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7b2e3888

Branch: refs/heads/ignite-4535
Commit: 7b2e38882010776c3ea29662fa25e71da97bd946
Parents: 67d3358
Author: Oleg Ignatenko <oignate...@gridgain.com>
Authored: Wed Apr 19 17:03:40 2017 +0300
Committer: Anton Vinogradov <a...@apache.org>
Committed: Wed Apr 19 17:03:40 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/ml/math/Algebra.java | 18 +++++-----
 .../org/apache/ignite/ml/math/Constants.java    | 35 +++++++++++++-----
 .../java/org/apache/ignite/ml/math/Matrix.java  |  8 ++---
 .../org/apache/ignite/ml/math/MurmurHash.java   | 31 ++++++++--------
 .../org/apache/ignite/ml/math/ValueMapper.java  |  6 ++--
 .../decompositions/CholeskyDecomposition.java   |  2 +-
 .../math/decompositions/EigenDecomposition.java | 23 ++++++++----
 .../ml/math/decompositions/LUDecomposition.java | 16 ++++++---
 .../ignite/ml/math/functions/Functions.java     |  7 ++--
 .../functions/IntIntDoubleToVoidFunction.java   |  6 +++-
 .../ml/math/impls/matrix/CacheMatrix.java       | 19 +++++-----
 .../ml/math/impls/matrix/PivotedMatrixView.java | 38 ++++++++++----------
 .../impls/matrix/SparseDistributedMatrix.java   | 17 ++++-----
 .../storage/matrix/CacheMatrixStorage.java      | 10 +++---
 .../matrix/DenseOffHeapMatrixStorage.java       |  9 +++--
 .../storage/vector/CacheVectorStorage.java      |  8 ++---
 .../storage/vector/DelegateVectorStorage.java   | 12 +++++--
 .../storage/vector/MatrixVectorStorage.java     | 27 ++++++--------
 .../vector/SparseLocalOffHeapVectorStorage.java |  4 ++-
 .../ml/math/impls/vector/AbstractVector.java    | 16 +++++----
 .../ml/math/impls/vector/CacheVector.java       | 10 +++---
 .../ml/math/impls/vector/ConstantVector.java    |  4 +--
 .../ml/math/impls/vector/DelegatingVector.java  |  2 +-
 .../ml/math/impls/vector/MatrixVectorView.java  | 12 +++----
 .../ml/math/impls/vector/PivotedVectorView.java | 23 ++++++------
 .../ml/math/impls/vector/RandomVector.java      | 10 +++---
 .../math/impls/vector/SingleElementVector.java  |  8 ++---
 .../impls/vector/SingleElementVectorView.java   |  4 +--
 .../ml/math/impls/vector/SparseLocalVector.java |  4 +--
 .../ml/math/impls/matrix/CacheMatrixTest.java   |  4 +--
 .../math/impls/vector/AbstractVectorTest.java   |  6 ++--
 31 files changed, 224 insertions(+), 175 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/Algebra.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/math/Algebra.java 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/Algebra.java
index a31503f..b13d9fc 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/math/Algebra.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/math/Algebra.java
@@ -250,8 +250,8 @@ public class Algebra extends Constants {
      * <li>else: {@code (n * n-1 * ... * n-k+1 ) / ( 1 * 2 * ... * k)}.</li>
      * </ul>
      *
-     * @param n
-     * @param k
+     * @param n Size of set.
+     * @param k Size of subset.
      * @return Binomial coefficient.
      */
     public static double binomial(double n, long k) {
@@ -281,8 +281,8 @@ public class Algebra extends Constants {
      * <ul> <li>{@code k&lt;0}: {@code 0}. <li>{@code k==0 || k==n}: {@code 
1}. <li>{@code k==1 || k==n-1}:
      * {@code n}. <li>else: {@code (n * n-1 * ... * n-k+1 ) / ( 1 * 2 * ... * 
k )}. </ul>
      *
-     * @param n
-     * @param k
+     * @param n Size of set.
+     * @param k Size of subset.
      * @return Binomial coefficient.
      */
     public static double binomial(long n, long k) {
@@ -328,7 +328,8 @@ public class Algebra extends Constants {
      * <dl><dt>Examples: {@code 1.0 -> 1, 1.2 -> 2, 1.9 -> 2}. This
      * method is safer than using (long) Math.ceil(value), because of possible 
rounding error.</dt></dl>
      *
-     * @param val
+     * @param val Value for ceil.
+     * @return Ceil of the given value.
      */
     public static long ceil(double val) {
         return Math.round(Math.ceil(val));
@@ -428,7 +429,7 @@ public class Algebra extends Constants {
 
     /**
      * Returns {@code log(k!)}. Tries to avoid overflows. For {@code k&lt;30} 
simply looks up a table in O(1).
-     * For {@code k&gt;=30} uses stirlings approximation.
+     * For {@code k&gt;=30} uses Stirling's approximation.
      *
      * @param k must hold {@code k &gt;= 0}.
      */
@@ -549,8 +550,9 @@ public class Algebra extends Constants {
     /**
      * Gets <code>sqrt(a^2 + b^2)</code> without under/overflow.
      *
-     * @param a
-     * @param b
+     * @param a First side value.
+     * @param b Second side value.
+     * @return Hypotenuse value.
      */
     public static double hypot(double a, double b) {
         double r;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/Constants.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/math/Constants.java 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/Constants.java
index e20c139..f9b6c88 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/math/Constants.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/math/Constants.java
@@ -30,13 +30,30 @@ package org.apache.ignite.ml.math;
  * Math constants. Lifted from Apache Mahout.
  */
 public class Constants {
-    /** */ public static final double MACHEP = 1.11022302462515654042E-16;
-    /** */ public static final double MAXLOG = 7.09782712893383996732E2;
-    /** */ public static final double MINLOG = -7.451332191019412076235E2;
-    /** */ public static final double MAXGAM = 171.624376956302725;
-    /** */ public static final double SQTPI = 2.50662827463100050242E0;
-    /** */ public static final double SQRTH = 7.07106781186547524401E-1;
-    /** */ public static final double LOGPI = 1.14472988584940017414;
-    /** */ public static final double BIG = 4.503599627370496e15;
-    /** */ public static final double BIGINV = 2.22044604925031308085e-16;
+    /** Constant for {@code 2**-53}. */
+    public static final double MACHEP = 1.11022302462515654042E-16;
+
+    /** Constant for {@code log(2**1024)}. */
+    public static final double MAXLOG = 7.09782712893383996732E2;
+
+    /** Constant for {@code log(2**-1022)}. */
+    public static final double MINLOG = -7.451332191019412076235E2;
+
+    /** Constant for gamma function. */
+    public static final double MAXGAM = 171.624376956302725;
+
+    /** Constant for {@code 1/(sqrt(2*pi))}. */
+    public static final double SQTPI = 2.50662827463100050242E0;
+
+    /** Constant for {@code sqrt(2)/2}. */
+    public static final double SQRTH = 7.07106781186547524401E-1;
+
+    /** Constant for {@code log(Pi)}. */
+    public static final double LOGPI = 1.14472988584940017414;
+
+    /** Constant for big value. */
+    public static final double BIG = 4.503599627370496e15;
+
+    /** Constant for inverse of big value. */
+    public static final double BIGINV = 2.22044604925031308085e-16;
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/Matrix.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/math/Matrix.java 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/Matrix.java
index 1039484..cc858b7 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/math/Matrix.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/math/Matrix.java
@@ -474,10 +474,10 @@ public interface Matrix extends MetaAttributes, 
Externalizable, StorageOpsMetric
     /**
      * Creates new view into this matrix. Changes to the view will be 
propagated to this matrix.
      *
-     * @param rowOff
-     * @param rows
-     * @param colOff
-     * @param cols
+     * @param rowOff View offset in rows.
+     * @param rows Amount of rows in the view.
+     * @param colOff View offset in columns.
+     * @param cols Amount of columns in the view.
      * @return New view.
      * @throws CardinalityException Thrown if cardinalities mismatch.
      * @throws IndexException Thrown in case of offset is out of bound.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/MurmurHash.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/math/MurmurHash.java 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/MurmurHash.java
index 0cbcbdf..c7dd36b 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/math/MurmurHash.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/math/MurmurHash.java
@@ -41,10 +41,10 @@ public class MurmurHash {
      *
      * See also http://github.com/yonik/java_util for future updates to this 
method.
      *
-     * @param data
-     * @param off
-     * @param len
-     * @param seed
+     * @param data Data to hash.
+     * @param off Where to start munging.
+     * @param len How many bytes to process.
+     * @param seed The seed to start with.
      * @return 32 bit hash platform compatible with C++ MurmurHash3 
implementation on x86.
      */
     public static int hash3X86(byte[] data, int off, int len, int seed) {
@@ -101,7 +101,7 @@ public class MurmurHash {
      * Hashes an int.
      *
      * @param data The int to hash.
-     * @param seed The seed for the hash.
+     * @param seed The seed to start with.
      * @return The 32 bit hash of the bytes in question.
      */
     public static int hash(int data, int seed) {
@@ -119,7 +119,7 @@ public class MurmurHash {
      * Hashes bytes in an array.
      *
      * @param data The bytes to hash.
-     * @param seed The seed for the hash.
+     * @param seed The seed to start with.
      * @return The 32 bit hash of the bytes in question.
      */
     public static int hash(byte[] data, int seed) {
@@ -143,7 +143,7 @@ public class MurmurHash {
      * Hashes the bytes in a buffer from the current position to the limit.
      *
      * @param buf The bytes to hash.
-     * @param seed The seed for the hash.
+     * @param seed The seed to start with.
      * @return The 32 bit murmur hash of the bytes in the buffer.
      */
     public static int hash(ByteBuffer buf, int seed) {
@@ -185,26 +185,27 @@ public class MurmurHash {
     }
 
     /**
-     * @param data
-     * @param seed
+     * @param data The data to hash.
+     * @param seed The seed to start with.
+     * @return Hash value for given data and seed.
      */
     public static long hash64A(byte[] data, int seed) {
         return hash64A(ByteBuffer.wrap(data), seed);
     }
 
     /**
-     * @param data
-     * @param off
-     * @param len
-     * @param seed
+     * @param data The data to hash.
+     * @param off Where to start munging.
+     * @param len How many bytes to process.
+     * @param seed The seed to start with.
      */
     public static long hash64A(byte[] data, int off, int len, int seed) {
         return hash64A(ByteBuffer.wrap(data, off, len), seed);
     }
 
     /**
-     * @param buf
-     * @param seed
+     * @param buf The data to hash.
+     * @param seed The seed to start with.
      */
     public static long hash64A(ByteBuffer buf, int seed) {
         ByteOrder byteOrder = buf.order();

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/ValueMapper.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/ValueMapper.java 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/ValueMapper.java
index 2b62c0b..f0776a3 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/math/ValueMapper.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/math/ValueMapper.java
@@ -24,12 +24,14 @@ import java.io.Serializable;
  */
 public interface ValueMapper<V> extends Serializable {
     /**
-     * @param v
+     * @param v Value to map from double.
+     * @return Mapped value.
      */
     public V fromDouble(double v);
 
     /**
-     * @param v
+     * @param v Value to map to double.
+     * @return Mapped value.
      */
     public double toDouble(V v);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/CholeskyDecomposition.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/CholeskyDecomposition.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/CholeskyDecomposition.java
index bc18307..59ebbe0 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/CholeskyDecomposition.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/CholeskyDecomposition.java
@@ -138,7 +138,7 @@ public class CholeskyDecomposition extends 
DecompositionSupport {
         }
     }
 
-    /** */
+    /** {@inheritDoc} */
     @Override public void destroy() {
         if (cachedL != null)
             cachedL.destroy();

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/EigenDecomposition.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/EigenDecomposition.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/EigenDecomposition.java
index 01af989..0353bff 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/EigenDecomposition.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/EigenDecomposition.java
@@ -24,8 +24,8 @@ import org.apache.ignite.ml.math.functions.Functions;
 /**
  * This class provides EigenDecomposition of given matrix. The class is based 
on
  * class with similar name from <a href="http://mahout.apache.org/";>Apache 
Mahout</a> library.
- *
- * @see <a 
href=http://mathworld.wolfram.com/EigenDecomposition.html>MathWorld</a>
+ * <p>
+ * @see <a 
href=http://mathworld.wolfram.com/EigenDecomposition.html>MathWorld</a></p>
  */
 public class EigenDecomposition extends DecompositionSupport {
     /** Row and column dimension (square matrix). */
@@ -39,12 +39,17 @@ public class EigenDecomposition extends 
DecompositionSupport {
     /** Array for internal storage of eigenvalues. */
     private final Vector e;
 
-    /** */
+    /**
+     * @param matrix Matrix to decompose.
+     */
     public EigenDecomposition(Matrix matrix) {
         this(matrix, isSymmetric(matrix));
     }
 
-    /** */
+    /**
+     * @param matrix Matrix to decompose.
+     * @param isSymmetric {@code true} if matrix passes symmetry check, {@code 
false otherwise}.
+     */
     public EigenDecomposition(Matrix matrix, boolean isSymmetric) {
         n = matrix.columnSize();
 
@@ -69,7 +74,7 @@ public class EigenDecomposition extends DecompositionSupport {
     }
 
     /**
-     * Return the eigen vector matrix
+     * Return the eigen vector matrix.
      *
      * @return V
      */
@@ -85,7 +90,9 @@ public class EigenDecomposition extends DecompositionSupport {
     }
 
     /**
-     * Return the imaginary parts of the eigenvalues
+     * Return the imaginary parts of the eigenvalues.
+     *
+     * @return Vector of imaginary parts.
      */
     public Vector getImagEigenvalues() {
         return e;
@@ -285,7 +292,9 @@ public class EigenDecomposition extends 
DecompositionSupport {
         return hessenBerg;
     }
 
-    /** Symmetric tridiagonal QL algorithm. */
+    /**
+     * Symmetric tridiagonal QL algorithm.
+     */
     private void tql2() {
         //  This is derived from the Algol procedures tql2, by
         //  Bowdler, Martin, Reinsch, and Wilkinson, Handbook for

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/LUDecomposition.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/LUDecomposition.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/LUDecomposition.java
index b1efc09..4e9730c 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/LUDecomposition.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/decompositions/LUDecomposition.java
@@ -24,9 +24,9 @@ import 
org.apache.ignite.ml.math.exceptions.SingularMatrixException;
 
 /**
  * Calculates the LU-decomposition of a square matrix.
- *
- * This class inspired by class from Apache Common Math with similar name.
- *
+ * <p>
+ * This class is inspired by class from Apache Common Math with similar name.
+ * </p>
  * @see <a 
href="http://mathworld.wolfram.com/LUDecomposition.html";>MathWorld</a>
  * @see <a href="http://en.wikipedia.org/wiki/LU_decomposition";>Wikipedia</a>
  */
@@ -274,7 +274,10 @@ public class LUDecomposition extends DecompositionSupport {
         return determinant;
     }
 
-    /** */
+    /**
+     * @param b Vector to solve using this decomposition.
+     * @return Solution vector.
+     */
     public Vector solve(Vector b) {
         final int m = pivot.size();
 
@@ -310,7 +313,10 @@ public class LUDecomposition extends DecompositionSupport {
         return b.like(m).assign(bp);
     }
 
-    /** */
+    /**
+     * @param b Matrix to solve using this decomposition.
+     * @return Solution matrix.
+     */
     public Matrix solve(Matrix b) {
         final int m = pivot.size();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/Functions.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/Functions.java 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/Functions.java
index cd48daa..2693fce 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/Functions.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/Functions.java
@@ -86,7 +86,7 @@ public final class Functions {
     /**
      * Function that returns {@code a + b}. {@code a} is a variable, {@code b} 
is fixed.
      *
-     * @param b
+     * @param b Value to add.
      */
     public static IgniteDoubleFunction<Double> plus(final double b) {
         return (a) -> a + b;
@@ -95,7 +95,7 @@ public final class Functions {
     /**
      * Function that returns {@code a * b}. {@code a} is a variable, {@code b} 
is fixed.
      *
-     * @param b
+     * @param b Value to multiply to.
      */
     public static IgniteDoubleFunction<Double> mult(final double b) {
         return (a) -> a * b;
@@ -123,7 +123,8 @@ public final class Functions {
     }
 
     /**
-     * @param b
+     * @param b Power value.
+     * @return Function for given power.
      */
     public static IgniteDoubleFunction<Double> pow(final double b) {
         return (a) -> {

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/IntIntDoubleToVoidFunction.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/IntIntDoubleToVoidFunction.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/IntIntDoubleToVoidFunction.java
index a9b3f9c..7487a54 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/IntIntDoubleToVoidFunction.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/functions/IntIntDoubleToVoidFunction.java
@@ -23,6 +23,10 @@ import java.io.Serializable;
  * Setter function for matrices.
  */
 public interface IntIntDoubleToVoidFunction extends Serializable {
-    /** */
+    /**
+     * @param x Row index in the matrix.
+     * @param y Column index in the matrix.
+     * @param v Value to set at given row and column.
+     */
     public void apply(int x, int y, double v);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrix.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrix.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrix.java
index 73a3493..a7f0afc 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrix.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrix.java
@@ -42,11 +42,11 @@ public class CacheMatrix<K, V> extends AbstractMatrix {
     /**
      * Creates new matrix over existing cache.
      *
-     * @param rows
-     * @param cols
-     * @param cache
-     * @param keyMapper
-     * @param valMapper
+     * @param rows Amount of rows in matrix.
+     * @param cols Amount of columns in matrix.
+     * @param cache Ignite cache.
+     * @param keyMapper {@link MatrixKeyMapper} to validate cache key.
+     * @param valMapper {@link ValueMapper} to obtain value for given cache 
key.
      */
     public CacheMatrix(
         int rows,
@@ -90,7 +90,7 @@ public class CacheMatrix<K, V> extends AbstractMatrix {
     /**
      * Return the same matrix with updates values (broken contract).
      *
-     * @param d
+     * @param d Value to divide to.
      */
     @Override public Matrix divide(double d) {
         return mapOverValues((Double v) -> v / d);
@@ -99,7 +99,7 @@ public class CacheMatrix<K, V> extends AbstractMatrix {
     /**
      * Return the same matrix with updates values (broken contract).
      *
-     * @param x
+     * @param x Value to add.
      */
     @Override public Matrix plus(double x) {
         return mapOverValues((Double v) -> v + x);
@@ -108,7 +108,7 @@ public class CacheMatrix<K, V> extends AbstractMatrix {
     /**
      * Return the same matrix with updates values (broken contract).
      *
-     * @param x
+     * @param x Value to multiply to.
      */
     @Override public Matrix times(double x) {
         return mapOverValues((Double v) -> v * x);
@@ -146,7 +146,8 @@ public class CacheMatrix<K, V> extends AbstractMatrix {
     }
 
     /**
-     * @param mapper
+     * @param mapper Mapping function.
+     * @return Matrix with mapped values.
      */
     private Matrix mapOverValues(IgniteFunction<Double, Double> mapper) {
         CacheMatrixStorage<K, V> sto = storage();

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/PivotedMatrixView.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/PivotedMatrixView.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/PivotedMatrixView.java
index b9a3b17..334291e 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/PivotedMatrixView.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/PivotedMatrixView.java
@@ -43,9 +43,9 @@ public class PivotedMatrixView extends AbstractMatrix {
     }
 
     /**
-     * @param mtx
-     * @param rowPivot
-     * @param colPivot
+     * @param mtx Parent matrix.
+     * @param rowPivot Pivot array for rows.
+     * @param colPivot Pivot array for columns.
      */
     public PivotedMatrixView(Matrix mtx, int[] rowPivot, int[] colPivot) {
         super(new PivotedMatrixStorage(mtx == null ? null : mtx.getStorage(), 
rowPivot, colPivot));
@@ -54,7 +54,7 @@ public class PivotedMatrixView extends AbstractMatrix {
     }
 
     /**
-     * @param mtx
+     * @param mtx Parent matrix.
      */
     public PivotedMatrixView(Matrix mtx) {
         super(new PivotedMatrixStorage(mtx == null ? null : mtx.getStorage()));
@@ -63,8 +63,8 @@ public class PivotedMatrixView extends AbstractMatrix {
     }
 
     /**
-     * @param mtx
-     * @param pivot
+     * @param mtx  Parent matrix.
+     * @param pivot Pivot array for rows and columns.
      */
     public PivotedMatrixView(Matrix mtx, int[] pivot) {
         super(new PivotedMatrixStorage(mtx == null ? null : mtx.getStorage(), 
pivot));
@@ -128,52 +128,53 @@ public class PivotedMatrixView extends AbstractMatrix {
     }
 
     /**
-     *
-     *
+     * @return Parent matrix.
      */
     public Matrix getBaseMatrix() {
         return mtx;
     }
 
     /**
-     *
-     *
+     * @return Pivot array for rows.
      */
     public int[] rowPivot() {
         return storage().rowPivot();
     }
 
     /**
-     *
-     *
+     * @return Pivot array for columns.
      */
     public int[] columnPivot() {
         return storage().columnPivot();
     }
 
     /**
-     * @param i
+     * @param i Index for row pivot.
+     * @return Row pivot for given index.
      */
     public int rowPivot(int i) {
         return storage().rowPivot()[i];
     }
 
     /**
-     * @param i
+     * @param i Index for column pivot.
+     * @return Column pivot for given index.
      */
     public int columnPivot(int i) {
         return storage().columnPivot()[i];
     }
 
     /**
-     * @param i
+     * @param i Index for row unpivot.
+     * @return Row unpivot for given index.
      */
     public int rowUnpivot(int i) {
         return storage().rowUnpivot()[i];
     }
 
     /**
-     * @param i
+     * @param i Index for column unpivot.
+     * @return Column unpivot for given index.
      */
     public int columnUnpivot(int i) {
         return storage().columnUnpivot()[i];
@@ -193,10 +194,7 @@ public class PivotedMatrixView extends AbstractMatrix {
         mtx = (Matrix)in.readObject();
     }
 
-    /**
-     *
-     *
-     */
+    /** */
     private PivotedMatrixStorage storage() {
         return (PivotedMatrixStorage)getStorage();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/SparseDistributedMatrix.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/SparseDistributedMatrix.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/SparseDistributedMatrix.java
index 8a7cffe..cd75b83 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/SparseDistributedMatrix.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/matrix/SparseDistributedMatrix.java
@@ -55,10 +55,10 @@ public class SparseDistributedMatrix extends AbstractMatrix 
implements StorageCo
     }
 
     /**
-     * @param rows
-     * @param cols
-     * @param stoMode
-     * @param acsMode
+     * @param rows Amount of rows in the matrix.
+     * @param cols Amount of columns in the matrix.
+     * @param stoMode Matrix storage mode.
+     * @param acsMode Matrix elements access mode.
      */
     public SparseDistributedMatrix(int rows, int cols, int stoMode, int 
acsMode) {
         assert rows > 0;
@@ -80,7 +80,7 @@ public class SparseDistributedMatrix extends AbstractMatrix 
implements StorageCo
     /**
      * Return the same matrix with updates values (broken contract).
      *
-     * @param d
+     * @param d Value to divide to.
      */
     @Override public Matrix divide(double d) {
         return mapOverValues((Double v) -> v / d);
@@ -89,7 +89,7 @@ public class SparseDistributedMatrix extends AbstractMatrix 
implements StorageCo
     /**
      * Return the same matrix with updates values (broken contract).
      *
-     * @param x
+     * @param x Value to add.
      */
     @Override public Matrix plus(double x) {
         return mapOverValues((Double v) -> v + x);
@@ -98,7 +98,7 @@ public class SparseDistributedMatrix extends AbstractMatrix 
implements StorageCo
     /**
      * Return the same matrix with updates values (broken contract).
      *
-     * @param x
+     * @param x Value to multiply.
      */
     @Override public Matrix times(double x) {
         return mapOverValues((Double v) -> v * x);
@@ -115,7 +115,8 @@ public class SparseDistributedMatrix extends AbstractMatrix 
implements StorageCo
     }
 
     /**
-     * @param mapper
+     * @param mapper Mapping function.
+     * @return Matrix with mapped values.
      */
     private Matrix mapOverValues(IgniteFunction<Double, Double> mapper) {
         CacheUtils.sparseMap(storage().cache().getName(), mapper);

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/CacheMatrixStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/CacheMatrixStorage.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/CacheMatrixStorage.java
index 510c4cf..1eec6f5 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/CacheMatrixStorage.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/CacheMatrixStorage.java
@@ -44,11 +44,11 @@ public class CacheMatrixStorage<K, V> implements 
MatrixStorage {
     }
 
     /**
-     * @param rows
-     * @param cols
-     * @param cache
-     * @param keyMapper
-     * @param valMapper
+     * @param rows Amount of rows in matrix.
+     * @param cols Amount of columns in matrix.
+     * @param cache Ignite cache.
+     * @param keyMapper {@link MatrixKeyMapper} to validate cache key.
+     * @param valMapper {@link ValueMapper} to obtain value for given cache 
key.
      */
     public CacheMatrixStorage(int rows, int cols, IgniteCache<K, V> cache, 
MatrixKeyMapper<K> keyMapper,
         ValueMapper<V> valMapper) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/DenseOffHeapMatrixStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/DenseOffHeapMatrixStorage.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/DenseOffHeapMatrixStorage.java
index 74952a9..c9e8de8 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/DenseOffHeapMatrixStorage.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/DenseOffHeapMatrixStorage.java
@@ -38,7 +38,10 @@ public class DenseOffHeapMatrixStorage implements 
MatrixStorage {
         // No-op.
     }
 
-    /** */
+    /**
+     * @param rows Amount of rows in the matrix.
+     * @param cols Amount of columns in the matrix.
+     */
     public DenseOffHeapMatrixStorage(int rows, int cols) {
         assert rows > 0;
         assert cols > 0;
@@ -49,7 +52,9 @@ public class DenseOffHeapMatrixStorage implements 
MatrixStorage {
         allocateMemory(rows, cols);
     }
 
-    /** */
+    /**
+     * @param data Backing data array.
+     */
     public DenseOffHeapMatrixStorage(double[][] data) {
         assert data != null;
         assert data[0] != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/CacheVectorStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/CacheVectorStorage.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/CacheVectorStorage.java
index 7aa317c..f99a216 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/CacheVectorStorage.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/CacheVectorStorage.java
@@ -47,10 +47,10 @@ public class CacheVectorStorage<K, V> implements 
VectorStorage {
     }
 
     /**
-     * @param size
-     * @param cache
-     * @param keyMapper
-     * @param valMapper
+     * @param size Vector size.
+     * @param cache Ignite cache.
+     * @param keyMapper {@link VectorKeyMapper} to validate cache key.
+     * @param valMapper {@link ValueMapper} to obtain value for given cache 
key.
      */
     public CacheVectorStorage(int size, IgniteCache<K, V> cache, 
VectorKeyMapper<K> keyMapper,
         ValueMapper<V> valMapper) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/DelegateVectorStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/DelegateVectorStorage.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/DelegateVectorStorage.java
index c431bdb..6775d44 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/DelegateVectorStorage.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/DelegateVectorStorage.java
@@ -57,17 +57,23 @@ public class DelegateVectorStorage implements VectorStorage 
{
         this.len = len;
     }
 
-    /** */
+    /**
+     * @return Backing vector storage.
+     */
     public VectorStorage delegate() {
         return sto;
     }
 
-    /** */
+    /**
+     * @return Offset into the backing vector.
+     */
     public int offset() {
         return off;
     }
 
-    /** */
+    /**
+     * @return Vector length.
+     */
     public int length() {
         return len;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/MatrixVectorStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/MatrixVectorStorage.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/MatrixVectorStorage.java
index a7d7e26..66aa049 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/MatrixVectorStorage.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/MatrixVectorStorage.java
@@ -46,11 +46,11 @@ public class MatrixVectorStorage implements VectorStorage {
     }
 
     /**
-     * @param parent
-     * @param row
-     * @param col
-     * @param rowStride
-     * @param colStride
+     * @param parent Parent matrix.
+     * @param row Starting row in the view.
+     * @param col Starting column in the view.
+     * @param rowStride Rows stride in the view.
+     * @param colStride Columns stride in the view.
      */
     public MatrixVectorStorage(Matrix parent, int row, int col, int rowStride, 
int colStride) {
         assert parent != null;
@@ -75,41 +75,34 @@ public class MatrixVectorStorage implements VectorStorage {
     }
 
     /**
-     *
-     *
+     * @return Starting row in the view.
      */
     int row() {
         return row;
     }
 
     /**
-     *
-     *
+     * @return Starting column in the view.
      */
     int column() {
         return col;
     }
 
     /**
-     *
-     *
+     * @return Rows stride in the view.
      */
     int rowStride() {
         return rowStride;
     }
 
     /**
-     *
-     *
+     * @return Columns stride in the view.
      */
     int columnStride() {
         return colStride;
     }
 
-    /**
-     *
-     *
-     */
+    /** */
     private int getSize() {
         if (rowStride != 0 && colStride != 0) {
             int n1 = (parent.rowSize() - row) / rowStride;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/SparseLocalOffHeapVectorStorage.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/SparseLocalOffHeapVectorStorage.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/SparseLocalOffHeapVectorStorage.java
index 7b3da78..035a565 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/SparseLocalOffHeapVectorStorage.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/vector/SparseLocalOffHeapVectorStorage.java
@@ -43,7 +43,9 @@ public class SparseLocalOffHeapVectorStorage implements 
VectorStorage {
         //No-op.
     }
 
-    /** */
+    /**
+     * @param cap Initial capacity.
+     */
     public SparseLocalOffHeapVectorStorage(int cap) {
         assert cap > 0;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/AbstractVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/AbstractVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/AbstractVector.java
index 3c075f4..83ac837 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/AbstractVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/AbstractVector.java
@@ -71,9 +71,7 @@ public abstract class AbstractVector implements Vector {
     /** Read-only error message. */
     private static final String RO_MSG = "Vector is read-only.";
 
-    /**
-     *
-     */
+    /** */
     private void ensureReadOnly() {
         if (readOnly)
             throw new UnsupportedOperationException(RO_MSG);
@@ -707,19 +705,25 @@ public abstract class AbstractVector implements Vector {
             return foldMap(vec, Functions.PLUS, Functions.MINUS_SQUARED, 0d);
     }
 
-    /** */
+    /**
+     * @param vec Vector to check for valid cardinality.
+     */
     protected void checkCardinality(Vector vec) {
         if (vec.size() != size())
             throw new CardinalityException(size(), vec.size());
     }
 
-    /** */
+    /**
+     * @param vec Array to check for valid cardinality.
+     */
     protected void checkCardinality(double[] vec) {
         if (vec.length != size())
             throw new CardinalityException(size(), vec.length);
     }
 
-    /** */
+    /**
+     * @param arr Array to check for valid cardinality.
+     */
     protected void checkCardinality(int[] arr) {
         if (arr.length != size())
             throw new CardinalityException(size(), arr.length);

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/CacheVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/CacheVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/CacheVector.java
index 7e23791..f78113c 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/CacheVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/CacheVector.java
@@ -43,10 +43,10 @@ public class CacheVector<K, V> extends AbstractVector {
     /**
      * Creates new vector over existing cache.
      *
-     * @param size
-     * @param cache
-     * @param keyFunc
-     * @param valMapper
+     * @param size Vector size.
+     * @param cache Ignite cache.
+     * @param keyFunc {@link VectorKeyMapper} to validate cache key.
+     * @param valMapper {@link ValueMapper} to obtain value for given cache 
key.
      */
     public CacheVector(
         int size,
@@ -57,7 +57,7 @@ public class CacheVector<K, V> extends AbstractVector {
     }
 
     /**
-     * @param mapper
+     * @param mapper Mapping function.
      */
     private Vector mapOverCache(IgniteFunction<Double, Double> mapper) {
         CacheVectorStorage<K, V> sto = storage();

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/ConstantVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/ConstantVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/ConstantVector.java
index 71c9c3e..5038f13 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/ConstantVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/ConstantVector.java
@@ -35,8 +35,8 @@ public class ConstantVector extends AbstractReadOnlyVector {
     }
 
     /**
-     * @param size
-     * @param val
+     * @param size Vector size.
+     * @param val Value of the constant.
      */
     public ConstantVector(int size, double val) {
         super(new ConstantVectorStorage(size, val));

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/DelegatingVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/DelegatingVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/DelegatingVector.java
index 891eb8e..c868160 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/DelegatingVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/DelegatingVector.java
@@ -51,7 +51,7 @@ public class DelegatingVector implements Vector {
     }
 
     /**
-     * @param dlg
+     * @param dlg Parent vector.
      */
     public DelegatingVector(Vector dlg) {
         assert dlg != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/MatrixVectorView.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/MatrixVectorView.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/MatrixVectorView.java
index 723c585..1eda7d8 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/MatrixVectorView.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/MatrixVectorView.java
@@ -33,7 +33,7 @@ public class MatrixVectorView extends AbstractVector {
 
     /** */ private int row;
     /** */ private int col;
-    
+
     /** */ private int rowStride;
     /** */ private int colStride;
 
@@ -45,11 +45,11 @@ public class MatrixVectorView extends AbstractVector {
     }
 
     /**
-     * @param parent
-     * @param row
-     * @param col
-     * @param rowStride
-     * @param colStride
+     * @param parent Parent matrix.
+     * @param row Starting row in the view.
+     * @param col Starting column in the view.
+     * @param rowStride Rows stride in the view.
+     * @param colStride Columns stride in the view.
      */
     public MatrixVectorView(Matrix parent, int row, int col, int rowStride, 
int colStride) {
         assert parent != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/PivotedVectorView.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/PivotedVectorView.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/PivotedVectorView.java
index 607bb72..5ad6b89 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/PivotedVectorView.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/PivotedVectorView.java
@@ -33,7 +33,7 @@ public class PivotedVectorView extends AbstractVector {
     /** */ private Vector vec;
 
     /**
-     * @param vec
+     * @param vec Parent vector.
      * @param pivot Mapping from external index to internal.
      * @param unpivot Mapping from internal index to external.
      */
@@ -47,8 +47,8 @@ public class PivotedVectorView extends AbstractVector {
     }
 
     /**
-     * @param vec
-     * @param pivot
+     * @param vec  Parent vector.
+     * @param pivot Mapping from external index to internal.
      */
     public PivotedVectorView(Vector vec, int[] pivot) {
         setStorage(new PivotedVectorStorage(vec.getStorage(), pivot));
@@ -58,10 +58,7 @@ public class PivotedVectorView extends AbstractVector {
         this.vec = vec;
     }
 
-    /**
-     *
-     *
-     */
+    /** */
     private PivotedVectorStorage storage() {
         return (PivotedVectorStorage)getStorage();
     }
@@ -74,29 +71,31 @@ public class PivotedVectorView extends AbstractVector {
     }
 
     /**
-     *
-     *
+     * @return Parent vector.
      */
     public Vector getBaseVector() {
         return vec;
     }
 
     /**
-     * @param i
+     * @param i Index to pivot.
+     * @return  Mapping from external index to internal for given index.
      */
     public int pivot(int i) {
         return storage().pivot()[i];
     }
 
     /**
-     * @param i
+     * @param i Index to unpivot.
+     * @return Mapping from internal index to external for given index.
      */
     public int unpivot(int i) {
         return storage().unpivot()[i];
     }
 
     /**
-     * @param idx
+     * @param idx Index of vector element.
+     * @return Vector element at given index.
      */
     protected Vector.Element makeElement(int idx) {
         checkIndex(idx);

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/RandomVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/RandomVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/RandomVector.java
index 08292eb..d216a90 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/RandomVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/RandomVector.java
@@ -37,7 +37,7 @@ public class RandomVector extends AbstractReadOnlyVector {
 
     /**
      * @param size Vector cardinality.
-     * @param fastHash
+     * @param fastHash Whether or not to use fast hashing or Murmur hashing.
      */
     private VectorStorage mkStorage(int size, boolean fastHash) {
         this.fastHash = fastHash;
@@ -46,22 +46,22 @@ public class RandomVector extends AbstractReadOnlyVector {
     }
 
     /**
-     * @param size
-     * @param fastHash
+     * @param size Vector cardinality.
+     * @param fastHash Whether or not to use fast hashing or Murmur hashing.
      */
     public RandomVector(int size, boolean fastHash) {
         setStorage(mkStorage(size, fastHash));
     }
 
     /**
-     * @param size
+     * @param size Vector cardinality.
      */
     public RandomVector(int size) {
         this(size, true);
     }
 
     /**
-     * @param args
+     * @param args Parameters to create new vector instance.
      */
     public RandomVector(Map<String, Object> args) {
         assert args != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVector.java
index cae5ca3..b47dad8 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVector.java
@@ -35,16 +35,16 @@ public class SingleElementVector extends AbstractVector {
     }
 
     /**
-     * @param size
-     * @param idx
-     * @param val
+     * @param size Parent vector size.
+     * @param idx Index of the parent vector element.
+     * @param val Value of the vector element.
      */
     public SingleElementVector(int size, int idx, double val) {
         super(new SingleElementVectorStorage(size, idx, val));
     }
 
     /**
-     * @param args
+     * @param args Parameters to create new vector instance.
      */
     public SingleElementVector(Map<String, Object> args) {
         assert args != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVectorView.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVectorView.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVectorView.java
index 0fb4105..c2c648b 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVectorView.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SingleElementVectorView.java
@@ -35,8 +35,8 @@ public class SingleElementVectorView extends AbstractVector {
     }
 
     /**
-     * @param vec
-     * @param idx
+     * @param vec Parent vector.
+     * @param idx Index of the parent vector element.
      */
     public SingleElementVectorView(Vector vec, int idx) {
         super(new SingleElementVectorDelegateStorage(vec, idx));

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SparseLocalVector.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SparseLocalVector.java
 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SparseLocalVector.java
index d60eea8..e188f70 100644
--- 
a/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SparseLocalVector.java
+++ 
b/modules/ml/src/main/java/org/apache/ignite/ml/math/impls/vector/SparseLocalVector.java
@@ -35,8 +35,8 @@ public class SparseLocalVector extends AbstractVector 
implements StorageConstant
     }
 
     /**
-     * @param size
-     * @param acsMode
+     * @param size Vector size.
+     * @param acsMode Vector elements access mode.
      */
     public SparseLocalVector(int size, int acsMode) {
         assertAccessMode(acsMode);

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrixTest.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrixTest.java
 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrixTest.java
index 3d4d05e..52badbc 100644
--- 
a/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrixTest.java
+++ 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/matrix/CacheMatrixTest.java
@@ -210,13 +210,11 @@ public class CacheMatrixTest extends 
GridCommonAbstractTest {
     public void testSum() {
         
IgniteUtils.setCurrentIgniteName(ignite.configuration().getIgniteInstanceName());
 
-        double initVal = 1;
-
         MatrixKeyMapper<Integer> keyMapper = getKeyMapper(rows, cols);
         IgniteCache<Integer, Double> cache = getCache();
         CacheMatrix<Integer, Double> cacheMatrix = new CacheMatrix<>(rows, 
cols, cache, keyMapper, new IdentityValueMapper());
 
-        double sum = 0;
+        double sum;
 
         initMatrix(cacheMatrix);
         sum = cacheMatrix.sum();

http://git-wip-us.apache.org/repos/asf/ignite/blob/7b2e3888/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/vector/AbstractVectorTest.java
----------------------------------------------------------------------
diff --git 
a/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/vector/AbstractVectorTest.java
 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/vector/AbstractVectorTest.java
index fa66769..7d12773 100644
--- 
a/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/vector/AbstractVectorTest.java
+++ 
b/modules/ml/src/test/java/org/apache/ignite/ml/math/impls/vector/AbstractVectorTest.java
@@ -262,12 +262,12 @@ public class AbstractVectorTest {
 
         AbstractVector testVector1 = getAbstractVector(storage1);
 
-        String testVal = "";
+        StringBuilder testVal = new StringBuilder();
 
         for (int i = 0; i < data0.length; i++)
-            testVal += data0[i] + data1[i];
+            testVal.append(data0[i] + data1[i]);
 
-        assertEquals(MathTestConstants.VAL_NOT_EQUALS, 
testVector.foldMap(testVector1, (string, xi) -> string.concat(xi.toString()), 
Functions.PLUS, ""), testVal);
+        assertEquals(MathTestConstants.VAL_NOT_EQUALS, 
testVector.foldMap(testVector1, (string, xi) -> string.concat(xi.toString()), 
Functions.PLUS, ""), testVal.toString());
     }
 
     /** */

Reply via email to