You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/11/17 02:28:52 UTC
[4/5] incubator-systemml git commit: [SYSTEMML-842] Javadoc cleanup
in io, matrix, and gpu packages
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
index 8bf8cb1..f3533af 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
@@ -42,9 +42,6 @@ import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.matrix.data.SparseBlock;
import org.apache.sysml.runtime.util.MapReduceTool;
-/**
- *
- */
public class WriterTextCSV extends MatrixWriter
{
//blocksize for string concatenation in order to prevent write OOM
@@ -93,32 +90,14 @@ public class WriterTextCSV extends MatrixWriter
IOUtilFunctions.deleteCrcFilesFromLocalFileSystem(fs, path);
}
-
- /**
- *
- * @param path
- * @param job
- * @param fs
- * @param src
- * @param csvprops
- * @throws IOException
- */
+
protected void writeCSVMatrixToHDFS(Path path, JobConf job, FileSystem fs, MatrixBlock src, CSVFileFormatProperties csvprops)
throws IOException
{
//sequential write csv file
writeCSVMatrixToFile(path, job, fs, src, 0, (int)src.getNumRows(), csvprops);
}
-
- /**
- *
- * @param fileName
- * @param src
- * @param rlen
- * @param clen
- * @param nnz
- * @throws IOException
- */
+
protected final void writeCSVMatrixToFile( Path path, JobConf job, FileSystem fs, MatrixBlock src, int rl, int ru, CSVFileFormatProperties props )
throws IOException
{
@@ -267,12 +246,12 @@ public class WriterTextCSV extends MatrixWriter
*
* This method is invoked from CP-write instruction.
*
- * @param srcFileName
- * @param destFileName
- * @param csvprop
- * @param rlen
- * @param clen
- * @throws IOException
+ * @param srcFileName source file name
+ * @param destFileName destination file name
+ * @param csvprop CSV file format properties
+ * @param rlen number of rows
+ * @param clen number of columns
+ * @throws IOException if IOException occurs
*/
public final void mergeCSVPartFiles(String srcFileName, String destFileName, CSVFileFormatProperties csvprop, long rlen, long clen)
throws IOException
@@ -343,16 +322,7 @@ public class WriterTextCSV extends MatrixWriter
+ ": No such file or directory");
}
}
-
- /**
- *
- * @param srcFileName
- * @param destFileName
- * @param csvprop
- * @param rlen
- * @param clen
- * @throws IOException
- */
+
@SuppressWarnings("unchecked")
public final void addHeaderToCSV(String srcFileName, String destFileName, long rlen, long clen)
throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSVParallel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterTextCSVParallel.java b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSVParallel.java
index 5df9118..eb82df1 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterTextCSVParallel.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSVParallel.java
@@ -39,9 +39,6 @@ import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.matrix.data.OutputInfo;
import org.apache.sysml.runtime.util.MapReduceTool;
-/**
- *
- */
public class WriterTextCSVParallel extends WriterTextCSV
{
public WriterTextCSVParallel( CSVFileFormatProperties props ) {
@@ -104,11 +101,6 @@ public class WriterTextCSVParallel extends WriterTextCSV
}
}
-
- /**
- *
- *
- */
private class WriteCSVTask implements Callable<Object>
{
private JobConf _job = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java b/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
index 5363669..328a2ed 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
@@ -72,34 +72,14 @@ public class WriterTextCell extends MatrixWriter
IOUtilFunctions.deleteCrcFilesFromLocalFileSystem(fs, path);
}
-
- /**
- *
- * @param path
- * @param job
- * @param src
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @throws IOException
- */
+
protected void writeTextCellMatrixToHDFS( Path path, JobConf job, FileSystem fs, MatrixBlock src, long rlen, long clen )
throws IOException
{
//sequential write text cell file
writeTextCellMatrixToFile(path, job, fs, src, 0, (int)rlen);
}
-
- /**
- *
- * @param path
- * @param job
- * @param src
- * @param rl
- * @param ru
- * @throws IOException
- */
+
protected final void writeTextCellMatrixToFile( Path path, JobConf job, FileSystem fs, MatrixBlock src, int rl, int ru )
throws IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/io/WriterTextCellParallel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterTextCellParallel.java b/src/main/java/org/apache/sysml/runtime/io/WriterTextCellParallel.java
index 09d1dbc..208a9c8 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterTextCellParallel.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterTextCellParallel.java
@@ -40,17 +40,7 @@ import org.apache.sysml.runtime.util.MapReduceTool;
public class WriterTextCellParallel extends WriterTextCell
{
- /**
- *
- * @param path
- * @param job
- * @param src
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @throws IOException
- */
+
@Override
protected void writeTextCellMatrixToHDFS( Path path, JobConf job, FileSystem fs, MatrixBlock src, long rlen, long clen )
throws IOException
@@ -106,11 +96,6 @@ public class WriterTextCellParallel extends WriterTextCell
}
}
-
- /**
- *
- *
- */
private class WriteTextTask implements Callable<Object>
{
private JobConf _job = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/CSVReblockMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/CSVReblockMR.java b/src/main/java/org/apache/sysml/runtime/matrix/CSVReblockMR.java
index 9bc733d..b976545 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/CSVReblockMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/CSVReblockMR.java
@@ -203,11 +203,11 @@ public class CSVReblockMR
/**
* Method to find the first (part)file in the order given by <code>fs.listStatus()</code> among all (part)files in <code>inpathPath</code>.
*
- * @param job
- * @param inputPath
- * @return
- * @throws IOException
- * @throws FileNotFoundException
+ * @param job job configuration
+ * @param inputPath path to input file
+ * @return file name
+ * @throws IOException if IOException occurs
+ * @throws FileNotFoundException if FileNotFoundException occurs
*/
public static String findSmallestFile(JobConf job, String inputPath) throws FileNotFoundException, IOException {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java b/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
index 8e743a7..cdc9e49 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
@@ -105,14 +105,7 @@ public class CleanupMR
return ret;
}
-
- /**
- *
- * @param path
- * @param numTasks
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private static void writeCleanupTasksToFile(Path path, int numTasks)
throws DMLRuntimeException, IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/DataGenMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/DataGenMR.java b/src/main/java/org/apache/sysml/runtime/matrix/DataGenMR.java
index 974c7df..7e3de55 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/DataGenMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/DataGenMR.java
@@ -78,24 +78,20 @@ public class DataGenMR
/**
* <p>Starts a Rand MapReduce job which will produce one or more random objects.</p>
*
- * @param numRows number of rows for each random object
- * @param numCols number of columns for each random object
- * @param blockRowSize number of rows in a block for each random object
- * @param blockColSize number of columns in a block for each random object
- * @param minValue minimum of the random values for each random object
- * @param maxValue maximum of the random values for each random object
- * @param sparsity sparsity for each random object
- * @param pdf probability density function for each random object
+ * @param inst MR job instruction
+ * @param dataGenInstructions array of data gen instructions
+ * @param instructionsInMapper instructions in mapper
+ * @param aggInstructionsInReducer aggregate instructions in reducer
+ * @param otherInstructionsInReducer other instructions in reducer
+ * @param numReducers number of reducers
* @param replication file replication
- * @param inputs input file for each random object
+ * @param resultIndexes result indexes for each random object
+ * @param dimsUnknownFilePrefix file path prefix when dimensions unknown
* @param outputs output file for each random object
* @param outputInfos output information for each random object
- * @param instructionsInMapper instruction for each random object
- * @param resultIndexes result indexes for each random object
* @return matrix characteristics for each random object
- * @throws Exception if an error occurred in the MapReduce phase
+ * @throws Exception if Exception occurs
*/
-
public static JobReturn runJob(MRJobInstruction inst, String[] dataGenInstructions,
String instructionsInMapper, String aggInstructionsInReducer, String otherInstructionsInReducer,
int numReducers, int replication, byte[] resultIndexes, String dimsUnknownFilePrefix,
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/GMR.java b/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
index dd54886..6f3e249 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
@@ -72,26 +72,35 @@ public class GMR
private GMR() {
//prevent instantiation via private constructor
}
-
+
/**
- * inBlockRepresentation: indicate whether to use block representation or cell representation
- * inputs: input matrices, the inputs are indexed by 0, 1, 2, .. based on the position in this string
- * inputInfos: the input format information for the input matrices
- * rlen: the number of rows for each matrix
- * clen: the number of columns for each matrix
- * brlen: the number of rows per block
- * bclen: the number of columns per block
- * instructionsInMapper: in Mapper, the set of unary operations that need to be performed on each input matrix
- * aggInstructionsInReducer: in Reducer, right after sorting, the set of aggreagte operations that need
- * to be performed on each input matrix,
- * otherInstructionsInReducer: the mixed operations that need to be performed on matrices after the aggregate operations
- * numReducers: the number of reducers
- * replication: the replication factor for the output
- * resulltIndexes: the indexes of the result matrices that needs to be outputted.
- * outputs: the names for the output directories, one for each result index
- * outputInfos: output format information for the output matrices
+ * Execute job.
+ *
+ * @param inst MR job instruction
+ * @param inputs input matrices, the inputs are indexed by 0, 1, 2, .. based on the position in this string
+ * @param inputInfos the input format information for the input matrices
+ * @param rlens array of number of rows
+ * @param clens array of number of columns
+ * @param brlens array of number of rows in block
+ * @param bclens array of number of columns in block
+ * @param partitioned boolean array of partitioned status
+ * @param pformats array of data partition formats
+ * @param psizes does nothing
+ * @param recordReaderInstruction record reader instruction
+ * @param instructionsInMapper in Mapper, the set of unary operations that need to be performed on each input matrix
+ * @param aggInstructionsInReducer in Reducer, right after sorting, the set of aggreagte operations
+ * that need to be performed on each input matrix
+ * @param otherInstructionsInReducer the mixed operations that need to be performed on matrices after the aggregate operations
+ * @param numReducers the number of reducers
+ * @param replication the replication factor for the output
+ * @param jvmReuse if true, reuse JVM
+ * @param resultIndexes the indexes of the result matrices that needs to be outputted
+ * @param dimsUnknownFilePrefix file path prefix when dimensions unknown
+ * @param outputs the names for the output directories, one for each result index
+ * @param outputInfos output format information for the output matrices
+ * @return job return object
+ * @throws Exception if Exception occurs
*/
-
@SuppressWarnings({ "unchecked", "rawtypes" })
public static JobReturn runJob(MRJobInstruction inst, String[] inputs, InputInfo[] inputInfos, long[] rlens, long[] clens,
int[] brlens, int[] bclens,
@@ -305,16 +314,6 @@ public class GMR
return new JobReturn(stats, outputInfos, runjob.isSuccessful());
}
-
- /**
- *
- * @param job
- * @param instructionsInMapper
- * @param inputs
- * @param rlens
- * @param clens
- * @throws DMLRuntimeException
- */
private static void setupDistributedCache(JobConf job, String instMap, String instRed, String[] inputs, long[] rlens, long[] clens)
throws DMLRuntimeException
{
@@ -377,13 +376,13 @@ public class GMR
* Determine which indices are only used as inputs through distributed cache and hence would
* be redundant job inputs.
*
- * @param realIndexes
- * @param inst1
- * @param inst2
- * @param inst3
- * @param inst4
- * @return
- * @throws DMLRuntimeException
+ * @param realIndexes array of byte indexes
+ * @param inst1 instruction 1
+ * @param inst2 instruction 2
+ * @param inst3 instruction 3
+ * @param inst4 instruction 4
+ * @return array of byte indexes
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static boolean[] getDistCacheOnlyInputs(byte[] realIndexes, String inst1, String inst2, String inst3, String inst4)
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/MMCJMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/MMCJMR.java b/src/main/java/org/apache/sysml/runtime/matrix/MMCJMR.java
index eb4ae4c..1571f99 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/MMCJMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/MMCJMR.java
@@ -267,11 +267,11 @@ public class MMCJMR
* Determine number of reducers based on configured number of reducers, number of results groups
* and input data divided by blocksize (as heuristic for useful degree of parallelism).
*
- * @param rlen
- * @param clen
- * @param defaultNumRed
- * @param numRedGroups
- * @return
+ * @param rlen array of numbers of rows
+ * @param clen array of numbers of columns
+ * @param defaultNumRed default number of reducers
+ * @param numRedGroups number of reducer groups
+ * @return number of reducers
*/
protected static int determineNumReducers( long[] rlen, long[] clen, int defaultNumRed, long numRedGroups )
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/ReblockMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/ReblockMR.java b/src/main/java/org/apache/sysml/runtime/matrix/ReblockMR.java
index b60d3d6..57d16e1 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/ReblockMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/ReblockMR.java
@@ -191,16 +191,7 @@ public class ReblockMR
return new JobReturn(stats, outputInfos, runjob.isSuccessful());
}
-
- /**
- *
- * @param rlen
- * @param clen
- * @param nnz
- * @param defaultNumRed
- * @param numRedGroups
- * @return
- */
+
private static int determineNumReducers( long[] rlen, long[] clen, long[] nnz, int defaultNumRed, long numRedGroups )
{
//init return with default value
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java b/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
index c5d7a5b..4c7d257 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
@@ -111,11 +111,9 @@ public class SortMR
* @param fs the file system
* @param p the path to read
* @param job the job config
- * @return the strings to split the partitions on
- * @throws IOException
- * @throws IllegalAccessException
- * @throws InstantiationException
- */
+ * @return list of writable comparables
+ * @throws IOException if IOException occurs
+ */
private ArrayList<WritableComparable> readPartitions(FileSystem fs, Path p, JobConf job)
throws IOException
{
@@ -311,14 +309,7 @@ public class SortMR
return new JobReturn(s[0], counts, partitionWith0, missing0s, runjob.isSuccessful());
}
}
-
- /**
- *
- * @param str
- * @return
- * @throws DMLRuntimeException
- */
public static MRInstruction parseSortInstruction(String str)
throws DMLRuntimeException
{
@@ -333,42 +324,19 @@ public class SortMR
return new UnaryInstruction(null, in, out, str);
}
}
-
- /**
- *
- * @param str
- * @return
- */
+
private static SortKeys.OperationTypes getSortInstructionType(String str)
{
String[] parts = str.split(Lop.OPERAND_DELIMITOR);
return SortKeys.OperationTypes.valueOf(parts[parts.length-2]);
}
-
- /**
- *
- * @param str
- * @return
- */
+
private static boolean getSortInstructionDescending(String str)
{
String[] parts = str.split(Lop.OPERAND_DELIMITOR);
return Boolean.parseBoolean(parts[5]);
}
-
- /**
- *
- * @param input
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @param counts
- * @param numReducers
- * @param replication
- * @param output
- * @throws Exception
- */
+
private static boolean runStitchupJob(String input, long rlen, long clen, int brlen, int bclen, long[] counts,
int numReducers, int replication, String output)
throws Exception
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/WriteCSVMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/WriteCSVMR.java b/src/main/java/org/apache/sysml/runtime/matrix/WriteCSVMR.java
index 87c25b9..2eaddb7 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/WriteCSVMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/WriteCSVMR.java
@@ -155,15 +155,7 @@ public class WriteCSVMR
return new JobReturn(stats, outputInfos, runjob.isSuccessful());
}
-
- /**
- *
- * @param rlen
- * @param clen
- * @param defaultNumRed
- * @param numRedGroups
- * @return
- */
+
public static int determineNumReducers( long[] rlen, long[] clen, int defaultNumRed, long numRedGroups )
{
//init return with default value
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/data/CTableMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/CTableMap.java b/src/main/java/org/apache/sysml/runtime/matrix/data/CTableMap.java
index c546874..2a11882 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/CTableMap.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/CTableMap.java
@@ -42,48 +42,26 @@ public class CTableMap
_maxRow = -1;
_maxCol = -1;
}
-
- /**
- *
- * @return
- */
+
public int size()
{
return _map.size();
}
-
- /**
- *
- * @return
- */
+
@Deprecated
public ArrayList<LLDoubleEntry> entrySet()
{
return _map.extractValues();
}
-
- /**
- *
- * @return
- */
+
public long getMaxRow() {
return _maxRow;
}
-
- /**
- *
- * @return
- */
+
public long getMaxColumn() {
return _maxCol;
}
-
- /**
- *
- * @param row
- * @param col
- * @param w
- */
+
public void aggregate(long row, long col, double w)
{
//hash group-by for core ctable computation
@@ -93,13 +71,7 @@ public class CTableMap
_maxRow = Math.max(_maxRow, row);
_maxCol = Math.max(_maxCol, col);
}
-
- /**
- *
- * @param rlen
- * @param clen
- * @return
- */
+
public MatrixBlock toMatrixBlock(int rlen, int clen)
{
//allocate new matrix block
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java b/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
index 6f55ad2..5096624 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
@@ -43,9 +43,6 @@ import org.apache.sysml.runtime.io.IOUtilFunctions;
import org.apache.sysml.runtime.util.IndexRange;
import org.apache.sysml.runtime.util.UtilFunctions;
-/**
- *
- */
@SuppressWarnings({"rawtypes","unchecked"}) //allow generic native arrays
public class FrameBlock implements Writable, CacheBlock, Externalizable
{
@@ -84,7 +81,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* the schema (column types and names) but a deep copy for meta data
* and actual column data.
*
- * @param that
+ * @param that frame block
*/
public FrameBlock(FrameBlock that) {
this(that.getSchema(), that.getColumnNames(false));
@@ -130,16 +127,12 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* Get the number of rows of the frame block.
*
- * @return
+ * @return number of rows
*/
public int getNumRows() {
return _numRows;
}
-
- /**
- *
- * @param numRows
- */
+
public void setNumRows(int numRows) {
_numRows = numRows;
}
@@ -148,7 +141,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Get the number of columns of the frame block, that is
* the number of columns defined in the schema.
*
- * @return
+ * @return number of columns
*/
public int getNumColumns() {
return (_schema != null) ? _schema.length : 0;
@@ -157,7 +150,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* Returns the schema of the frame block.
*
- * @return
+ * @return schema as array of ValueTypes
*/
public ValueType[] getSchema() {
return _schema;
@@ -166,7 +159,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* Sets the schema of the frame block.
*
- * @return
+ * @param schema schema as array of ValueTypes
*/
public void setSchema(ValueType[] schema) {
_schema = schema;
@@ -176,7 +169,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Returns the column names of the frame block. This method
* allocates default column names if required.
*
- * @return
+ * @return column names
*/
public String[] getColumnNames() {
return getColumnNames(true);
@@ -186,8 +179,8 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Returns the column names of the frame block. This method
* allocates default column names if required.
*
- * @param alloc
- * @return
+ * @param alloc if true, create column names
+ * @return array of column names
*/
public String[] getColumnNames(boolean alloc) {
if( _colnames == null && alloc )
@@ -199,74 +192,43 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Returns the column name for the requested column. This
* method allocates default column names if required.
*
- * @param c
- * @return
+ * @param c column index
+ * @return column name
*/
public String getColumnName(int c) {
if( _colnames == null )
_colnames = createColNames(getNumColumns());
return _colnames[c];
}
-
- /**
- *
- * @param colnames
- */
+
public void setColumnNames(String[] colnames) {
_colnames = colnames;
}
-
- /**
- *
- * @return
- */
+
public ColumnMetadata[] getColumnMetadata() {
return _colmeta;
}
-
- /**
- *
- * @param c
- * @return
- */
+
public ColumnMetadata getColumnMetadata(int c) {
return _colmeta[c];
}
-
- /**
- *
- * @return
- */
+
public boolean isColumnMetadataDefault() {
boolean ret = true;
for( int j=0; j<getNumColumns() && ret; j++ )
ret &= isColumnMetadataDefault(j);
return ret;
}
-
- /**
- *
- * @param c
- * @return
- */
+
public boolean isColumnMetadataDefault(int c) {
return _colmeta[c].getMvValue() == null
&& _colmeta[c].getNumDistinct() == 0;
}
-
- /**
- *
- * @param colmeta
- */
+
public void setColumnMetadata(ColumnMetadata[] colmeta) {
System.arraycopy(colmeta, 0, _colmeta, 0, _colmeta.length);
}
-
- /**
- *
- * @param c
- * @param colmeta
- */
+
public void setColumnMetadata(int c, ColumnMetadata colmeta) {
_colmeta[c] = colmeta;
}
@@ -275,7 +237,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Creates a mapping from column names to column IDs, i.e.,
* 1-based column indexes
*
- * @return
+ * @return map of column name keys and id values
*/
public Map<String,Integer> getColumnNameIDMap() {
Map<String, Integer> ret = new HashMap<String, Integer>();
@@ -287,6 +249,8 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* Allocate column data structures if necessary, i.e., if schema specified
* but not all column data structures created yet.
+ *
+ * @param numRows number of rows
*/
public void ensureAllocatedColumns(int numRows) {
//early abort if already allocated
@@ -315,67 +279,40 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* Checks for matching column sizes in case of existing columns.
*
- * @param newlen
+ * @param newlen number of rows to compare with existing number of rows
*/
public void ensureColumnCompatibility(int newlen) {
if( _coldata!=null && _coldata.length > 0 && _numRows != newlen )
throw new RuntimeException("Mismatch in number of rows: "+newlen+" (expected: "+_numRows+")");
}
-
- /**
- *
- * @param size
- * @return
- */
+
public static String[] createColNames(int size) {
return createColNames(0, size);
}
-
- /**
- *
- * @param size
- * @return
- */
+
public static String[] createColNames(int off, int size) {
String[] ret = new String[size];
for( int i=off+1; i<=off+size; i++ )
ret[i-off-1] = createColName(i);
return ret;
}
-
- /**
- *
- * @param i
- * @return
- */
+
public static String createColName(int i) {
return "C" + i;
}
-
- /**
- *
- * @return
- */
+
public boolean isColNamesDefault() {
boolean ret = (_colnames != null);
for( int j=0; j<getNumColumns() && ret; j++ )
ret &= isColNameDefault(j);
return ret;
}
-
- /**
- *
- * @param i
- * @return
- */
+
public boolean isColNameDefault(int i) {
return _colnames==null
|| _colnames[i].equals("C"+(i+1));
}
-
- /**
- *
- */
+
public void recomputeColumnCardinality() {
for( int j=0; j<getNumColumns(); j++ ) {
int card = 0;
@@ -393,7 +330,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
*
* @param r row index, 0-based
* @param c column index, 0-based
- * @return
+ * @return object of the value at specified position
*/
public Object get(int r, int c) {
return _coldata[c].get(r);
@@ -403,19 +340,14 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Sets the value in position (r,c), where the input is assumed
* to be a boxed object consistent with the schema definition.
*
- * @param r
- * @param c
- * @param val
+ * @param r row index
+ * @param c column index
+ * @param val value to set at specified position
*/
public void set(int r, int c, Object val) {
_coldata[c].set(r, UtilFunctions.objectToObject(_schema[c], val));
}
- /**
- *
- * @param nrow
- * @param clearMeta
- */
public void reset(int nrow, boolean clearMeta) {
if( clearMeta ) {
_schema = null;
@@ -432,9 +364,6 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
}
}
- /**
- *
- */
public void reset() {
reset(0, true);
}
@@ -444,7 +373,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Append a row to the end of the data frame, where all row fields
* are boxed objects according to the schema.
*
- * @param row
+ * @param row array of objects
*/
public void appendRow(Object[] row) {
ensureAllocatedColumns(0);
@@ -457,7 +386,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Append a row to the end of the data frame, where all row fields
* are string encoded.
*
- * @param row
+ * @param row array of strings
*/
public void appendRow(String[] row) {
ensureAllocatedColumns(0);
@@ -471,7 +400,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* the data frame. The given array is wrapped but not copied
* and hence might be updated in the future.
*
- * @param col
+ * @param col array of strings
*/
public void appendColumn(String[] col) {
ensureColumnCompatibility(col.length);
@@ -488,7 +417,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* the data frame. The given array is wrapped but not copied
* and hence might be updated in the future.
*
- * @param col
+ * @param col array of booleans
*/
public void appendColumn(boolean[] col) {
ensureColumnCompatibility(col.length);
@@ -505,7 +434,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* the data frame. The given array is wrapped but not copied
* and hence might be updated in the future.
*
- * @param col
+ * @param col array of longs
*/
public void appendColumn(long[] col) {
ensureColumnCompatibility(col.length);
@@ -522,7 +451,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* the data frame. The given array is wrapped but not copied
* and hence might be updated in the future.
*
- * @param col
+ * @param col array of doubles
*/
public void appendColumn(double[] col) {
ensureColumnCompatibility(col.length);
@@ -539,7 +468,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* in order to avoid repeated allocation with appendColumns. The given
* array is wrapped but not copied and hence might be updated in the future.
*
- * @param cols
+ * @param cols 2d array of doubles
*/
public void appendColumns(double[][] cols) {
int ncol = cols.length;
@@ -554,12 +483,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
_coldata = empty ? tmpData : ArrayUtils.addAll(_coldata, tmpData);
_numRows = cols[0].length;
}
-
- /**
- *
- * @param c
- * @return
- */
+
public Object getColumn(int c) {
switch(_schema[c]) {
case STRING: return ((StringArray)_coldata[c])._data;
@@ -574,7 +498,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Get a row iterator over the frame where all fields are encoded
* as strings independent of their value types.
*
- * @return
+ * @return string array iterator
*/
public Iterator<String[]> getStringRowIterator() {
return new StringRowIterator(0, _numRows);
@@ -584,9 +508,9 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Get a row iterator over the frame where all fields are encoded
* as strings independent of their value types.
*
- * @param rl
- * @param ru
- * @return
+ * @param rl lower row index
+ * @param ru upper row index
+ * @return string array iterator
*/
public Iterator<String[]> getStringRowIterator(int rl, int ru) {
return new StringRowIterator(rl, ru);
@@ -596,7 +520,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Get a row iterator over the frame where all fields are encoded
* as boxed objects according to their value types.
*
- * @return
+ * @return object array iterator
*/
public Iterator<Object[]> getObjectRowIterator() {
return new ObjectRowIterator(0, _numRows);
@@ -606,9 +530,9 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* Get a row iterator over the frame where all fields are encoded
* as boxed objects according to their value types.
*
- * @param rl
- * @param ru
- * @return
+ * @param rl lower row index
+ * @param ru upper row index
+ * @return object array iterator
*/
public Iterator<Object[]> getObjectRowIterator(int rl, int ru) {
return new ObjectRowIterator(rl, ru);
@@ -781,8 +705,8 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* Returns the in-memory size in bytes of the given string value.
*
- * @param value
- * @return
+ * @param value string value
+ * @return in-memory size of string value
*/
private long getInMemoryStringSize(String value) {
if( value == null )
@@ -801,17 +725,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
(int)ixrange.rowStart, (int)ixrange.rowEnd,
(int)ixrange.colStart, (int)ixrange.colEnd, ret);
}
-
- /**
- *
- * @param rhsFrame
- * @param rl
- * @param ru
- * @param cl
- * @param cu
- * @param ret
- * @return
- */
+
public FrameBlock leftIndexingOperations(FrameBlock rhsFrame, int rl, int ru, int cl, int cu, FrameBlock ret)
throws DMLRuntimeException
{
@@ -849,14 +763,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return ret;
}
-
- /**
- *
- * @param ixrange
- * @param ret
- * @return
- * @throws DMLRuntimeException
- */
+
public FrameBlock sliceOperations(IndexRange ixrange, FrameBlock ret)
throws DMLRuntimeException
{
@@ -873,8 +780,9 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* @param ru row upper index, inclusive, 0-based
* @param cl column lower index, inclusive, 0-based
* @param cu column upper index, inclusive, 0-based
- * @param ret
- * @return
+ * @param retCache cache block
+ * @return frame block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public FrameBlock sliceOperations(int rl, int ru, int cl, int cu, CacheBlock retCache)
throws DMLRuntimeException
@@ -961,10 +869,11 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
* are appended column-wise (same number of rows), while for rbind the
* frames are appended row-wise (same number of columns).
*
- * @param that
- * @param ret
- * @param cbind
- * @return
+ * @param that frame block to append to current frame block
+ * @param ret frame block to return, can be null
+ * @param cbind if true, column append
+ * @return frame block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public FrameBlock appendOperations( FrameBlock that, FrameBlock ret, boolean cbind )
throws DMLRuntimeException
@@ -1018,24 +927,11 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return ret;
}
-
- /**
- *
- * @param src
- * @throws DMLRuntimeException
- */
+
public void copy(FrameBlock src) {
copy(0, src.getNumRows()-1, 0, src.getNumColumns()-1, src);
}
- /**
- *
- * @param rl
- * @param ru
- * @param cl
- * @param cu
- * @param src
- */
public void copy(int rl, int ru, int cl, int cu, FrameBlock src)
{
//allocate columns if necessary
@@ -1106,12 +1002,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
{
merge((FrameBlock)that);
}
-
- /**
- *
- * @param that
- * @throws DMLRuntimeException
- */
+
public void merge(FrameBlock that)
throws DMLRuntimeException
{
@@ -1151,15 +1042,15 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
/**
* This function ZERO OUT the data in the slicing window applicable for this block.
*
- *
- * @param result
- * @param range
- * @param complementary
- * @param iRowStartSrc
- * @param iRowStartDest
- * @param brlen
- * @param iMaxRowsToCopy
- *
+ * @param result frame block
+ * @param range index range
+ * @param complementary ?
+ * @param iRowStartSrc ?
+ * @param iRowStartDest ?
+ * @param brlen ?
+ * @param iMaxRowsToCopy ?
+ * @return frame block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public FrameBlock zeroOutOperations(FrameBlock result, IndexRange range, boolean complementary, int iRowStartSrc, int iRowStartDest, int brlen, int iMaxRowsToCopy)
throws DMLRuntimeException
@@ -1209,10 +1100,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
///////
// row iterators (over strings and boxed objects)
-
- /**
- *
- */
+
private abstract class RowIterator<T> implements Iterator<T[]> {
protected T[] _curRow = null;
protected int _curPos = -1;
@@ -1236,10 +1124,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
protected abstract T[] createRow(int size);
}
-
- /**
- *
- */
+
private class StringRowIterator extends RowIterator<String> {
public StringRowIterator(int rl, int ru) {
super(rl, ru);
@@ -1260,11 +1145,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return _curRow;
}
}
-
-
- /**
- *
- */
+
private class ObjectRowIterator extends RowIterator<Object> {
public ObjectRowIterator(int rl, int ru) {
super(rl, ru);
@@ -1307,10 +1188,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
public abstract Array clone();
public abstract Array slice(int rl, int ru);
}
-
- /**
- *
- */
+
private static class StringArray extends Array<String> {
private String[] _data = null;
@@ -1359,10 +1237,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return new StringArray(Arrays.copyOfRange(_data,rl,ru+1));
}
}
-
- /**
- *
- */
+
private static class BooleanArray extends Array<Boolean> {
private boolean[] _data = null;
@@ -1412,10 +1287,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return new BooleanArray(Arrays.copyOfRange(_data,rl,ru+1));
}
}
-
- /**
- *
- */
+
private static class LongArray extends Array<Long> {
private long[] _data = null;
@@ -1465,10 +1337,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return new LongArray(Arrays.copyOfRange(_data,rl,ru+1));
}
}
-
- /**
- *
- */
+
private static class DoubleArray extends Array<Double> {
private double[] _data = null;
@@ -1518,10 +1387,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
return new DoubleArray(Arrays.copyOfRange(_data,rl,ru+1));
}
}
-
- /**
- *
- */
+
public static class ColumnMetadata implements Serializable {
private static final long serialVersionUID = -90094082422100311L;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java b/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
index a80ca34..248a997 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
@@ -134,12 +134,7 @@ public class InputInfo implements Serializable
return CSVInputInfo;
return null;
}
-
- /**
- *
- * @param str
- * @return
- */
+
public static InputInfo stringExternalToInputInfo(String str) {
if( DataExpression.FORMAT_TYPE_VALUE_TEXT.equals(str) )
return InputInfo.TextCellInputInfo;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
index cb163f8..600e73a 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
@@ -89,10 +89,10 @@ public class LibCommonsMath
/**
* Function to solve a given system of equations.
*
- * @param in1
- * @param in2
- * @return
- * @throws DMLRuntimeException
+ * @param in1 matrix object 1
+ * @param in2 matrix object 2
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static MatrixBlock computeSolve(MatrixObject in1, MatrixObject in2)
throws DMLRuntimeException
@@ -116,9 +116,9 @@ public class LibCommonsMath
/**
* Function to perform QR decomposition on a given matrix.
*
- * @param in
- * @return
- * @throws DMLRuntimeException
+ * @param in matrix object
+ * @return array of matrix blocks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static MatrixBlock[] computeQR(MatrixObject in)
throws DMLRuntimeException
@@ -140,9 +140,9 @@ public class LibCommonsMath
/**
* Function to perform LU decomposition on a given matrix.
*
- * @param in
- * @return
- * @throws DMLRuntimeException
+ * @param in matrix object
+ * @return array of matrix blocks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static MatrixBlock[] computeLU(MatrixObject in)
throws DMLRuntimeException
@@ -171,9 +171,9 @@ public class LibCommonsMath
* Function to perform Eigen decomposition on a given matrix.
* Input must be a symmetric matrix.
*
- * @param in
- * @return
- * @throws DMLRuntimeException
+ * @param in matrix object
+ * @return array of matrix blocks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static MatrixBlock[] computeEigen(MatrixObject in)
throws DMLRuntimeException
@@ -220,9 +220,9 @@ public class LibCommonsMath
/**
* Function to compute matrix inverse via matrix decomposition.
*
- * @param in
- * @return
- * @throws DMLRuntimeException
+ * @param in commons-math3 Array2DRowRealMatrix
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static MatrixBlock computeMatrixInverse(Array2DRowRealMatrix in)
throws DMLRuntimeException
@@ -241,9 +241,9 @@ public class LibCommonsMath
* Function to compute Cholesky decomposition of the given input matrix.
* The input must be a real symmetric positive-definite matrix.
*
- * @param in
- * @return
- * @throws DMLRuntimeException
+ * @param in commons-math3 Array2DRowRealMatrix
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static MatrixBlock computeCholesky(Array2DRowRealMatrix in)
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/1164f99b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
index 8709e2a..914480b 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
@@ -113,11 +113,10 @@ public class LibMatrixAgg
* aggVal and aggCorr in dense format in order to allow efficient
* access according to the dense/sparse input.
*
- *
* @param in input matrix
* @param aggVal current aggregate values (in/out)
* @param aggCorr current aggregate correction (in/out)
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static void aggregateBinaryMatrix(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr)
throws DMLRuntimeException
@@ -146,9 +145,10 @@ public class LibMatrixAgg
* Core incremental matrix aggregate (ak+) as used for uack+ and acrk+.
* Embedded correction values.
*
- * @param in
- * @param aggVal
- * @throws DMLRuntimeException
+ * @param in matrix block
+ * @param aggVal aggregate operator
+ * @param aop aggregate operator
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static void aggregateBinaryMatrix(MatrixBlock in, MatrixBlock aggVal, AggregateOperator aop)
throws DMLRuntimeException
@@ -175,15 +175,7 @@ public class LibMatrixAgg
//System.out.println("agg ("+in.rlen+","+in.clen+","+in.getNonZeros()+","+in.sparse+"), ("+naggVal+","+saggVal+") -> " +
// "("+aggVal.getNonZeros()+","+aggVal.isInSparseFormat()+") in "+time.stop()+"ms.");
}
-
- /**
- *
- * @param in
- * @param out
- * @param vFn
- * @param ixFn
- * @throws DMLRuntimeException
- */
+
public static void aggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, AggregateUnaryOperator uaop)
throws DMLRuntimeException
{
@@ -216,15 +208,7 @@ public class LibMatrixAgg
//System.out.println("uagg ("+in.rlen+","+in.clen+","+in.sparse+") in "+time.stop()+"ms.");
}
-
- /**
- *
- * @param in
- * @param out
- * @param uaop
- * @param k
- * @throws DMLRuntimeException
- */
+
public static void aggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, AggregateUnaryOperator uaop, int k)
throws DMLRuntimeException
{
@@ -288,14 +272,7 @@ public class LibMatrixAgg
//System.out.println("uagg k="+k+" ("+in.rlen+","+in.clen+","+in.sparse+") in "+time.stop()+"ms.");
}
-
- /**
- *
- * @param in
- * @param out
- * @param uop
- * @throws DMLRuntimeException
- */
+
public static MatrixBlock cumaggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, UnaryOperator uop)
throws DMLRuntimeException
{
@@ -329,16 +306,7 @@ public class LibMatrixAgg
return out;
}
-
- /**
- *
- * @param in
- * @param out
- * @param uop
- * @param k
- * @return
- * @throws DMLRuntimeException
- */
+
public static MatrixBlock cumaggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, UnaryOperator uop, int k)
throws DMLRuntimeException
{
@@ -419,15 +387,7 @@ public class LibMatrixAgg
return out;
}
-
- /**
- *
- * @param in1
- * @param in2
- * @param in3
- * @param ret
- * @return
- */
+
public static double aggregateTernary(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3)
{
//early abort if any block is empty
@@ -447,11 +407,7 @@ public class LibMatrixAgg
return val;
}
-
- /**
- * @throws DMLRuntimeException
- *
- */
+
public static double aggregateTernary(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, int k)
throws DMLRuntimeException
{
@@ -492,16 +448,6 @@ public class LibMatrixAgg
return val;
}
- /**
- *
- * @param groups
- * @param target
- * @param weights
- * @param result
- * @param numGroups
- * @param op
- * @throws DMLRuntimeException
- */
public static void groupedAggregate(MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, Operator op)
throws DMLRuntimeException
{
@@ -528,18 +474,7 @@ public class LibMatrixAgg
groupedAggregateKahanPlus(groups, target, weights, result, numGroups, aggop, 0, target.clen);
}
}
-
- /**
- *
- * @param groups
- * @param target
- * @param weights
- * @param result
- * @param numGroups
- * @param op
- * @param k
- * @throws DMLRuntimeException
- */
+
public static void groupedAggregate(MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, Operator op, int k)
throws DMLRuntimeException
{
@@ -577,12 +512,7 @@ public class LibMatrixAgg
result.recomputeNonZeros();
result.examSparsity();
}
-
- /**
- *
- * @param op
- * @return
- */
+
public static boolean isSupportedUnaryAggregateOperator( AggregateUnaryOperator op )
{
AggType type = getAggType( op );
@@ -599,11 +529,11 @@ public class LibMatrixAgg
* Recompute outputs (e.g., maxindex or minindex) according to block indexes from MR.
* TODO: this should not be part of block operations but of the MR instruction.
*
- * @param out
- * @param op
- * @param brlen
- * @param bclen
- * @param ix
+ * @param out matrix block
+ * @param op aggregate unary operator
+ * @param brlen number of rows in a block
+ * @param bclen number of columns in a block
+ * @param ix matrix indexes
*/
public static void recomputeIndexes( MatrixBlock out, AggregateUnaryOperator op, int brlen, int bclen, MatrixIndexes ix )
{
@@ -616,12 +546,7 @@ public class LibMatrixAgg
c[cix] = UtilFunctions.computeCellIndex(ix.getColumnIndex(), bclen, (int)c[cix]-1);
}
}
-
- /**
- *
- * @param op
- * @return
- */
+
private static AggType getAggType( AggregateUnaryOperator op )
{
ValueFunction vfn = op.aggOp.increOp.fn;
@@ -678,12 +603,7 @@ public class LibMatrixAgg
return AggType.INVALID;
}
-
- /**
- *
- * @param op
- * @return
- */
+
private static AggType getAggType( UnaryOperator op )
{
ValueFunction vfn = op.fn;
@@ -703,13 +623,7 @@ public class LibMatrixAgg
return AggType.INVALID;
}
-
- /**
- *
- * @param aop
- * @return
- * @throws DMLRuntimeException
- */
+
private static void aggregateFinalResult( AggregateOperator aop, MatrixBlock out, MatrixBlock partout )
throws DMLRuntimeException
{
@@ -728,15 +642,6 @@ public class LibMatrixAgg
out.binaryOperationsInPlace(laop.increOp, partout);
}
- /**
- *
- * @param in1
- * @param in2
- * @param in3
- * @param rl
- * @param ru
- * @return
- */
private static double aggregateTernaryDense(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, int rl, int ru)
{
//compute block operations
@@ -768,16 +673,7 @@ public class LibMatrixAgg
return kbuff._sum;
}
-
- /**
- *
- * @param in1
- * @param in2
- * @param in3
- * @param rl
- * @param ru
- * @return
- */
+
private static double aggregateTernaryGeneric(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, int rl, int ru)
{
//compute block operations
@@ -827,10 +723,15 @@ public class LibMatrixAgg
* stability. In contrast to other functions of aggregate, this implementation supports row and column
* vectors for target and exploits sparse representations since KahanPlus is sparse-safe.
*
- * @param target
- * @param weights
- * @param op
- * @throws DMLRuntimeException
+ * @param groups matrix block groups
+ * @param target matrix block target
+ * @param weights matrix block weights
+ * @param result matrix block result
+ * @param numGroups number of groups
+ * @param aggop aggregate operator
+ * @param cl column lower index
+ * @param cu column upper index
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void groupedAggregateKahanPlus( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, AggregateOperator aggop, int cl, int cu )
throws DMLRuntimeException
@@ -950,14 +851,6 @@ public class LibMatrixAgg
result.appendValue(i, j+cl, buffer[i][j]._sum);
}
- /**
- *
- * @param target
- * @param weights
- * @param result
- * @param cmOp
- * @throws DMLRuntimeException
- */
private static void groupedAggregateCM( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, CMOperator cmOp, int cl, int cu )
throws DMLRuntimeException
{
@@ -1028,14 +921,7 @@ public class LibMatrixAgg
result.appendValue(i, j, cmValues[i][j+cl].getRequiredResult(cmOp));
}
}
-
- /**
- *
- * @param groups
- * @param result
- * @param numGroups
- * @throws DMLRuntimeException
- */
+
private static void groupedAggregateVecCount( MatrixBlock groups, MatrixBlock result, int numGroups )
throws DMLRuntimeException
{
@@ -1060,14 +946,7 @@ public class LibMatrixAgg
result.appendValue(i, 0, tmp[i]);
}
}
-
- /**
- *
- * @param in
- * @param aggVal
- * @param aggCorr
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixAllDense(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr)
throws DMLRuntimeException
{
@@ -1105,13 +984,6 @@ public class LibMatrixAgg
aggCorr.nonZeros = nnzCC;
}
- /**
- *
- * @param in
- * @param aggVal
- * @param aggCorr
- * @throws DMLRuntimeException
- */
private static void aggregateBinaryMatrixSparseDense(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr)
throws DMLRuntimeException
{
@@ -1157,14 +1029,7 @@ public class LibMatrixAgg
aggVal.recomputeNonZeros();
aggCorr.recomputeNonZeros();
}
-
- /**
- *
- * @param in
- * @param aggVal
- * @param aggCorr
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixSparseGeneric(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr)
throws DMLRuntimeException
{
@@ -1204,15 +1069,7 @@ public class LibMatrixAgg
aggVal.examSparsity();
aggCorr.examSparsity();
}
-
-
- /**
- *
- * @param in
- * @param aggVal
- * @param aggCorr
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixDenseGeneric(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr)
throws DMLRuntimeException
{
@@ -1242,13 +1099,7 @@ public class LibMatrixAgg
aggVal.examSparsity();
aggCorr.examSparsity();
}
-
- /**
- *
- * @param in
- * @param aggVal
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixLastRowDenseGeneric(MatrixBlock in, MatrixBlock aggVal)
throws DMLRuntimeException
{
@@ -1278,13 +1129,7 @@ public class LibMatrixAgg
//note: nnz of aggVal maintained internally
aggVal.examSparsity();
}
-
- /**
- *
- * @param in
- * @param aggVal
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixLastRowSparseGeneric(MatrixBlock in, MatrixBlock aggVal)
throws DMLRuntimeException
{
@@ -1325,13 +1170,7 @@ public class LibMatrixAgg
//note: nnz of aggVal/aggCorr maintained internally
aggVal.examSparsity();
}
-
- /**
- *
- * @param in
- * @param aggVal
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixLastColDenseGeneric(MatrixBlock in, MatrixBlock aggVal)
throws DMLRuntimeException
{
@@ -1360,13 +1199,7 @@ public class LibMatrixAgg
//note: nnz of aggVal maintained internally
aggVal.examSparsity();
}
-
- /**
- *
- * @param in
- * @param aggVal
- * @throws DMLRuntimeException
- */
+
private static void aggregateBinaryMatrixLastColSparseGeneric(MatrixBlock in, MatrixBlock aggVal)
throws DMLRuntimeException
{
@@ -1408,15 +1241,7 @@ public class LibMatrixAgg
//note: nnz of aggVal/aggCorr maintained internally
aggVal.examSparsity();
}
-
- /**
- *
- * @param in
- * @param out
- * @param vFn
- * @param ixFn
- * @throws DMLRuntimeException
- */
+
private static void aggregateUnaryMatrixDense(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, IndexFunction ixFn, int rl, int ru)
throws DMLRuntimeException
{
@@ -1538,15 +1363,7 @@ public class LibMatrixAgg
throw new DMLRuntimeException("Unsupported aggregation type: "+optype);
}
}
-
- /**
- *
- * @param in
- * @param out
- * @param vFn
- * @param ixFn
- * @throws DMLRuntimeException
- */
+
private static void aggregateUnaryMatrixSparse(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, IndexFunction ixFn, int rl, int ru)
throws DMLRuntimeException
{
@@ -1667,18 +1484,7 @@ public class LibMatrixAgg
throw new DMLRuntimeException("Unsupported aggregation type: "+optype);
}
}
-
- /**
- *
- * @param in
- * @param out
- * @param optype
- * @param vFn
- * @param agg
- * @param rl
- * @param ru
- * @throws DMLRuntimeException
- */
+
private static void cumaggregateUnaryMatrixDense(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, double[] agg, int rl, int ru)
throws DMLRuntimeException
{
@@ -1714,18 +1520,7 @@ public class LibMatrixAgg
throw new DMLRuntimeException("Unsupported cumulative aggregation type: "+optype);
}
}
-
- /**
- *
- * @param in
- * @param out
- * @param optype
- * @param vFn
- * @param ixFn
- * @param rl
- * @param ru
- * @throws DMLRuntimeException
- */
+
private static void cumaggregateUnaryMatrixSparse(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, double[] agg, int rl, int ru)
throws DMLRuntimeException
{
@@ -1762,14 +1557,6 @@ public class LibMatrixAgg
}
}
- /**
- *
- * @param in
- * @param out
- * @param optype
- * @param ixFn
- * @throws DMLRuntimeException
- */
private static MatrixBlock aggregateUnaryMatrixEmpty(MatrixBlock in, MatrixBlock out, AggType optype, IndexFunction ixFn)
throws DMLRuntimeException
{
@@ -1843,12 +1630,14 @@ public class LibMatrixAgg
/**
* SUM, opcode: uak+, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uakp( double[] a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -1861,12 +1650,14 @@ public class LibMatrixAgg
/**
* ROWSUM, opcode: uark+, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uarkp( double[] a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -1882,12 +1673,14 @@ public class LibMatrixAgg
/**
* COLSUM, opcode: uack+, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uackp( double[] a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -1972,12 +1765,15 @@ public class LibMatrixAgg
/**
* CUMSUM, opcode: ucumk+, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param agg ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_ucumkp( double[] a, double[] agg, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -1996,12 +1792,13 @@ public class LibMatrixAgg
/**
* CUMPROD, opcode: ucum*, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param agg ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_ucumm( double[] a, double[] agg, double[] c, int m, int n, int rl, int ru )
{
@@ -2020,11 +1817,15 @@ public class LibMatrixAgg
/**
* CUMMIN/CUMMAX, opcode: ucummin/ucummax, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param builtin
+ * @param a ?
+ * @param agg ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_ucummxx( double[] a, double[] agg, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2042,12 +1843,14 @@ public class LibMatrixAgg
/**
* TRACE, opcode: uaktrace
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl ?
+ * @param ru ?
*/
private static void d_uakptrace( double[] a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -2061,12 +1864,14 @@ public class LibMatrixAgg
/**
* MIN/MAX, opcode: uamin/uamax, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uamxx( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2077,11 +1882,14 @@ public class LibMatrixAgg
/**
* ROWMIN/ROWMAX, opcode: uarmin/uarmax, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uarmxx( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2092,11 +1900,14 @@ public class LibMatrixAgg
/**
* COLMIN/COLMAX, opcode: uacmin/uacmax, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uacmxx( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2111,12 +1922,14 @@ public class LibMatrixAgg
/**
* ROWINDEXMAX, opcode: uarimax, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uarimxx( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2131,12 +1944,14 @@ public class LibMatrixAgg
/**
* ROWINDEXMIN, opcode: uarimin, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uarimin( double[] a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2151,12 +1966,14 @@ public class LibMatrixAgg
/**
* MEAN, opcode: uamean, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kmean ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uamean( double[] a, double[] c, int m, int n, KahanObject kbuff, Mean kmean, int rl, int ru )
{
@@ -2170,12 +1987,14 @@ public class LibMatrixAgg
/**
* ROWMEAN, opcode: uarmean, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kmean ?
+ * @param rl ?
+ * @param ru ?
*/
private static void d_uarmean( double[] a, double[] c, int m, int n, KahanObject kbuff, Mean kmean, int rl, int ru )
{
@@ -2192,11 +2011,14 @@ public class LibMatrixAgg
/**
* COLMEAN, opcode: uacmean, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kmean ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uacmean( double[] a, double[] c, int m, int n, KahanObject kbuff, Mean kmean, int rl, int ru )
{
@@ -2219,6 +2041,7 @@ public class LibMatrixAgg
* calculation.
* @param rl Lower row limit.
* @param ru Upper row limit.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void d_uavar(double[] a, double[] c, int m, int n, CM_COV_Object cbuff, CM cm,
int rl, int ru) throws DMLRuntimeException
@@ -2248,6 +2071,7 @@ public class LibMatrixAgg
* calculation.
* @param rl Lower row limit.
* @param ru Upper row limit.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void d_uarvar(double[] a, double[] c, int m, int n, CM_COV_Object cbuff, CM cm,
int rl, int ru) throws DMLRuntimeException
@@ -2280,6 +2104,7 @@ public class LibMatrixAgg
* calculation.
* @param rl Lower row limit.
* @param ru Upper row limit.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void d_uacvar(double[] a, double[] c, int m, int n, CM_COV_Object cbuff, CM cm,
int rl, int ru) throws DMLRuntimeException
@@ -2292,10 +2117,12 @@ public class LibMatrixAgg
/**
* PROD, opcode: ua*, dense input.
*
- * @param a
- * @param c
- * @param m
- * @param n
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void d_uam( double[] a, double[] c, int m, int n, int rl, int ru )
{
@@ -2307,12 +2134,14 @@ public class LibMatrixAgg
/**
* SUM, opcode: uak+, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uakp( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -2332,12 +2161,14 @@ public class LibMatrixAgg
/**
* ROWSUM, opcode: uark+, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uarkp( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -2354,12 +2185,14 @@ public class LibMatrixAgg
/**
* COLSUM, opcode: uack+, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uackp( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -2470,12 +2303,15 @@ public class LibMatrixAgg
/**
* CUMSUM, opcode: ucumk+, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param agg ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_ucumkp( SparseBlock a, double[] agg, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -2497,10 +2333,13 @@ public class LibMatrixAgg
/**
* CUMPROD, opcode: ucum*, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
+ * @param a ?
+ * @param agg ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_ucumm( SparseBlock a, double[] agg, double[] c, int m, int n, int rl, int ru )
{
@@ -2539,12 +2378,15 @@ public class LibMatrixAgg
/**
* CUMMIN/CUMMAX, opcode: ucummin/ucummax, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param agg ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_ucummxx( SparseBlock a, double[] agg, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2582,12 +2424,14 @@ public class LibMatrixAgg
/**
* TRACE, opcode: uaktrace, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uakptrace( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, KahanPlus kplus, int rl, int ru )
{
@@ -2602,12 +2446,14 @@ public class LibMatrixAgg
/**
* MIN/MAX, opcode: uamin/uamax, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uamxx( SparseBlock a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2638,12 +2484,14 @@ public class LibMatrixAgg
/**
* ROWMIN/ROWMAX, opcode: uarmin/uarmax, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uarmxx( SparseBlock a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2664,12 +2512,14 @@ public class LibMatrixAgg
/**
* COLMIN/COLMAX, opcode: uacmin/uacmax, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uacmxx( SparseBlock a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2710,12 +2560,14 @@ public class LibMatrixAgg
/**
* ROWINDEXMAX, opcode: uarimax, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uarimxx( SparseBlock a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2753,12 +2605,14 @@ public class LibMatrixAgg
/**
* ROWINDEXMIN, opcode: uarimin, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param builtin
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param init ?
+ * @param builtin ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uarimin( SparseBlock a, double[] c, int m, int n, double init, Builtin builtin, int rl, int ru )
{
@@ -2797,12 +2651,14 @@ public class LibMatrixAgg
/**
* MEAN, opcode: uamean, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kmean ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uamean( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, Mean kmean, int rl, int ru )
{
@@ -2838,12 +2694,14 @@ public class LibMatrixAgg
/**
* ROWMEAN, opcode: uarmean, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kmean ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uarmean( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, Mean kmean, int rl, int ru )
{
@@ -2868,13 +2726,14 @@ public class LibMatrixAgg
/**
* COLMEAN, opcode: uacmean, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
- * @param init
- * @param kbuff
- * @param kplus
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kmean ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uacmean( SparseBlock a, double[] c, int m, int n, KahanObject kbuff, Mean kmean, int rl, int ru )
{
@@ -2918,6 +2777,7 @@ public class LibMatrixAgg
* calculation.
* @param rl Lower row limit.
* @param ru Upper row limit.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void s_uavar(SparseBlock a, double[] c, int m, int n, CM_COV_Object cbuff, CM cm,
int rl, int ru) throws DMLRuntimeException
@@ -2959,6 +2819,7 @@ public class LibMatrixAgg
* calculation.
* @param rl Lower row limit.
* @param ru Upper row limit.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void s_uarvar(SparseBlock a, double[] c, int m, int n, CM_COV_Object cbuff, CM cm,
int rl, int ru) throws DMLRuntimeException
@@ -2999,6 +2860,7 @@ public class LibMatrixAgg
* calculation.
* @param rl Lower row limit.
* @param ru Upper row limit.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void s_uacvar(SparseBlock a, double[] c, int m, int n, CM_COV_Object cbuff, CM cm,
int rl, int ru) throws DMLRuntimeException
@@ -3033,10 +2895,12 @@ public class LibMatrixAgg
/**
* PROD, opcode: ua*, sparse input.
*
- * @param a
- * @param c
- * @param m
- * @param n
+ * @param a ?
+ * @param c ?
+ * @param m ?
+ * @param n ?
+ * @param rl row lower index
+ * @param ru row upper index
*/
private static void s_uam( SparseBlock a, double[] c, int m, int n, int rl, int ru )
{
@@ -3063,6 +2927,12 @@ public class LibMatrixAgg
/**
* Summation using the Kahan summation algorithm with the
* KahanPlus function.
+ *
+ * @param a ?
+ * @param ai ?
+ * @param len ?
+ * @param kbuff ?
+ * @param kplus ?
*/
private static void sum(double[] a, int ai, final int len, KahanObject kbuff, KahanPlus kplus)
{
@@ -3072,6 +2942,14 @@ public class LibMatrixAgg
/**
* Aggregated summation using the Kahan summation algorithm with
* the KahanPlus function.
+ *
+ * @param a ?
+ * @param c ?
+ * @param ai ?
+ * @param ci ?
+ * @param len ?
+ * @param kbuff ?
+ * @param kplus ?
*/
private static void sumAgg(double[] a, double[] c, int ai, int ci, final int len,
KahanObject kbuff, KahanPlus kplus)
@@ -3082,6 +2960,15 @@ public class LibMatrixAgg
/**
* Aggregated summation using the Kahan summation algorithm with
* the KahanPlus function.
+ *
+ * @param a ?
+ * @param c ?
+ * @param aix ?
+ * @param ai ?
+ * @param len ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplus ?
*/
private static void sumAgg(double[] a, double[] c, int[] aix, int ai, final int len, final int n,
KahanObject kbuff, KahanPlus kplus)
@@ -3092,6 +2979,12 @@ public class LibMatrixAgg
/**
* Summation of squared values using the Kahan summation algorithm
* with the KahanPlusSq function.
+ *
+ * @param a ?
+ * @param ai ?
+ * @param len ?
+ * @param kbuff ?
+ * @param kplusSq ?
*/
private static void sumSq(double[] a, int ai, final int len,
KahanObject kbuff, KahanPlusSq kplusSq)
@@ -3102,6 +2995,14 @@ public class LibMatrixAgg
/**
* Aggregated summation of squared values using the Kahan
* summation algorithm with the KahanPlusSq function.
+ *
+ * @param a ?
+ * @param c ?
+ * @param ai ?
+ * @param ci ?
+ * @param len ?
+ * @param kbuff ?
+ * @param kplusSq ?
*/
private static void sumSqAgg(double[] a, double[] c, int ai, int ci, final int len,
KahanObject kbuff, KahanPlusSq kplusSq)
@@ -3112,6 +3013,15 @@ public class LibMatrixAgg
/**
* Aggregated summation of squared values using the Kahan
* summation algorithm with the KahanPlusSq function.
+ *
+ * @param a ?
+ * @param c ?
+ * @param aix ?
+ * @param ai ?
+ * @param len ?
+ * @param n ?
+ * @param kbuff ?
+ * @param kplusSq ?
*/
private static void sumSqAgg(double[] a, double[] c, int[] aix, int ai, final int len, final int n,
KahanObject kbuff, KahanPlusSq kplusSq)
@@ -3173,6 +3083,7 @@ public class LibMatrixAgg
* @param a Array of values to sum.
* @param c Output array to store aggregated sum and correction
* factors.
+ * @param aix ?
* @param ai Array of indices to process for array `a`.
* @param len Number of indices in `ai` to process.
* @param n Number of values per row.
@@ -3192,12 +3103,7 @@ public class LibMatrixAgg
c[aix[i]+n] = kbuff._correction;
}
}
- /**
- *
- * @param a
- * @param len
- * @return
- */
+
private static double product( double[] a, int ai, final int len )
{
double val = 1;
@@ -3219,15 +3125,7 @@ public class LibMatrixAgg
return val;
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param ci
- * @param len
- */
+
private static void productAgg( double[] a, double[] c, int ai, int ci, final int len )
{
//always w/ NAN_AWARENESS: product without early abort;
@@ -3236,15 +3134,7 @@ public class LibMatrixAgg
for( int i=0; i<len; i++, ai++, ci++ )
c[ ci ] *= a[ ai ];
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param ci
- * @param len
- */
+
private static void productAgg( double[] a, double[] c, int[] aix, int ai, int ci, final int len )
{
//always w/ NAN_AWARENESS: product without early abort;
@@ -3253,15 +3143,7 @@ public class LibMatrixAgg
for( int i=ai; i<ai+len; i++ )
c[ ci + aix[i] ] *= a[ i ];
}
-
- /**
- *
- * @param a
- * @param ai
- * @param len
- * @param kbuff
- * @param kplus
- */
+
private static void mean( double[] a, int ai, final int len, int count, KahanObject kbuff, Mean mean )
{
for( int i=0; i<len; i++, ai++, count++ )
@@ -3271,16 +3153,6 @@ public class LibMatrixAgg
}
}
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param ci
- * @param len
- * @param kbuff
- * @param kplus
- */
private static void meanAgg( double[] a, double[] c, int ai, int ci, final int len, KahanObject kbuff, Mean mean )
{
for( int i=0; i<len; i++, ai++, ci++ )
@@ -3294,16 +3166,7 @@ public class LibMatrixAgg
c[ci+2*len] = kbuff._correction;
}
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param len
- * @param kbuff
- * @param kplus
- */
+
private static void meanAgg( double[] a, double[] c, int[] aix, int ai, final int len, final int n, KahanObject kbuff, Mean mean )
{
for( int i=ai; i<ai+len; i++ )
@@ -3328,6 +3191,7 @@ public class LibMatrixAgg
* values for the variance calculation.
* @param cm A CM object of type Variance to perform the variance
* calculation.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void var(double[] a, int ai, final int len, CM_COV_Object cbuff, CM cm)
throws DMLRuntimeException
@@ -3350,6 +3214,7 @@ public class LibMatrixAgg
* values for the variance calculation.
* @param cm A CM object of type Variance to perform the variance
* calculation.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void varAgg(double[] a, double[] c, int ai, int ci, final int len,
CM_COV_Object cbuff, CM cm) throws DMLRuntimeException
@@ -3378,6 +3243,7 @@ public class LibMatrixAgg
* @param a Array of values to sum.
* @param c Output array to store aggregated sum and correction
* factors.
+ * @param aix ?
* @param ai Array of indices to process for array `a`.
* @param len Number of indices in `ai` to process.
* @param n Number of values per row.
@@ -3385,6 +3251,7 @@ public class LibMatrixAgg
* values for the variance calculation.
* @param cm A CM object of type Variance to perform the variance
* calculation.
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void varAgg(double[] a, double[] c, int[] aix, int ai, final int len, final int n,
CM_COV_Object cbuff, CM cm) throws DMLRuntimeException
@@ -3410,13 +3277,13 @@ public class LibMatrixAgg
/**
* Meant for builtin function ops (min, max)
*
- * @param a
- * @param ai
- * @param init
- * @param len
- * @param aggop
- * @return
- * @throws DMLRuntimeException
+ * @param a ?
+ * @param ai?
+ * @param init ?
+ * @param len ?
+ * @param aggop ?
+ * @return result value
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static double builtin( double[] a, int ai, final double init, final int len, Builtin aggop )
{
@@ -3426,44 +3293,19 @@ public class LibMatrixAgg
return val;
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param len
- * @param aggop
- */
+
private static void builtinAgg( double[] a, double[] c, int ai, final int len, Builtin aggop )
{
for( int i=0; i<len; i++, ai++ )
c[ i ] = aggop.execute2( c[ i ], a[ ai ] );
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param len
- * @param aggop
- */
+
private static void builtinAgg( double[] a, double[] c, int[] aix, int ai, final int len, Builtin aggop )
{
for( int i=ai; i<ai+len; i++ )
c[ aix[i] ] = aggop.execute2( c[ aix[i] ], a[ i ] );
}
-
- /**
- *
- * @param a
- * @param ai
- * @param init
- * @param len
- * @param aggop
- * @return
- */
+
private static int indexmax( double[] a, int ai, final double init, final int len, Builtin aggop )
{
double maxval = init;
@@ -3476,16 +3318,7 @@ public class LibMatrixAgg
return maxindex;
}
-
- /**
- *
- * @param a
- * @param ai
- * @param init
- * @param len
- * @param aggop
- * @return
- */
+
private static int indexmin( double[] a, int ai, final double init, final int len, Builtin aggop )
{
double minval = init;
@@ -3498,14 +3331,7 @@ public class LibMatrixAgg
return minindex;
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param len
- */
+
private static void countAgg( double[] a, int[] c, int[] aix, int ai, final int len )
{
final int bn = len%8;
@@ -3555,11 +3381,7 @@ public class LibMatrixAgg
/////////////////////////////////////////////////////////
private static abstract class AggTask implements Callable<Object> {}
-
- /**
- *
- *
- */
+
private static class RowAggTask extends AggTask
{
private MatrixBlock _in = null;
@@ -3591,10 +3413,6 @@ public class LibMatrixAgg
}
}
- /**
- *
- *
- */
private static class PartialAggTask extends AggTask
{
private MatrixBlock _in = null;
@@ -3638,9 +3456,6 @@ public class LibMatrixAgg
}
}
- /**
- *
- */
private static class CumAggTask implements Callable<Long>
{
private MatrixBlock _in = null;
@@ -3676,10 +3491,7 @@ public class LibMatrixAgg
return _ret.recomputeNonZeros(_rl, _ru-1, 0, _ret.getNumColumns()-1);
}
}
-
- /**
- *
- */
+
private static class AggTernaryTask extends AggTask
{
private MatrixBlock _in1 = null;