Double-precision column-major matrix for use with LAPACK. More...
Public Member Functions | |
void | Alias (T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Makes this uninitialized matrix an alias of an existing block of doubles. | |
void | Alias (const GenMatrix &other) |
Makes this uninitialized matrix an alias of another matrix. | |
void | Alias (T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Makes this uninitialized matrix an alias of an existing block of doubles. | |
void | Alias (const GenMatrix &other) |
Makes this uninitialized matrix an alias of another matrix. | |
void | AliasColVector (const GenVector< T > &col_vector) |
Makes this an N row by 1 column alias of a vector of length N. | |
void | AliasColVector (const GenVector< T > &col_vector) |
Makes this an N row by 1 column alias of a vector of length N. | |
void | AliasRowVector (const GenVector< T > &row_vector) |
Makes this a 1 row by N column alias of a vector of length N. | |
void | AliasRowVector (const GenVector< T > &row_vector) |
Makes this a 1 row by N column alias of a vector of length N. | |
ASSIGN_VIA_COPY_CONSTRUCTION (GenMatrix) | |
ASSIGN_VIA_COPY_CONSTRUCTION (GenMatrix) | |
void | Copy (const T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Makes this uninitialized matrix a copy of the other vector. | |
void | Copy (const GenMatrix &other) |
Makes this uninitialized matrix a copy of the other vector. | |
void | Copy (const T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Makes this uninitialized matrix a copy of the other vector. | |
void | Copy (const GenMatrix &other) |
Makes this uninitialized matrix a copy of the other vector. | |
void | CopyColumnFromMat (index_t col1, index_t col2, index_t ncols, GenMatrix< T > &mat) |
Copies a block of columns to a matrix column. | |
void | CopyColumnFromMat (index_t col1, index_t col2, GenMatrix< T > &mat) |
Copies a vector to a matrix column. | |
void | CopyColumnFromMat (index_t col1, index_t col2, index_t ncols, GenMatrix< T > &mat) |
Copies a block of columns to a matrix column. | |
void | CopyColumnFromMat (index_t col1, index_t col2, GenMatrix< T > &mat) |
Copies a vector to a matrix column. | |
void | CopyValues (const GenMatrix &other) |
Copies the values from another matrix to this matrix. | |
void | CopyValues (const GenMatrix &other) |
Copies the values from another matrix to this matrix. | |
void | CopyVectorToColumn (index_t col, GenVector< T > &vec) |
Copies a column of matrix 1 to a column of matrix 2. | |
void | CopyVectorToColumn (index_t col, GenVector< T > &vec) |
Copies a column of matrix 1 to a column of matrix 2. | |
void | Destruct () |
Destructs this, so that it is suitable for you to call an initializer on this again. | |
void | Destruct () |
Destructs this, so that it is suitable for you to call an initializer on this again. | |
GenMatrix () | |
Creates a matrix that can be initialized. | |
GenMatrix (const GenMatrix< T > &other) | |
Copy constructor -- for use in collections. | |
GenMatrix (index_t in_rows, index_t in_cols) | |
Creates a Matrix with uninitialized elements of the specified size. | |
GenMatrix () | |
Creates a matrix that can be initialized. | |
GenMatrix (const GenMatrix< T > &other) | |
Copy constructor -- for use in collections. | |
GenMatrix (index_t in_rows, index_t in_cols) | |
Creates a Matrix with uninitialized elements of the specified size. | |
T | get (index_t r, index_t c) const |
Gets a particular double at the specified row and column. | |
T | get (index_t r, index_t c) const |
Gets a particular double at the specified row and column. | |
const T * | GetColumnPtr (index_t col) const |
Retrieves a pointer to a contiguous array corresponding to a particular column. | |
T * | GetColumnPtr (index_t col) |
Retrieves a pointer to a contiguous array corresponding to a particular column. | |
const T * | GetColumnPtr (index_t col) const |
Retrieves a pointer to a contiguous array corresponding to a particular column. | |
T * | GetColumnPtr (index_t col) |
Retrieves a pointer to a contiguous array corresponding to a particular column. | |
void | Init (index_t in_rows, index_t in_cols) |
Creates a Matrix with uninitialized elements of the specified size. | |
void | Init (index_t in_rows, index_t in_cols) |
Creates a Matrix with uninitialized elements of the specified size. | |
void | InitDiagonal (const GenVector< T > &v) |
Creates a diagonal matrix. | |
void | InitDiagonal (const GenVector< T > &v) |
Creates a diagonal matrix. | |
void | MakeColumnSlice (index_t start_col, index_t n_cols_new, GenMatrix *dest) const |
Make a matrix that is an alias of a particular slice of my columns. | |
void | MakeColumnSlice (index_t start_col, index_t n_cols_new, GenMatrix *dest) const |
Make a matrix that is an alias of a particular slice of my columns. | |
void | MakeColumnSubvector (index_t col, index_t start_row, index_t n_rows_new, GenVector< T > *dest) const |
Makes an alias of a subvector of particular column. | |
void | MakeColumnSubvector (index_t col, index_t start_row, index_t n_rows_new, GenVector< T > *dest) const |
Makes an alias of a subvector of particular column. | |
void | MakeColumnVector (index_t col, GenVector< T > *dest) const |
Makes an alias of a particular column. | |
void | MakeColumnVector (index_t col, GenVector< T > *dest) const |
Makes an alias of a particular column. | |
void | MakeReshaped (index_t n_rows_in, index_t n_cols_in, GenMatrix *dest) const |
Make an alias of a reshaped version of this matrix (column-major format). | |
void | MakeReshaped (index_t n_rows_in, index_t n_cols_in, GenMatrix *dest) const |
Make an alias of a reshaped version of this matrix (column-major format). | |
index_t | n_cols () const |
Returns the number of columns. | |
index_t | n_cols () const |
Returns the number of columns. | |
size_t | n_elements () const |
Returns the total number of elements (power user). | |
size_t | n_elements () const |
Returns the total number of elements (power user). | |
index_t | n_rows () const |
Returns the number of rows. | |
index_t | n_rows () const |
Returns the number of rows. | |
void | Own (T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated with mem::Alloc. | |
void | Own (GenMatrix *other) |
Makes this uninitialized matrix the "owning copy" of the other matrix; the other vector becomes an alias and this becomes the standard. | |
void | Own (T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated with mem::Alloc. | |
void | Own (GenMatrix *other) |
Makes this uninitialized matrix the "owning copy" of the other matrix; the other vector becomes an alias and this becomes the standard. | |
void | PrintDebug (const char *name="", FILE *stream=stderr) const |
Prints to a stream as a debug message. | |
void | PrintDebug (const char *name="", FILE *stream=stderr) const |
Prints to a stream as a debug message. | |
T * | ptr () |
Returns a pointer to the very beginning of the matrix, stored in a column-major format. | |
const T * | ptr () const |
Returns a pointer to the very beginning of the matrix, stored in a column-major format. | |
T * | ptr () |
Returns a pointer to the very beginning of the matrix, stored in a column-major format. | |
const T * | ptr () const |
Returns a pointer to the very beginning of the matrix, stored in a column-major format. | |
T & | ref (index_t r, index_t c) |
Gets a reference to a particular row and column. | |
T & | ref (index_t r, index_t c) |
Gets a reference to a particular row and column. | |
void | ResizeNoalias (index_t new_n_cols) |
Changes the number of columns, but REQUIRES that there are no aliases to this matrix anywhere else. | |
void | ResizeNoalias (index_t new_n_cols) |
Changes the number of columns, but REQUIRES that there are no aliases to this matrix anywhere else. | |
void | set (index_t r, index_t c, T v) |
Sets the value at the row and column. | |
void | set (index_t r, index_t c, T v) |
Sets the value at the row and column. | |
void | SetAll (T d) |
Sets the entire matrix to zero. | |
void | SetAll (T d) |
Sets the entire matrix to zero. | |
void | SetDiagonal (const GenVector< T > &v) |
Makes this a diagonal matrix whose diagonals are the values in v. | |
void | SetDiagonal (const GenVector< T > &v) |
Makes this a diagonal matrix whose diagonals are the values in v. | |
void | SetZero () |
Makes this matrix all zeroes. | |
void | SetZero () |
Makes this matrix all zeroes. | |
void | StaticCopy (const T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Makes this uninitialized matrix a static copy of the other vector, which will not be freed! | |
void | StaticCopy (const GenMatrix &other) |
Makes this uninitialized matrix a static copy of the other vector which will not be freed! | |
void | StaticCopy (const T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Makes this uninitialized matrix a static copy of the other vector, which will not be freed! | |
void | StaticCopy (const GenMatrix &other) |
Makes this uninitialized matrix a static copy of the other vector which will not be freed! | |
void | StaticInit (index_t in_rows, index_t in_cols) |
Creates a Matrix with uninitialized elements of the specified size statically. | |
void | StaticInit (index_t in_rows, index_t in_cols) |
Creates a Matrix with uninitialized elements of the specified size statically. | |
void | StaticInitDiagonal (const GenVector< T > &v) |
Creates a diagonal matrix. | |
void | StaticInitDiagonal (const GenVector< T > &v) |
Creates a diagonal matrix. | |
void | StaticOwn (T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated statically. | |
void | StaticOwn (GenMatrix *other) |
Makes this uninitialized matrix the "owning copy" of the other matrix; the other vector becomes an alias and this becomes the standard statically. | |
void | StaticOwn (T *ptr_in, index_t n_rows_in, index_t n_cols_in) |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated statically. | |
void | StaticOwn (GenMatrix *other) |
Makes this uninitialized matrix the "owning copy" of the other matrix; the other vector becomes an alias and this becomes the standard statically. | |
void | SwapValues (GenMatrix *other) |
Swaps all values in this matrix with values in the other. | |
void | SwapValues (GenMatrix *other) |
Swaps all values in this matrix with values in the other. | |
void | WeakCopy (const GenMatrix &other) |
Makes this a weak copy or alias of the other. | |
void | WeakCopy (const GenMatrix &other) |
Makes this a weak copy or alias of the other. | |
~GenMatrix () | |
Empty destructor. | |
~GenMatrix () | |
Empty destructor. |
Double-precision column-major matrix for use with LAPACK.
Your code can have huge performance hits if you fail to realize this is column major. For datasets, your columns should be individual points and your rows should be features.
TODO: If it's not entirely obvious or well documented how to use this class please let the FASTlib people know.
Definition at line 457 of file matrix.h.
void GenMatrix< T >::Alias | ( | T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
void GenMatrix< T >::Alias | ( | T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Makes this uninitialized matrix an alias of another matrix.
Changes to one matrix are visible in the other (and vice-versa).
other | the other vector |
Definition at line 665 of file matrix.h.
Referenced by GenMatrix< double >::Alias(), GenMatrix< double >::AliasColVector(), GenMatrix< double >::AliasRowVector(), GenMatrix< double >::MakeColumnSlice(), GenMatrix< double >::MakeReshaped(), and GenMatrix< double >::WeakCopy().
void GenMatrix< T >::Copy | ( | const T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
void GenMatrix< T >::Copy | ( | const T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Makes this uninitialized matrix a copy of the other vector.
other | the vector to explicitly copy |
Definition at line 604 of file matrix.h.
Referenced by InfomaxICA::applyICA(), GenMatrix< double >::Copy(), GenMatrix< double >::CopyValues(), GenMatrix< double >::GenMatrix(), schur(), GenMatrix< double >::StaticCopy(), and FastICA::SymmetricFixedPointICA().
void GenMatrix< T >::Destruct | ( | ) | [inline] |
void GenMatrix< T >::Destruct | ( | ) | [inline] |
Destructs this, so that it is suitable for you to call an initializer on this again.
Definition at line 513 of file matrix.h.
Referenced by GenMatrix< double >::~GenMatrix().
T GenMatrix< T >::get | ( | index_t | r, | |
index_t | c | |||
) | const [inline] |
T GenMatrix< T >::get | ( | index_t | r, | |
index_t | c | |||
) | const [inline] |
Gets a particular double at the specified row and column.
r | the row number | |
c | the column number |
Definition at line 1004 of file matrix.h.
Referenced by NaiveOrthoRangeSearch< T >::Compute(), and main().
const T* GenMatrix< T >::GetColumnPtr | ( | index_t | col | ) | const [inline] |
T* GenMatrix< T >::GetColumnPtr | ( | index_t | col | ) | [inline] |
const T* GenMatrix< T >::GetColumnPtr | ( | index_t | col | ) | const [inline] |
T* GenMatrix< T >::GetColumnPtr | ( | index_t | col | ) | [inline] |
Retrieves a pointer to a contiguous array corresponding to a particular column.
col | the column number |
Definition at line 864 of file matrix.h.
Referenced by GenMatrix< double >::CopyColumnFromMat().
void GenMatrix< T >::Init | ( | index_t | in_rows, | |
index_t | in_cols | |||
) | [inline] |
void GenMatrix< T >::Init | ( | index_t | in_rows, | |
index_t | in_cols | |||
) | [inline] |
Creates a Matrix with uninitialized elements of the specified size.
Definition at line 529 of file matrix.h.
Referenced by OrthoRangeSearch< T >::Compute(), NaiveOrthoRangeSearch< T >::Compute(), DoSvmNormalize(), MoGEM::ExpectationMaximization(), GenMatrix< double >::GenMatrix(), GenMatrix< double >::InitDiagonal(), MoGL2E::MakeModel(), MoGL2E::MakeModelWithGradients(), GenMatrix< double >::StaticInit(), FastICA::SymmetricFixedPointICA(), MixtureofGaussianHMM::Train(), DiscreteHMM::Train(), and DiscreteHMM::TrainViterbi().
void GenMatrix< T >::MakeColumnSubvector | ( | index_t | col, | |
index_t | start_row, | |||
index_t | n_rows_new, | |||
GenVector< T > * | dest | |||
) | const [inline] |
Makes an alias of a subvector of particular column.
col | the column to alias | |
start_row | the first row to put in the subvector | |
n_rows_new | the number of rows of the subvector | |
dest | a pointer to an uninitialized vector, which will be initialized as an alias to the particular column's subvector |
void GenMatrix< T >::MakeColumnSubvector | ( | index_t | col, | |
index_t | start_row, | |||
index_t | n_rows_new, | |||
GenVector< T > * | dest | |||
) | const [inline] |
Makes an alias of a subvector of particular column.
col | the column to alias | |
start_row | the first row to put in the subvector | |
n_rows_new | the number of rows of the subvector | |
dest | a pointer to an uninitialized vector, which will be initialized as an alias to the particular column's subvector |
void GenMatrix< T >::MakeColumnVector | ( | index_t | col, | |
GenVector< T > * | dest | |||
) | const [inline] |
Makes an alias of a particular column.
col | the column to alias | |
dest | a pointer to an uninitialized vector, which will be initialized as an alias to the particular column |
Definition at line 834 of file matrix.h.
Referenced by OrthoRangeSearch< T >::Compute().
void GenMatrix< T >::MakeReshaped | ( | index_t | n_rows_in, | |
index_t | n_cols_in, | |||
GenMatrix< T > * | dest | |||
) | const [inline] |
Make an alias of a reshaped version of this matrix (column-major format).
For instance, a matrix with 2 rows and 6 columns can be reshaped into a matrix with 12 rows 1 column, 1 row and 12 columns, or a variety of other shapes. The layout of the new elements correspond exactly to just pretending that the current column-major matrix is laid out as a different column-major matrix.
It is required that n_rows_new * n_cols_new is the same as n_rows * n_cols of the original matrix.
TODO: Considering using const Matrix& for third-party classes that want to implicitly convert to Matrix.
n_rows_in | new number of rows | |
n_cols_in | new number of columns | |
dest | a pointer to an unitialized matrix |
void GenMatrix< T >::MakeReshaped | ( | index_t | n_rows_in, | |
index_t | n_cols_in, | |||
GenMatrix< T > * | dest | |||
) | const [inline] |
Make an alias of a reshaped version of this matrix (column-major format).
For instance, a matrix with 2 rows and 6 columns can be reshaped into a matrix with 12 rows 1 column, 1 row and 12 columns, or a variety of other shapes. The layout of the new elements correspond exactly to just pretending that the current column-major matrix is laid out as a different column-major matrix.
It is required that n_rows_new * n_cols_new is the same as n_rows * n_cols of the original matrix.
TODO: Considering using const Matrix& for third-party classes that want to implicitly convert to Matrix.
n_rows_in | new number of rows | |
n_cols_in | new number of columns | |
dest | a pointer to an unitialized matrix |
index_t GenMatrix< T >::n_cols | ( | ) | const [inline] |
index_t GenMatrix< T >::n_cols | ( | ) | const [inline] |
Returns the number of columns.
Definition at line 1037 of file matrix.h.
Referenced by GenMatrix< double >::Alias(), OrthoRangeSearch< T >::Compute(), NaiveOrthoRangeSearch< T >::Compute(), GenMatrix< double >::Copy(), GenMatrix< double >::CopyColumnFromMat(), GenMatrix< double >::CopyValues(), main(), tree::MakeKdTreeMidpointSelective(), GenMatrix< double >::MakeReshaped(), GenMatrix< double >::Own(), GenMatrix< double >::PrintDebug(), GenMatrix< double >::SetDiagonal(), GenMatrix< double >::StaticCopy(), GenMatrix< double >::StaticOwn(), and GenMatrix< double >::SwapValues().
size_t GenMatrix< T >::n_elements | ( | ) | const [inline] |
size_t GenMatrix< T >::n_elements | ( | ) | const [inline] |
Returns the total number of elements (power user).
This is useful for iterating over all elements of the matrix when the row/column structure is not important.
Definition at line 1052 of file matrix.h.
Referenced by GenMatrix< double >::CopyValues(), GenMatrix< double >::ResizeNoalias(), GenMatrix< double >::SetAll(), and GenMatrix< double >::SwapValues().
index_t GenMatrix< T >::n_rows | ( | ) | const [inline] |
index_t GenMatrix< T >::n_rows | ( | ) | const [inline] |
Returns the number of rows.
Definition at line 1042 of file matrix.h.
Referenced by GenMatrix< double >::Alias(), GenMatrix< double >::Copy(), GenMatrix< double >::CopyColumnFromMat(), GenMatrix< double >::CopyValues(), GenMatrix< double >::MakeReshaped(), GenMatrix< double >::Own(), GenMatrix< double >::PrintDebug(), GenMatrix< double >::SetDiagonal(), GenMatrix< double >::StaticCopy(), GenMatrix< double >::StaticOwn(), and GenMatrix< double >::SwapValues().
void GenMatrix< T >::Own | ( | T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated with mem::Alloc.
ptr_in | the pointer to a block of column-major doubles allocated via mem::Alloc | |
n_rows_in | the number of rows | |
n_cols_in | the number of columns |
void GenMatrix< T >::Own | ( | T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated with mem::Alloc.
ptr_in | the pointer to a block of column-major doubles allocated via mem::Alloc | |
n_rows_in | the number of rows | |
n_cols_in | the number of columns |
Makes this uninitialized matrix the "owning copy" of the other matrix; the other vector becomes an alias and this becomes the standard.
The other matrix must be the "owning copy" of its memory.
other | a pointer to the other matrix |
Definition at line 722 of file matrix.h.
Referenced by GenMatrix< double >::Own(), and GenMatrix< double >::StaticOwn().
void GenMatrix< T >::PrintDebug | ( | const char * | name = "" , |
|
FILE * | stream = stderr | |||
) | const [inline] |
void GenMatrix< T >::PrintDebug | ( | const char * | name = "" , |
|
FILE * | stream = stderr | |||
) | const [inline] |
T* GenMatrix< T >::ptr | ( | ) | [inline] |
const T* GenMatrix< T >::ptr | ( | ) | const [inline] |
T* GenMatrix< T >::ptr | ( | ) | [inline] |
const T* GenMatrix< T >::ptr | ( | ) | const [inline] |
Returns a pointer to the very beginning of the matrix, stored in a column-major format.
This is suitable for BLAS and LAPACK calls.
Definition at line 984 of file matrix.h.
Referenced by GenMatrix< double >::Copy(), GenMatrix< double >::Own(), GenMatrix< double >::StaticCopy(), and GenMatrix< double >::StaticOwn().
T& GenMatrix< T >::ref | ( | index_t | r, | |
index_t | c | |||
) | [inline] |
T& GenMatrix< T >::ref | ( | index_t | r, | |
index_t | c | |||
) | [inline] |
void GenMatrix< T >::ResizeNoalias | ( | index_t | new_n_cols | ) | [inline] |
void GenMatrix< T >::ResizeNoalias | ( | index_t | new_n_cols | ) | [inline] |
void GenMatrix< T >::set | ( | index_t | r, | |
index_t | c, | |||
T | v | |||
) | [inline] |
void GenMatrix< T >::set | ( | index_t | r, | |
index_t | c, | |||
T | v | |||
) | [inline] |
Sets the value at the row and column.
r | the row number | |
c | the column number | |
v | the value to set |
Definition at line 1017 of file matrix.h.
Referenced by data::LargeLoad().
void GenMatrix< T >::SetAll | ( | T | d | ) | [inline] |
void GenMatrix< T >::SetAll | ( | T | d | ) | [inline] |
Sets the entire matrix to zero.
Definition at line 573 of file matrix.h.
Referenced by data::LargeLoad(), and GenMatrix< double >::SetZero().
Makes this a diagonal matrix whose diagonals are the values in v.
Definition at line 589 of file matrix.h.
Referenced by GenMatrix< double >::InitDiagonal(), and GenMatrix< double >::StaticInitDiagonal().
void GenMatrix< T >::SetZero | ( | ) | [inline] |
void GenMatrix< T >::SetZero | ( | ) | [inline] |
Makes this matrix all zeroes.
Definition at line 580 of file matrix.h.
Referenced by GenMatrix< double >::SetDiagonal().
void GenMatrix< T >::StaticCopy | ( | const T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
void GenMatrix< T >::StaticCopy | ( | const T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Makes this uninitialized matrix a static copy of the other vector which will not be freed!
other | the vector to explicitly copy |
Definition at line 630 of file matrix.h.
Referenced by GenMatrix< double >::StaticCopy().
void GenMatrix< T >::StaticInit | ( | index_t | in_rows, | |
index_t | in_cols | |||
) | [inline] |
void GenMatrix< T >::StaticInit | ( | index_t | in_rows, | |
index_t | in_cols | |||
) | [inline] |
Creates a Matrix with uninitialized elements of the specified size statically.
This matrix is not freed!
Definition at line 549 of file matrix.h.
Referenced by data::LargeLoad(), and GenMatrix< double >::StaticInitDiagonal().
void GenMatrix< T >::StaticOwn | ( | T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated statically.
ptr_in | the pointer to a block of column-major doubles allocated via mem::Alloc | |
n_rows_in | the number of rows | |
n_cols_in | the number of columns |
void GenMatrix< T >::StaticOwn | ( | T * | ptr_in, | |
index_t | n_rows_in, | |||
index_t | n_cols_in | |||
) | [inline] |
Initializes this uninitialized matrix as the "owning copy" of some linearized chunk of RAM allocated statically.
ptr_in | the pointer to a block of column-major doubles allocated via mem::Alloc | |
n_rows_in | the number of rows | |
n_cols_in | the number of columns |
Makes this uninitialized matrix the "owning copy" of the other matrix; the other vector becomes an alias and this becomes the standard statically.
The other matrix must have been allocated statically.
other | a pointer to the other matrix |
Definition at line 756 of file matrix.h.
Referenced by GenMatrix< double >::StaticOwn().