public class RowColumnOps extends Object
Constructor and Description |
---|
RowColumnOps() |
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.
|
public static void addDiag(Matrix A, int start, int to, double c)
A
- the matrix to perform the update onstart
- 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 diagonalpublic static void addRow(Matrix A, int i, int start, int to, double c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 elementpublic static void addRow(Matrix A, int i, double c)
A
- the matrix to perform he update oni
- the row to updatec
- the constant to add to each elementpublic static void multRow(Matrix A, int i, int start, int to, double c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 bypublic static void multRow(Matrix A, int i, double c)
A
- the matrix to perform he update oni
- the row to updatec
- the constant to multiply each element bypublic static void multRow(Matrix A, int i, int start, int to, Vec c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 bypublic static void multRow(Matrix A, int i, Vec c)
A
- the matrix to perform he update oni
- the row to updatec
- the vector of values to multiple the elements of A bypublic static void multRow(Matrix A, int i, int start, int to, double[] c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 bypublic static void multRow(Matrix A, int i, double[] c)
A
- the matrix to perform he update oni
- the row to updatec
- the array of values to multiple the elements of A bypublic static void divRow(Matrix A, int i, int start, int to, double c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 bypublic static void divRow(Matrix A, int i, double c)
A
- the matrix to perform he update oni
- the row to updatec
- the constant to divide each element bypublic static void addCol(Matrix A, int j, int start, int to, double c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 elementpublic static void addCol(Matrix A, int j, double c)
A
- the matrix to perform he update onj
- the row to updatec
- the constant to add to each elementpublic static void multCol(Matrix A, int j, int start, int to, double c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 bypublic static void multCol(Matrix A, int j, double c)
A
- the matrix to perform he update onj
- the row to updatec
- the constant to multiply each element bypublic static void divCol(Matrix A, int j, int start, int to, double c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 bypublic static void divCol(Matrix A, int j, double c)
A
- the matrix to perform he update onj
- the row to updatec
- the constant to divide each element bypublic static void divCol(Matrix A, int j, int start, int to, Vec c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 bypublic static void divCol(Matrix A, int j, int start, int to, double[] c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 bypublic static void addMultRow(Matrix A, int i, int start, int to, double t, double[] c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 byc
- the array of values to pairwise multiply by t before adding to the elements of Apublic static void addMultRow(Matrix A, int i, int start, int to, double t, Vec c)
A
- the matrix to perform he update oni
- the row to updatestart
- 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 byc
- the array of values to pairwise multiply by t before adding to the elements of Apublic static void addMultCol(Matrix A, int j, int start, int to, double t, double[] c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 byc
- the array of values to pairwise multiply by t before adding to the elements of Apublic static void addMultCol(Matrix A, int j, int start, int to, double t, Vec c)
A
- the matrix to perform he update onj
- the row to updatestart
- 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 byc
- the vector of values to pairwise multiply by t before adding to the elements of Apublic static void swapCol(Matrix A, int j, int k, int start, int to)
A
- the matrix to perform he update onj
- the first column to swapk
- the second column to swapstart
- the first row that will be included in the swap (inclusive)to
- the last row to be included in the swap (exclusive)public static void swapCol(Matrix A, int j, int k)
A
- the matrix to perform he update onj
- the first column to swapk
- the second column to swappublic static void swapRow(Matrix A, int j, int k, int start, int to)
A
- the matrix to perform he update onj
- the first row to swapk
- the second row to swapstart
- the first column that will be included in the swap (inclusive)to
- the last column to be included in the swap (exclusive)public static void swapRow(Matrix A, int j, int k)
A
- the matrix to perform he update onj
- the first column to swapk
- the second column to swappublic static void fillRow(Matrix A, int i, int from, int to, double val)
A
- the matrix in questioni
- the row of the matrixfrom
- the first column index to fill (inclusive)to
- the last column index to fill (exclusive)val
- the value to fill into the matrixpublic static void fillCol(Matrix A, int j, int from, int to, double val)
A
- the matrix in questionj
- the column of the matrixfrom
- the first row index to fill (inclusive)to
- the last row index to fill (exclusive)val
- the value to fill into the matrixCopyright © 2017. All rights reserved.