test_class.file: core/src/test/java/org/carrot2/math/matrix/MatrixUtilsTest.java
test_class.identifier: MatrixUtilsTest
test_class.superclass: extends TestBase
test_case.body: @Test
    public void testMaxSparseness() {
      final DoubleMatrix2D sparse = new DenseDoubleMatrix2D(2, 2);
      sparse.assign(3);
      assertThat(MatrixUtils.computeSparseness(sparse)).isEqualTo(1);
    }
test_case.class_method_signature: MatrixUtilsTest.testMaxSparseness()
test_case.full_signature: @Test public void testMaxSparseness()
test_case.identifier: testMaxSparseness
test_case.invocations: assign isEqualTo assertThat computeSparseness
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMaxSparseness()
focal_class.file: core/src/main/java/org/carrot2/math/matrix/MatrixUtils.java
focal_class.identifier: MatrixUtils
focal_class.class_method_signature: MatrixUtils.normalizeColumnL2(DoubleMatrix2D A, double[] work)
focal_class.full_signature: public static DoubleMatrix2D normalizeColumnL2(DoubleMatrix2D A, double[] work)
focal_class.identifier: normalizeColumnL2
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A, double[] work)
focal_class.return: DoubleMatrix2D
focal_class.signature: DoubleMatrix2D normalizeColumnL2(DoubleMatrix2D A, double[] work)
focal_class.class_method_signature: MatrixUtils.normalizeSparseColumnL2(
        final DoubleMatrix2D A, final double[] work)
focal_class.full_signature: public static DoubleMatrix2D normalizeSparseColumnL2(
        final DoubleMatrix2D A, final double[] work)
focal_class.identifier: normalizeSparseColumnL2
focal_class.modifiers: public static
focal_class.parameters: (
        final DoubleMatrix2D A, final double[] work)
focal_class.return: DoubleMatrix2D
focal_class.signature: DoubleMatrix2D normalizeSparseColumnL2(
        final DoubleMatrix2D A, final double[] work)
focal_class.class_method_signature: MatrixUtils.normalizeColumnL1(DoubleMatrix2D A, double[] work)
focal_class.full_signature: public static DoubleMatrix2D normalizeColumnL1(DoubleMatrix2D A, double[] work)
focal_class.identifier: normalizeColumnL1
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A, double[] work)
focal_class.return: DoubleMatrix2D
focal_class.signature: DoubleMatrix2D normalizeColumnL1(DoubleMatrix2D A, double[] work)
focal_class.class_method_signature: MatrixUtils.prepareWork(DoubleMatrix2D A, double[] work)
focal_class.full_signature: private static double[] prepareWork(DoubleMatrix2D A, double[] work)
focal_class.identifier: prepareWork
focal_class.modifiers: private static
focal_class.parameters: (DoubleMatrix2D A, double[] work)
focal_class.return: double[]
focal_class.signature: double[] prepareWork(DoubleMatrix2D A, double[] work)
focal_class.class_method_signature: MatrixUtils.normalizeColumns(DoubleMatrix2D A, double[] work)
focal_class.full_signature: private static void normalizeColumns(DoubleMatrix2D A, double[] work)
focal_class.identifier: normalizeColumns
focal_class.modifiers: private static
focal_class.parameters: (DoubleMatrix2D A, double[] work)
focal_class.return: void
focal_class.signature: void normalizeColumns(DoubleMatrix2D A, double[] work)
focal_class.class_method_signature: MatrixUtils.computeOrthogonality(DoubleMatrix2D A)
focal_class.full_signature: public static double computeOrthogonality(DoubleMatrix2D A)
focal_class.identifier: computeOrthogonality
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A)
focal_class.return: double
focal_class.signature: double computeOrthogonality(DoubleMatrix2D A)
focal_class.class_method_signature: MatrixUtils.computeSparseness(DoubleMatrix2D A)
focal_class.full_signature: public static double computeSparseness(DoubleMatrix2D A)
focal_class.identifier: computeSparseness
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A)
focal_class.return: double
focal_class.signature: double computeSparseness(DoubleMatrix2D A)
focal_class.class_method_signature: MatrixUtils.minInColumns(DoubleMatrix2D A, int[] indices, double[] minValues)
focal_class.full_signature: public static int[] minInColumns(DoubleMatrix2D A, int[] indices, double[] minValues)
focal_class.identifier: minInColumns
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A, int[] indices, double[] minValues)
focal_class.return: int[]
focal_class.signature: int[] minInColumns(DoubleMatrix2D A, int[] indices, double[] minValues)
focal_class.class_method_signature: MatrixUtils.maxInColumns(DoubleMatrix2D A, int[] indices, double[] maxValues)
focal_class.full_signature: public static int[] maxInColumns(DoubleMatrix2D A, int[] indices, double[] maxValues)
focal_class.identifier: maxInColumns
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A, int[] indices, double[] maxValues)
focal_class.return: int[]
focal_class.signature: int[] maxInColumns(DoubleMatrix2D A, int[] indices, double[] maxValues)
focal_class.class_method_signature: MatrixUtils.maxInColumns(
        DoubleMatrix2D A, int[] indices, double[] maxValues, DoubleFunction transform)
