Documentation of 'jsat.linear.RowColumnOps' Java class
RowColumnOps
jsat.linear

Class RowColumnOps



  • public class RowColumnOps
    extends java.lang.Object
    A collection of mutable Row and Column operations that can be performed on matrices.
    • Constructor Summary

      Constructors 
      Constructor and Description
      RowColumnOps() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void addCol(Matrix A, int j, double c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+ c
      static void addCol(Matrix A, int j, int start, int to, double c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+ c
      static void addDiag(Matrix A, int start, int to, double c)
      Updates the values along the main diagonal of the matrix by adding a constant to them
      static void addMultCol(Matrix A, int j, int start, int to, double t, double[] c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+c[:]*t.
      The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void addMultCol(Matrix A, int j, int start, int to, double t, Vec c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+c[:]*t.
      The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void addMultRow(Matrix A, int i, int start, int to, double t, double[] c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+c[:]*t.
      The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void addMultRow(Matrix A, int i, int start, int to, double t, Vec c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+c[:]*t.
      The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void addRow(Matrix A, int i, double c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+ c
      static void addRow(Matrix A, int i, int start, int to, double c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+ c
      static void divCol(Matrix A, int j, double c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c
      static void divCol(Matrix A, int j, int start, int to, double c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c
      static void divCol(Matrix A, int j, int start, int to, double[] c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c[j].
      The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void divCol(Matrix A, int j, int start, int to, Vec c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c[j].
      The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void divRow(Matrix A, int i, double c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] / c
      static void divRow(Matrix A, int i, int start, int to, double c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] / c
      static void fillCol(Matrix A, int j, int from, int to, double val)
      Fills the values in a column of the matrix
      static void fillRow(Matrix A, int i, int from, int to, double val)
      Fills the values in a row of the matrix
      static void multCol(Matrix A, int j, double c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]* c
      static void multCol(Matrix A, int j, int start, int to, double c)
      Updates the values of column j in the given matrix to be A[:,j] = A[:,j]* c
      static void multRow(Matrix A, int i, double c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] * c
      static void multRow(Matrix A, int i, double[] c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i]
      static void multRow(Matrix A, int i, int start, int to, double c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] * c
      static void multRow(Matrix A, int i, int start, int to, double[] c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i] The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void multRow(Matrix A, int i, int start, int to, Vec c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i] The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void multRow(Matrix A, int i, Vec c)
      Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i] The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
      static void swapCol(Matrix A, int j, int k)
      Swaps the columns j and k in the given matrix.
      static void swapCol(Matrix A, int j, int k, int start, int to)
      Swaps the columns j and k in the given matrix.
      static void swapRow(Matrix A, int j, int k)
      Swaps the columns j and k in the given matrix.
      static void swapRow(Matrix A, int j, int k, int start, int to)
      Swaps the rows j and k in the given matrix.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RowColumnOps

        public RowColumnOps()
    • Method Detail

      • addDiag

        public static void addDiag(Matrix A,
                                   int start,
                                   int to,
                                   double c)
        Updates the values along the main diagonal of the matrix by adding a constant to them
        Parameters:
        A - the matrix to perform the update on
        start - the first index of the diagonals to update (inclusive)
        to - the last index of the diagonals to update (exclusive)
        c - the constant to add to the diagonal
      • addRow

        public static void addRow(Matrix A,
                                  int i,
                                  int start,
                                  int to,
                                  double c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+ c
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the constant to add to each element
      • addRow

        public static void addRow(Matrix A,
                                  int i,
                                  double c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+ c
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        c - the constant to add to each element
      • multRow

        public static void multRow(Matrix A,
                                   int i,
                                   int start,
                                   int to,
                                   double c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] * c
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the constant to multiply each element by
      • multRow

        public static void multRow(Matrix A,
                                   int i,
                                   double c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] * c
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        c - the constant to multiply each element by
      • multRow

        public static void multRow(Matrix A,
                                   int i,
                                   int start,
                                   int to,
                                   Vec c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i] The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the vector of values to multiple the elements of A by
      • multRow

        public static void multRow(Matrix A,
                                   int i,
                                   Vec c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i] The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        c - the vector of values to multiple the elements of A by
      • multRow

        public static void multRow(Matrix A,
                                   int i,
                                   int start,
                                   int to,
                                   double[] c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i] The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the array of values to multiple the elements of A by
      • multRow

        public static void multRow(Matrix A,
                                   int i,
                                   double[] c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i]
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        c - the array of values to multiple the elements of A by
      • divRow

        public static void divRow(Matrix A,
                                  int i,
                                  int start,
                                  int to,
                                  double c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] / c
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the constant to divide each element by
      • divRow

        public static void divRow(Matrix A,
                                  int i,
                                  double c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:] / c
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        c - the constant to divide each element by
      • addCol

        public static void addCol(Matrix A,
                                  int j,
                                  int start,
                                  int to,
                                  double c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+ c
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the constant to add to each element
      • addCol

        public static void addCol(Matrix A,
                                  int j,
                                  double c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+ c
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        c - the constant to add to each element
      • multCol

        public static void multCol(Matrix A,
                                   int j,
                                   int start,
                                   int to,
                                   double c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]* c
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the constant to multiply each element by
      • multCol

        public static void multCol(Matrix A,
                                   int j,
                                   double c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]* c
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        c - the constant to multiply each element by
      • divCol

        public static void divCol(Matrix A,
                                  int j,
                                  int start,
                                  int to,
                                  double c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the constant to divide each element by
      • divCol

        public static void divCol(Matrix A,
                                  int j,
                                  double c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        c - the constant to divide each element by
      • divCol

        public static void divCol(Matrix A,
                                  int j,
                                  int start,
                                  int to,
                                  Vec c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c[j].
        The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the vector of values to pairwise divide the elements of A by
      • divCol

        public static void divCol(Matrix A,
                                  int j,
                                  int start,
                                  int to,
                                  double[] c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c[j].
        The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        c - the array of values to pairwise divide the elements of A by
      • addMultRow

        public static void addMultRow(Matrix A,
                                      int i,
                                      int start,
                                      int to,
                                      double t,
                                      double[] c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+c[:]*t.
        The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the column to update from (inclusive)
        to - the last index of the column to update (exclusive)
        t - the constant to multiply all elements of c by
        c - the array of values to pairwise multiply by t before adding to the elements of A
      • addMultRow

        public static void addMultRow(Matrix A,
                                      int i,
                                      int start,
                                      int to,
                                      double t,
                                      Vec c)
        Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+c[:]*t.
        The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        i - the row to update
        start - the first index of the column to update from (inclusive)
        to - the last index of the column to update (exclusive)
        t - the constant to multiply all elements of c by
        c - the array of values to pairwise multiply by t before adding to the elements of A
      • addMultCol

        public static void addMultCol(Matrix A,
                                      int j,
                                      int start,
                                      int to,
                                      double t,
                                      double[] c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+c[:]*t.
        The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        t - the constant to multiply all elements of c by
        c - the array of values to pairwise multiply by t before adding to the elements of A
      • addMultCol

        public static void addMultCol(Matrix A,
                                      int j,
                                      int start,
                                      int to,
                                      double t,
                                      Vec c)
        Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+c[:]*t.
        The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range.
        Parameters:
        A - the matrix to perform he update on
        j - the row to update
        start - the first index of the row to update from (inclusive)
        to - the last index of the row to update (exclusive)
        t - the constant to multiply all elements of c by
        c - the vector of values to pairwise multiply by t before adding to the elements of A
      • swapCol

        public static void swapCol(Matrix A,
                                   int j,
                                   int k,
                                   int start,
                                   int to)
        Swaps the columns j and k in the given matrix.
        Parameters:
        A - the matrix to perform he update on
        j - the first column to swap
        k - the second column to swap
        start - the first row that will be included in the swap (inclusive)
        to - the last row to be included in the swap (exclusive)
      • swapCol

        public static void swapCol(Matrix A,
                                   int j,
                                   int k)
        Swaps the columns j and k in the given matrix.
        Parameters:
        A - the matrix to perform he update on
        j - the first column to swap
        k - the second column to swap
      • swapRow

        public static void swapRow(Matrix A,
                                   int j,
                                   int k,
                                   int start,
                                   int to)
        Swaps the rows j and k in the given matrix.
        Parameters:
        A - the matrix to perform he update on
        j - the first row to swap
        k - the second row to swap
        start - the first column that will be included in the swap (inclusive)
        to - the last column to be included in the swap (exclusive)
      • swapRow

        public static void swapRow(Matrix A,
                                   int j,
                                   int k)
        Swaps the columns j and k in the given matrix.
        Parameters:
        A - the matrix to perform he update on
        j - the first column to swap
        k - the second column to swap
      • fillRow

        public static void fillRow(Matrix A,
                                   int i,
                                   int from,
                                   int to,
                                   double val)
        Fills the values in a row of the matrix
        Parameters:
        A - the matrix in question
        i - the row of the matrix
        from - the first column index to fill (inclusive)
        to - the last column index to fill (exclusive)
        val - the value to fill into the matrix
      • fillCol

        public static void fillCol(Matrix A,
                                   int j,
                                   int from,
                                   int to,
                                   double val)
        Fills the values in a column of the matrix
        Parameters:
        A - the matrix in question
        j - the column of the matrix
        from - the first row index to fill (inclusive)
        to - the last row index to fill (exclusive)
        val - the value to fill into the matrix

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.