Functions | |
ml_matrix::ml_matrix () | |
Default Constructor. Creates an empty (0 x 0) matrix. | |
ml_matrix::ml_matrix (const ml_matrix &m) | |
Copy constructor. | |
ml_matrix::ml_matrix (int rows, int cols=1) | |
Creates a matrix and sets all elements to 0. | |
ml_matrix::ml_matrix (int rows, int cols, double value) | |
Creates a matrix with all values equal to value. | |
ml_matrix::ml_matrix (int rows, int cols, double *v) | |
Constructor which builds a matrix from a given array. | |
ml_matrix::ml_matrix (const char *s) | |
Constructs a matrix from a string format as used in MATLAB or created by ml_matrix::to_string(). | |
ml_matrix::ml_matrix (void *bf) | |
Constructs a matrix from a binary format as created by ml_matrix::to_binary(). | |
ml_matrix::ml_matrix (FILE *f, int *linenum=NULL) | |
Constructs a matrix from a string format as used in MATLAB or created by ml_matrix::to_string(), and read from a file. | |
ml_matrix::~ml_matrix () | |
Destructor. | |
char * | ml_matrix::to_string (int human_readable=0) |
Returns a character string representation of the matrix. | |
void | ml_matrix::display (char *s=NULL) |
Display function. Formats the matrix in a human readable fashion and prints to standard out. | |
void * | ml_matrix::to_binary (unsigned int *size=NULL) const |
Creates binary representation of matrix for efficient transfer. | |
ml_matrix | linspace (double start, double finish, int n) |
Creates a linearly spaced vector with n points between two values. | |
ml_matrix | colon (double start, double incr, double end) |
Creates a vector using a fixed increment between two points. |
|
Default Constructor. Creates an empty (0 x 0) matrix. |
|
Creates a copy of a matrix.
|
|
Creates a matrix and sets all elements to 0
|
|
Creates a matrix with all values equal to v
|
|
Constructor which builds a matrix from a given array
|
|
Constructs a matrix from a string format as used in MATLAB or created by ml_matrix::to_string(). This function can return an error matrix of type ml_bad_string_format if the provided string is not a properly formatted matrix.
|
|
Constructs a matrix from a binary format as created by ml_matrix::to_binary(). By far the most efficient way to send matrix data over a network or transfer between applications is using the binary format, though it is possible to also use the string format as well. This function can return an error matrix of type ml_invalid_buffer if the provided binary buffer does not contain a valid binary-format buffer.
|
|
Constructs a matrix from a string format as used in MATLAB or created by ml_matrix::to_string(). The string is read from the provided file. This function can return an error matrix of type ml_bad_file_pointer if the provided file is NULL, or of type ml_bad_string_format if the file does not contain a valid string-format matrix.
|
|
Returns a character string representation of the matrix
|
|
Display function. Formats the matrix in a human readable fashion and prints to standard out. |
|
Creates binary representation of matrix for efficient transfer. This function allocates memory that must be freed by the caller.
|
|
Creates a linearly spaced vector with n points between two values.
|
|
Creates a vector using a fixed increment between two points.
|