Functions | |
int | ml_matrix::is_empty () const |
Checks for an empty matrix. | |
int | ml_matrix::operator== (const ml_matrix &m) const |
Tests two matrices for equality. | |
int | ml_matrix::operator!= (const ml_matrix &m) const |
Inequality function. Returns the opposite of the equality function. | |
ml_matrix | ml_matrix::find (ml_comparison op, double target) const |
Determines the indices of all elements for which a specified comparison and value are true. | |
void | ml_matrix::sort (int direction=0) |
Sorts all the elements of the matrix. Ascending order is the default, pass a non-zero value for descending sort. | |
ml_matrix | ml_matrix::sort_indices (int direction=0) const |
Returns the indices that produce a sorted version of the original matrix. | |
void | ml_matrix::permute (const ml_matrix &elements) |
Permute a matrix based on a return from sort_indices. | |
ml_matrix | ml_matrix::sum_rows () const |
Returns a column matrix containing the sums of the values from each row. | |
ml_matrix | ml_matrix::sum_cols () const |
Returns a row matrix containing the sums of the values from each column. | |
ml_matrix | ml_matrix::max () const |
Finds the value and indices of the largest element in the matrix. | |
ml_matrix | ml_matrix::row_max () const |
Finds the maximum value and index for each row in the matrix. | |
ml_matrix | ml_matrix::col_max () const |
Finds the maximum value and index for each column in the matrix. | |
ml_matrix | ml_matrix::min () const |
Finds the value and indices of the smallest element in the matrix. | |
ml_matrix | ml_matrix::row_min () const |
Finds the minimum value and index for each row in the matrix. | |
ml_matrix | ml_matrix::col_min () const |
Finds the minimum value and index for each column in the matrix. | |
ml_matrix | ml_matrix::interpolate (int col, double value) const |
Linear interpolation based on the specified column. | |
int | ml_matrix::rows () const |
Returns the number of rows in the matrix. | |
int | ml_matrix::cols () const |
Returns the number of columns in the matrix. | |
ml_matrix & | ml_matrix::operator= (const ml_matrix &m) |
Sets matrix equal to another matrix. | |
ml_matrix & | ml_matrix::operator= (const char *s) |
Assigns the MATLAB string representation of a matrix to this matrix. | |
void | ml_matrix::zero () |
Replaces all values in the matrix with zero. | |
void | ml_matrix::ones () |
Replaces all values in the matrix with one. | |
void | ml_matrix::set_val (double v) |
Replaces all values in the matrix with the given value. | |
void | ml_matrix::set_val (const ml_matrix &elements, double v) |
Replaces all values at the specified indices in the matrix with a given value. | |
ml_matrix & | ml_matrix::apply (double(*func)(double)) |
Applies a specified function to every element in the matrix. | |
void | ml_matrix::apply_to_elements (const ml_matrix &elements, double(*func)(double)) |
Applies a specified function to a subset of the elements in the matrix. | |
void | ml_matrix::identity () |
Changes the matrix to an identity matrix. | |
void | ml_matrix::rand_seed (double seed) |
Sets the random seed for this matrix. | |
void | ml_matrix::rand () |
Replaces all values in the matrix with randomly generated values. | |
void | ml_matrix::randn (double std_dev) |
Replaces all values in the matrix with randomly generated values, given a standard deviation. | |
ml_matrix | sort (const ml_matrix &m, int direction=0) |
Sorts all the elements of the matrix. Ascending order is the default, pass a non-zero value for descending sort. | |
ml_matrix | apply (const ml_matrix &m, double(*func)(double)) |
Applies a specified function to every element in the matrix. | |
Variables | |
int | ml_matrix::error |
The current error status of the matrix. |
|
Checks for an empty matrix.
|
|
Tests two matrices for equality.
|
|
Inequality function. Returns the opposite of the equality function.
|
|
Determines the indices of all elements of the matrix having the specified comparison relationship with a given value. The index information will be returned in a new matrix with two columns and the number of rows equal to the total number of elements for which the comparison is true, with each row containing a (row, column) pair indicating the location of the corresponding element.
|
|
Sorts all the elements of the matrix. Ascending order is the default, pass a non-zero value for descending sort.
|
|
Determines the indices of matrix elements either ordered ascending or descending. The orginal matrix will not be changed. The index information will be returned in a new matrix with two columns and the number of rows equal to the total number of elements in the matrix, with each row containing a (row, column) pair indicating the location of the corresponding element.
|
|
Permute this matrix based on an elements matrix in the form of the return from sort_indices().
|
|
Returns a column matrix containing the sums of the values from each row.
|
|
Returns a row matrix containing the sums of the values from each column.
|
|
Finds the value and location of the largest element in the matrix.
|
|
Finds the maximum value and index for each row in the matrix.
|
|
Finds the maximum value and index for each column in the matrix.
|
|
Finds the value and location of the smallest element in the matrix.
|
|
Finds the minimum value and index for each row in the matrix.
|
|
Finds the minimum value and index for each column in the matrix.
|
|
Interpolate to find the row associated with a given value for a specifed column. This function can return an error matrix of type ml_bad_index if the requested interpolation value is too high or too low for interpolation.
|
|
Gets the number of rows in the matrix
|
|
Gets the number of columns in the matrix
|
|
Sets matrix equal to another matrix
|
|
Assigns the MATLAB string representation of a matrix to this matrix
|
|
Replaces all values in the matrix with zero.
|
|
Replaces all values in the matrix with one.
|
|
Replaces all values in the matrix with the given value.
|
|
Replaces all values at the specified indices in the matrix with a given value
|
|
Applies a specified function to every element in the matrix.
|
|
Applies a function to a set of elements in the matrix
|
|
Changes the matrix to an identity matrix. |
|
Sets the random seed for this matrix.
|
|
Replaces all values in the matrix with randomly generated values. |
|
Replaces all values in the matrix with randomly generated values, given a standard deviation.
|
|
Returns a new matrix, equal to the specified matrix, but with all the elements sorted. Ascending order is the default, pass a non-zero value for descending sort. Does not change the original matrix.
|
|
Applies a specified function to every element in the matrix. The matrix is not modified, instead a new matrix is created and returned following the operation.
|
|
The current error status of the matrix, one of the enumeration ml_error_codes. This value will always be equal to ml_no_error unless some operation has resulted in a specific error. |