test_class.file: singa-mathematics/src/test/java/bio/singa/mathematics/matrices/MatricesTest.java
test_class.identifier: MatricesTest
test_case.body: @Test
      void shouldNormalizeMatrix() {
          double[][] values = {{1.0, 2.0, 3.0}, {4.0, 5.0, 5.0}, {7.0, 8.0, 9.0}};
          Matrix matrix = new RegularMatrix(values);
          Matrix normalizedMatrix = Matrices.normalize(matrix);
          assertEquals(0.0, normalizedMatrix.getElement(0, 0), 1E-9);
          assertEquals(1.0, normalizedMatrix.getElement(2, 2), 1E-9);
      }
test_case.class_method_signature: MatricesTest.shouldNormalizeMatrix()
test_case.full_signature: @Test void shouldNormalizeMatrix()
test_case.identifier: shouldNormalizeMatrix
test_case.invocations: normalize assertEquals getElement assertEquals getElement
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNormalizeMatrix()
focal_class.declarator: DEFAULT_CSV_DELIMITER = ","
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_CSV_DELIMITER = ",";
focal_class.type: String
focal_class.var_name: DEFAULT_CSV_DELIMITER
focal_class.file: singa-mathematics/src/main/java/bio/singa/mathematics/matrices/Matrices.java
focal_class.identifier: Matrices
focal_class.class_method_signature: Matrices.Matrices()
focal_class.full_signature: private  Matrices()
focal_class.identifier: Matrices
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Matrices()
focal_class.class_method_signature: Matrices.generateIdentityMatrix(int size)
focal_class.full_signature: public static SquareMatrix generateIdentityMatrix(int size)
focal_class.identifier: generateIdentityMatrix
focal_class.modifiers: public static
focal_class.parameters: (int size)
focal_class.return: SquareMatrix
focal_class.signature: SquareMatrix generateIdentityMatrix(int size)
focal_class.class_method_signature: Matrices.generateMatrixOfOnes(int rowSize, int columnSize)
focal_class.full_signature: public static Matrix generateMatrixOfOnes(int rowSize, int columnSize)
focal_class.identifier: generateMatrixOfOnes
focal_class.modifiers: public static
focal_class.parameters: (int rowSize, int columnSize)
focal_class.return: Matrix
focal_class.signature: Matrix generateMatrixOfOnes(int rowSize, int columnSize)
focal_class.class_method_signature: Matrices.divideIntoColumns(Matrix matrix)
focal_class.full_signature: public static List<Vector> divideIntoColumns(Matrix matrix)
focal_class.identifier: divideIntoColumns
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: List<Vector>
focal_class.signature: List<Vector> divideIntoColumns(Matrix matrix)
focal_class.class_method_signature: Matrices.assembleMatrixFromColumns(List<Vector> columnVectors)
focal_class.full_signature: public static Matrix assembleMatrixFromColumns(List<Vector> columnVectors)
focal_class.identifier: assembleMatrixFromColumns
focal_class.modifiers: public static
focal_class.parameters: (List<Vector> columnVectors)
focal_class.return: Matrix
focal_class.signature: Matrix assembleMatrixFromColumns(List<Vector> columnVectors)
focal_class.class_method_signature: Matrices.divideIntoRows(Matrix matrix)
focal_class.full_signature: public static List<Vector> divideIntoRows(Matrix matrix)
focal_class.identifier: divideIntoRows
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: List<Vector>
focal_class.signature: List<Vector> divideIntoRows(Matrix matrix)
focal_class.class_method_signature: Matrices.assembleMatrixFromRows(List<Vector> rowVectors)
focal_class.full_signature: public static Matrix assembleMatrixFromRows(List<Vector> rowVectors)
focal_class.identifier: assembleMatrixFromRows
focal_class.modifiers: public static
focal_class.parameters: (List<Vector> rowVectors)
focal_class.return: Matrix
focal_class.signature: Matrix assembleMatrixFromRows(List<Vector> rowVectors)
focal_class.class_method_signature: Matrices.getPositionsOfMinimalElement(Matrix matrix)
focal_class.full_signature: public static List<Pair<Integer>> getPositionsOfMinimalElement(Matrix matrix)
focal_class.identifier: getPositionsOfMinimalElement
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: List<Pair<Integer>>
focal_class.signature: List<Pair<Integer>> getPositionsOfMinimalElement(Matrix matrix)
focal_class.class_method_signature: Matrices.getPositionOfMinimalElement(Matrix matrix)
focal_class.full_signature: public static Optional<Pair<Integer>> getPositionOfMinimalElement(Matrix matrix)
focal_class.identifier: getPositionOfMinimalElement
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: Optional<Pair<Integer>>
focal_class.signature: Optional<Pair<Integer>> getPositionOfMinimalElement(Matrix matrix)
focal_class.class_method_signature: Matrices.getPositionsOfMaximalElement(Matrix matrix)
focal_class.full_signature: public static List<Pair<Integer>> getPositionsOfMaximalElement(Matrix matrix)
focal_class.identifier: getPositionsOfMaximalElement
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: List<Pair<Integer>>
focal_class.signature: List<Pair<Integer>> getPositionsOfMaximalElement(Matrix matrix)
focal_class.class_method_signature: Matrices.getPositionOfMaximalElement(Matrix matrix)
focal_class.full_signature: public static Optional<Pair<Integer>> getPositionOfMaximalElement(Matrix matrix)
focal_class.identifier: getPositionOfMaximalElement
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: Optional<Pair<Integer>>
focal_class.signature: Optional<Pair<Integer>> getPositionOfMaximalElement(Matrix matrix)
focal_class.class_method_signature: Matrices.performQRDecomposition(Matrix matrix)
focal_class.full_signature: public static QRDecomposition performQRDecomposition(Matrix matrix)
focal_class.identifier: performQRDecomposition
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: QRDecomposition
focal_class.signature: QRDecomposition performQRDecomposition(Matrix matrix)
focal_class.class_method_signature: Matrices.readLabeledMatrixFromCSV(Stream<String> csvLines, String delimiter)
focal_class.full_signature: public static LabeledMatrix<String> readLabeledMatrixFromCSV(Stream<String> csvLines, String delimiter)
focal_class.identifier: readLabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (Stream<String> csvLines, String delimiter)
focal_class.return: LabeledMatrix<String>
focal_class.signature: LabeledMatrix<String> readLabeledMatrixFromCSV(Stream<String> csvLines, String delimiter)
focal_class.class_method_signature: Matrices.readUnlabeledMatrixFromCSV(Stream<String> csvLines, String delimiter)
focal_class.full_signature: public static Matrix readUnlabeledMatrixFromCSV(Stream<String> csvLines, String delimiter)
focal_class.identifier: readUnlabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (Stream<String> csvLines, String delimiter)
focal_class.return: Matrix
focal_class.signature: Matrix readUnlabeledMatrixFromCSV(Stream<String> csvLines, String delimiter)
focal_class.class_method_signature: Matrices.readLabeledMatrixFromCSV(InputStream inputStream, String delimiter)
focal_class.full_signature: public static LabeledMatrix<String> readLabeledMatrixFromCSV(InputStream inputStream, String delimiter)
focal_class.identifier: readLabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (InputStream inputStream, String delimiter)
focal_class.return: LabeledMatrix<String>
focal_class.signature: LabeledMatrix<String> readLabeledMatrixFromCSV(InputStream inputStream, String delimiter)
focal_class.class_method_signature: Matrices.readLabeledMatrixFromCSV(InputStream inputStream)
focal_class.full_signature: public static LabeledMatrix<String> readLabeledMatrixFromCSV(InputStream inputStream)
focal_class.identifier: readLabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (InputStream inputStream)
focal_class.return: LabeledMatrix<String>
focal_class.signature: LabeledMatrix<String> readLabeledMatrixFromCSV(InputStream inputStream)
focal_class.class_method_signature: Matrices.readLabeledMatrixFromCSV(Path path)
focal_class.full_signature: public static LabeledMatrix<String> readLabeledMatrixFromCSV(Path path)
focal_class.identifier: readLabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (Path path)
focal_class.return: LabeledMatrix<String>
focal_class.signature: LabeledMatrix<String> readLabeledMatrixFromCSV(Path path)
focal_class.class_method_signature: Matrices.readLabeledMatrixFromCSV(Path path, String delimiter)
focal_class.full_signature: public static LabeledMatrix<String> readLabeledMatrixFromCSV(Path path, String delimiter)
focal_class.identifier: readLabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (Path path, String delimiter)
focal_class.return: LabeledMatrix<String>
focal_class.signature: LabeledMatrix<String> readLabeledMatrixFromCSV(Path path, String delimiter)
focal_class.class_method_signature: Matrices.readUnlabeledMatrixFromCSV(Path path, String delimiter)
focal_class.full_signature: public static Matrix readUnlabeledMatrixFromCSV(Path path, String delimiter)
focal_class.identifier: readUnlabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (Path path, String delimiter)
focal_class.return: Matrix
focal_class.signature: Matrix readUnlabeledMatrixFromCSV(Path path, String delimiter)
focal_class.class_method_signature: Matrices.readUnlabeledMatrixFromCSV(Path path)
focal_class.full_signature: public static Matrix readUnlabeledMatrixFromCSV(Path path)
focal_class.identifier: readUnlabeledMatrixFromCSV
focal_class.modifiers: public static
focal_class.parameters: (Path path)
focal_class.return: Matrix
focal_class.signature: Matrix readUnlabeledMatrixFromCSV(Path path)
focal_class.class_method_signature: Matrices.calculateCovarianceMatrix(Matrix a, Matrix b)
focal_class.full_signature: public static Matrix calculateCovarianceMatrix(Matrix a, Matrix b)
focal_class.identifier: calculateCovarianceMatrix
focal_class.modifiers: public static
focal_class.parameters: (Matrix a, Matrix b)
focal_class.return: Matrix
focal_class.signature: Matrix calculateCovarianceMatrix(Matrix a, Matrix b)
focal_class.class_method_signature: Matrices.performSVDecomposition(Matrix matrix)
focal_class.full_signature: public static SVDecomposition performSVDecomposition(Matrix matrix)
focal_class.identifier: performSVDecomposition
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: SVDecomposition
focal_class.signature: SVDecomposition performSVDecomposition(Matrix matrix)
focal_class.class_method_signature: Matrices.normalize(Matrix matrix)
focal_class.full_signature: public static Matrix normalize(Matrix matrix)
focal_class.identifier: normalize
focal_class.modifiers: public static
focal_class.parameters: (Matrix matrix)
focal_class.return: Matrix
focal_class.signature: Matrix normalize(Matrix matrix)
focal_method.body: public static Matrix normalize(Matrix matrix) {
          Pair<Integer> minimalElementPosition = Matrices.getPositionsOfMinimalElement(matrix).get(0);
          double minimalElement = matrix.getElement(minimalElementPosition.getFirst(), minimalElementPosition.getSecond());
          Pair<Integer> maximalElementPosition = Matrices.getPositionsOfMaximalElement(matrix).get(0);
          double maximalElement = matrix.getElement(maximalElementPosition.getFirst(), maximalElementPosition.getSecond());
          double[][] normalizedValues = new double[matrix.getRowDimension()][matrix.getColumnDimension()];
          for (int i = 0; i < matrix.getRowDimension(); i++) {
              for (int j = 0; j < matrix.getColumnDimension(); j++) {
                  normalizedValues[i][j] = (matrix.getElement(i, j) - minimalElement) / (maximalElement - minimalElement);
              }
          }
          return new RegularMatrix(normalizedValues);
      }
focal_method.class_method_signature: Matrices.normalize(Matrix matrix)
focal_method.full_signature: public static Matrix normalize(Matrix matrix)
focal_method.identifier: normalize
focal_method.invocations: get getPositionsOfMinimalElement getElement getFirst getSecond get getPositionsOfMaximalElement getElement getFirst getSecond getRowDimension getColumnDimension getRowDimension getColumnDimension getElement
focal_method.modifiers: public static
focal_method.parameters: (Matrix matrix)
focal_method.return: Matrix
focal_method.signature: Matrix normalize(Matrix matrix)