Interface ColGroupUtils
-
public interface ColGroupUtils
-
-
Method Summary
Static Methods Modifier and Type Method Description static void
addMatrixToResult(MatrixBlock tmp, MatrixBlock result, IColIndex colIndexes, int rl, int ru)
static boolean
allZero(double[] in)
static double[]
binaryDefRowLeft(BinaryOperator op, double[] v, IColIndex colIndexes)
Calculate the result of performing the binary operation on an empty row to the left v op emptystatic double[]
binaryDefRowRight(BinaryOperator op, double[] v, IColIndex colIndexes)
Calculate the result of performing the binary operation on an empty row to the right empty op vstatic boolean
containsInfOrNan(double pattern, double[] reference)
static void
copyValuesColGroupMatrixBlocks(AColGroup lhs, AColGroup rhs, MatrixBlock tmpResult, MatrixBlock result)
Copy values from tmpResult into correct positions of result (according to colIndexes in lhs and rhs)static double[]
createReference(int nCol, double val)
static double[]
extractMostCommonValueInColumns(MatrixBlock mb)
static void
outerProduct(double[] leftRowSum, double[] rightColumnSum, double[] result, int rl, int ru)
static void
outerProduct(double[] leftRowSum, double[] rightColumnSum, IColIndex colIdxRight, double[] result, int nColR, int rl, int ru)
static void
outerProduct(double[] leftRowSum, SparseBlock rightColSum, IColIndex colIdxRight, double[] result, int nColR, int rl, int ru)
static double
refSum(double[] reference)
static double
refSumSq(double[] reference)
static double[]
reorderDefault(double[] vals, int[] reordering)
static double[]
unaryOperator(UnaryOperator op, double[] reference)
-
-
-
Method Detail
-
binaryDefRowLeft
static double[] binaryDefRowLeft(BinaryOperator op, double[] v, IColIndex colIndexes)
Calculate the result of performing the binary operation on an empty row to the left v op empty- Parameters:
op
- The operatorv
- The values to use on the left side of the operatorcolIndexes
- The column indexes to extract- Returns:
- The result as a double array.
-
binaryDefRowRight
static double[] binaryDefRowRight(BinaryOperator op, double[] v, IColIndex colIndexes)
Calculate the result of performing the binary operation on an empty row to the right empty op v- Parameters:
op
- The operatorv
- The values to use on the left side of the operatorcolIndexes
- The column indexes to extract- Returns:
- The result as a double array.
-
copyValuesColGroupMatrixBlocks
static void copyValuesColGroupMatrixBlocks(AColGroup lhs, AColGroup rhs, MatrixBlock tmpResult, MatrixBlock result)
Copy values from tmpResult into correct positions of result (according to colIndexes in lhs and rhs)- Parameters:
lhs
- Left ColumnGrouprhs
- Right ColumnGrouptmpResult
- The matrix block to move values fromresult
- The result matrix block to move values to
-
extractMostCommonValueInColumns
static double[] extractMostCommonValueInColumns(MatrixBlock mb)
-
refSum
static double refSum(double[] reference)
-
refSumSq
static double refSumSq(double[] reference)
-
allZero
static boolean allZero(double[] in)
-
containsInfOrNan
static boolean containsInfOrNan(double pattern, double[] reference)
-
createReference
static double[] createReference(int nCol, double val)
-
unaryOperator
static double[] unaryOperator(UnaryOperator op, double[] reference)
-
outerProduct
static void outerProduct(double[] leftRowSum, double[] rightColumnSum, double[] result, int rl, int ru)
-
outerProduct
static void outerProduct(double[] leftRowSum, double[] rightColumnSum, IColIndex colIdxRight, double[] result, int nColR, int rl, int ru)
-
outerProduct
static void outerProduct(double[] leftRowSum, SparseBlock rightColSum, IColIndex colIdxRight, double[] result, int nColR, int rl, int ru)
-
addMatrixToResult
static void addMatrixToResult(MatrixBlock tmp, MatrixBlock result, IColIndex colIndexes, int rl, int ru)
-
reorderDefault
static double[] reorderDefault(double[] vals, int[] reordering)
-
-