focal_class.full_signature: public static int[] maxInColumns(
        DoubleMatrix2D A, int[] indices, double[] maxValues, DoubleFunction transform)
focal_class.identifier: maxInColumns
focal_class.modifiers: public static
focal_class.parameters: (
        DoubleMatrix2D A, int[] indices, double[] maxValues, DoubleFunction transform)
focal_class.return: int[]
focal_class.signature: int[] maxInColumns(
        DoubleMatrix2D A, int[] indices, double[] maxValues, DoubleFunction transform)
focal_class.class_method_signature: MatrixUtils.inColumns(
        DoubleMatrix2D A,
        int[] indices,
        double[] extValues,
        DoubleComparator doubleComparator,
        DoubleFunction transform)
focal_class.full_signature: private static int[] inColumns(
        DoubleMatrix2D A,
        int[] indices,
        double[] extValues,
        DoubleComparator doubleComparator,
        DoubleFunction transform)
focal_class.identifier: inColumns
focal_class.modifiers: private static
focal_class.parameters: (
        DoubleMatrix2D A,
        int[] indices,
        double[] extValues,
        DoubleComparator doubleComparator,
        DoubleFunction transform)
focal_class.return: int[]
focal_class.signature: int[] inColumns(
        DoubleMatrix2D A,
        int[] indices,
        double[] extValues,
        DoubleComparator doubleComparator,
        DoubleFunction transform)
focal_class.class_method_signature: MatrixUtils.maxInRow(DoubleMatrix2D A, int row)
focal_class.full_signature: public static int maxInRow(DoubleMatrix2D A, int row)
focal_class.identifier: maxInRow
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A, int row)
focal_class.return: int
focal_class.signature: int maxInRow(DoubleMatrix2D A, int row)
focal_class.class_method_signature: MatrixUtils.sumRows(DoubleMatrix2D A, double[] sums)
focal_class.full_signature: public static double[] sumRows(DoubleMatrix2D A, double[] sums)
focal_class.identifier: sumRows
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D A, double[] sums)
focal_class.return: double[]
focal_class.signature: double[] sumRows(DoubleMatrix2D A, double[] sums)
focal_class.class_method_signature: MatrixUtils.frobeniusNorm(DoubleMatrix2D matrix)
focal_class.full_signature: public static double frobeniusNorm(DoubleMatrix2D matrix)
focal_class.identifier: frobeniusNorm
focal_class.modifiers: public static
focal_class.parameters: (DoubleMatrix2D matrix)
focal_class.return: double
focal_class.signature: double frobeniusNorm(DoubleMatrix2D matrix)
focal_class.class_method_signature: MatrixUtils.sortedRowsView(
        DoubleMatrix2D matrix, IndirectComparator comparator)
focal_class.full_signature: public static DoubleMatrix2D sortedRowsView(
        DoubleMatrix2D matrix, IndirectComparator comparator)
focal_class.identifier: sortedRowsView
focal_class.modifiers: public static
focal_class.parameters: (
        DoubleMatrix2D matrix, IndirectComparator comparator)
focal_class.return: DoubleMatrix2D
focal_class.signature: DoubleMatrix2D sortedRowsView(
        DoubleMatrix2D matrix, IndirectComparator comparator)
focal_method.body: public static double computeSparseness(DoubleMatrix2D A) {
      int count = 0;
  
      for (int r = 0; r < A.rows(); r++) {
        for (int c = 0; c < A.columns(); c++) {
          if (A.getQuick(r, c) != 0) {
            count++;
          }
        }
      }
  
      return count / (double) (A.rows() * A.columns());
    }
focal_method.class_method_signature: MatrixUtils.computeSparseness(DoubleMatrix2D A)
focal_method.full_signature: public static double computeSparseness(DoubleMatrix2D A)
focal_method.identifier: computeSparseness
focal_method.invocations: rows columns getQuick rows columns
focal_method.modifiers: public static
focal_method.parameters: (DoubleMatrix2D A)
focal_method.return: double
focal_method.signature: double computeSparseness(DoubleMatrix2D A)