Interface ColGroupUtils


  • public interface ColGroupUtils
    • 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 operator
        v - The values to use on the left side of the operator
        colIndexes - 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 operator
        v - The values to use on the left side of the operator
        colIndexes - 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 ColumnGroup
        rhs - Right ColumnGroup
        tmpResult - The matrix block to move values from
        result - 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)
      • reorderDefault

        static double[] reorderDefault​(double[] vals,
                                       int[] reordering)