Rosetta
|
#include <MathMatrix.hh>
Public Member Functions | |
MathMatrix () | |
default constructor More... | |
MathMatrix (const Size NUMBER_ROWS, const Size NUMBER_COLS, const T &FILL_VALUE=T(0)) | |
construct from dimension and possible filler More... | |
MathMatrix (const Size NUMBER_ROWS, const Size NUMBER_COLS, const T *DATA) | |
construct from dimension and pointer to data More... | |
MathMatrix (MathMatrix const &MATRIX) | |
copy constructor from Matrix More... | |
MathMatrix< T > * | Clone () const |
Clone function. More... | |
~MathMatrix () | |
destructor More... | |
Size | get_number_rows () const |
get number of rows More... | |
Size | get_number_cols () const |
get number of columns More... | |
Size | get_number_elements () const |
number of elements More... | |
Size | size () const |
number of elements More... | |
const T * | begin () const |
pointer to First Element More... | |
T * | begin () |
pointer to First Element More... | |
const T * | end () const |
pointer to end of range More... | |
T * | end () |
pointer to end of range More... | |
MathVector< T > | get_row (const Size ROW) const |
MathVector< T > | get_col (const Size COL) const |
bool | is_square () const |
is matrix a square matrix More... | |
bool | is_diagonal () const |
is matrix a diagonal matrix More... | |
bool | is_tri_diagonal () const |
is matrix a tridiagonal matrix More... | |
bool | same_dimensions (const MathMatrix< T > &MATRIX_LHS, const MathMatrix< T > &MATRIX_RHS) |
check dimension agreement of two Matrices More... | |
bool | inverse_dimensions (const MathMatrix< T > &MATRIX_LHS, const MathMatrix< T > &MATRIX_RHS) |
check inverse dimension agreement of two Matrices comapre number ros of lhs with number cols of rhs and number cols of lhs with number rows of rhs More... | |
bool | multiplication_dimension (const MathMatrix< T > &MATRIX_LHS, const MathMatrix< T > &MATRIX_RHS) |
check dimensions for multiplication A*B compare number cols of lhs with number rows of rhs More... | |
MathMatrix< T > & | set_zero () |
MathMatrix< T > | transpose (const MathMatrix< T > &MATRIX) |
MathMatrix< T > & | inverse () |
MathMatrix< T > & | transpose () |
MathMatrix< T > & | inverse_rectangular_matrix () |
MathMatrix< T > | inverse_square_matrix () |
invert small square matrices exactly More... | |
MathMatrix< T > & | inverse_diagonal_matrix () |
MathMatrix< T > & | inverse_tridiagonal_matrix () |
MathMatrix< T > & | set_unit () |
Size | pivot (const Size ROW) |
MathMatrix< T > & | replace_row (const Size ROW, const MathVector< T > &VECTOR) |
MathMatrix< T > & | replace_col (const Size COL, const MathVector< T > &VECTOR) |
MathMatrix< T > & | swap_rows (const Size ROW_A, const Size ROW_B) |
MathMatrix< T > & | swap_cols (const Size COL_A, const Size COL_B) |
bool | IsValidPosition (const Size ROW, const Size COL) const |
T & | operator() (const Size ROW, const Size COL) |
return reference to changeable element ( ROW, COL) More... | |
const T & | operator() (const Size ROW, const Size COL) const |
return reference to const element ( ROW, COL) More... | |
MathMatrix< T > & | operator= (const MathMatrix< T > &MATRIX) |
assignment from Matrix More... | |
MathMatrix< T > & | operator= (const T &VALUE) |
assignment from value More... | |
T * | operator[] (const Size ROW) |
C-style data access with [] gives a pointer on a ROW. More... | |
const T * | operator[] (const Size ROW) const |
C-style data access with [] gives a pointer on a ROW. More... | |
MathMatrix< T > & | operator*= (const MathMatrix< T > &MATRIX) |
operator *= Matrix More... | |
MathMatrix< T > & | operator*= (const MathVector< T > &VECTOR) |
operator *= VectorBase More... | |
Private Attributes | |
Size | NumberRows_ |
Size | NumberCols_ |
Size | size_ |
T * | data_ |
|
inline |
default constructor
|
inlineexplicit |
construct from dimension and possible filler
NUMBER_ROWS | number of rows in matrix |
NUMBER_COLS | number of cols in matrix |
FILL_VALUE | assign every element to that value |
|
inline |
construct from dimension and pointer to data
NUMBER_ROWS | number of rows in matrix |
NUMBER_COLS | number of cols in matrix |
DATA | pointer to field of data |
|
inline |
copy constructor from Matrix
MATRIX | matrix to be copied from |
References erraser_util::copy(), numeric::MathMatrix< T >::data_, and numeric::MathMatrix< T >::size_.
|
inline |
destructor
|
inline |
pointer to First Element
References numeric::MathMatrix< T >::data_.
|
inline |
pointer to First Element
References numeric::MathMatrix< T >::data_.
Referenced by numeric::operator!=(), numeric::operator*=(), numeric::operator+=(), numeric::operator-=(), numeric::operator/=(), and numeric::operator==().
|
inline |
Clone function.
|
inline |
pointer to end of range
References numeric::MathMatrix< T >::data_, and numeric::MathMatrix< T >::size_.
|
inline |
pointer to end of range
References numeric::MathMatrix< T >::data_, and numeric::MathMatrix< T >::size_.
Referenced by numeric::operator!=(), numeric::operator*=(), numeric::operator+=(), numeric::operator-=(), numeric::operator/=(), and numeric::operator==().
|
inline |
References numeric::MathVector< T >::begin(), create_a3b_hbs::i, numeric::MathMatrix< T >::NumberRows_, numeric::MathMatrix< T >::operator()(), and ptr().
Referenced by numeric::interpolation::spline::BicubicSpline::train().
|
inline |
get number of columns
References numeric::MathMatrix< T >::NumberCols_.
Referenced by numeric::MathMatrix< T >::inverse_dimensions(), numeric::MathMatrix< T >::multiplication_dimension(), numeric::linear_algebra::non_square_transpose(), numeric::operator*(), numeric::MathMatrix< T >::same_dimensions(), and numeric::interpolation::spline::BicubicSpline::train().
|
inline |
number of elements
References numeric::MathMatrix< T >::size_.
Referenced by numeric::MathMatrix< T >::is_diagonal().
|
inline |
get number of rows
References numeric::MathMatrix< T >::NumberRows_.
Referenced by numeric::MathMatrix< T >::inverse_dimensions(), numeric::MathMatrix< T >::multiplication_dimension(), numeric::linear_algebra::non_square_transpose(), numeric::operator*(), numeric::geometry::projection_area(), numeric::MathMatrix< T >::same_dimensions(), and numeric::interpolation::spline::BicubicSpline::train().
|
inline |
References numeric::MathMatrix< T >::NumberCols_.
Referenced by numeric::geometry::projection_area(), and numeric::interpolation::spline::BicubicSpline::train().
|
inline |
|
inline |
|
inline |
check inverse dimension agreement of two Matrices comapre number ros of lhs with number cols of rhs and number cols of lhs with number rows of rhs
MATRIX_LHS | rhs matrix |
MATRIX_RHS | lhs matrix |
References numeric::MathMatrix< T >::get_number_cols(), and numeric::MathMatrix< T >::get_number_rows().
|
inline |
References numeric::MathMatrix< T >::inverse_square_matrix(), numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, numeric::MathMatrix< T >::transpose(), and transposed().
Referenced by numeric::MathMatrix< T >::inverse().
|
inline |
invert small square matrices exactly
References docking::a1, docking::a2, create_a3b_hbs::i, numeric::MathMatrix< T >::inverse_diagonal_matrix(), numeric::MathMatrix< T >::inverse_tridiagonal_matrix(), numeric::MathMatrix< T >::is_diagonal(), numeric::MathMatrix< T >::is_tri_diagonal(), create_a3b_hbs::j, create_a3b_hbs::k, numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, numeric::MathMatrix< T >::operator()(), numeric::MathMatrix< T >::pivot(), numeric::MathMatrix< T >::set_unit(), and numeric::MathMatrix< T >::swap_rows().
Referenced by numeric::MathMatrix< T >::inverse(), and numeric::MathMatrix< T >::inverse_rectangular_matrix().
|
inline |
References create_a3b_hbs::i, create_a3b_hbs::j, kmeans_adaptive_kernel_density_bb_dependent_rotlib::n, numeric::MathMatrix< T >::NumberRows_, numeric::MathMatrix< T >::operator()(), pyrosetta.distributed.cluster.exceptions::T, and predPRE::y.
Referenced by numeric::MathMatrix< T >::inverse_square_matrix().
|
inline |
is matrix a diagonal matrix
References numeric::MathMatrix< T >::get_number_elements(), create_a3b_hbs::i, numeric::MathMatrix< T >::is_square(), create_a3b_hbs::j, numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, and pyrosetta.distributed.cluster.exceptions::T.
Referenced by numeric::MathMatrix< T >::inverse_square_matrix().
|
inline |
is matrix a square matrix
References numeric::MathMatrix< T >::NumberCols_, and numeric::MathMatrix< T >::NumberRows_.
Referenced by numeric::MathMatrix< T >::inverse(), numeric::MathMatrix< T >::is_diagonal(), and numeric::MathMatrix< T >::is_tri_diagonal().
|
inline |
is matrix a tridiagonal matrix
References create_a3b_hbs::i, numeric::MathMatrix< T >::is_square(), create_a3b_hbs::j, numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, and pyrosetta.distributed.cluster.exceptions::T.
Referenced by numeric::MathMatrix< T >::inverse_square_matrix().
|
inline |
References numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, and utility_exit_with_message.
Referenced by numeric::MathMatrix< T >::replace_col(), numeric::MathMatrix< T >::replace_row(), numeric::MathMatrix< T >::swap_cols(), and numeric::MathMatrix< T >::swap_rows().
|
inline |
check dimensions for multiplication A*B compare number cols of lhs with number rows of rhs
MATRIX_LHS | rhs matrix |
MATRIX_RHS | lhs matrix |
References numeric::MathMatrix< T >::get_number_cols(), and numeric::MathMatrix< T >::get_number_rows().
|
inline |
return reference to changeable element ( ROW, COL)
ROW | the row number, starting with 0 |
COL | the col number, starting with 0 |
References numeric::MathMatrix< T >::data_, numeric::MathMatrix< T >::NumberCols_, and numeric::MathMatrix< T >::NumberRows_.
Referenced by numeric::MathMatrix< T >::get_col(), numeric::MathMatrix< T >::inverse_diagonal_matrix(), numeric::MathMatrix< T >::inverse_square_matrix(), numeric::MathMatrix< T >::inverse_tridiagonal_matrix(), numeric::MathMatrix< T >::operator*=(), numeric::MathMatrix< T >::replace_col(), and numeric::MathMatrix< T >::transpose().
|
inline |
return reference to const element ( ROW, COL)
ROW | the row number, starting with 0 |
COL | the col number, starting with 0 |
References numeric::MathMatrix< T >::data_, numeric::MathMatrix< T >::NumberCols_, and numeric::MathMatrix< T >::NumberRows_.
|
inline |
|
inline |
operator *= VectorBase
References numeric::MathVector< T >::begin(), create_a3b_hbs::i, create_a3b_hbs::j, numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, numeric::MathMatrix< T >::operator[](), and dummy-distribution::row.
|
inline |
assignment from Matrix
MATRIX | the matrix used as source |
References erraser_util::copy(), numeric::MathMatrix< T >::data_, numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, and numeric::MathMatrix< T >::size_.
|
inline |
assignment from value
VALUE | all elements are set to that value |
References numeric::MathMatrix< T >::data_, detail::fill(), and numeric::MathMatrix< T >::size_.
|
inline |
C-style data access with [] gives a pointer on a ROW.
References numeric::MathMatrix< T >::data_, numeric::MathMatrix< T >::NumberCols_, and numeric::MathMatrix< T >::NumberRows_.
Referenced by numeric::MathMatrix< T >::operator*=().
|
inline |
C-style data access with [] gives a pointer on a ROW.
References numeric::MathMatrix< T >::data_, numeric::MathMatrix< T >::NumberCols_, and numeric::MathMatrix< T >::NumberRows_.
|
inline |
References create_a3b_hbs::k, and numeric::MathMatrix< T >::swap_rows().
Referenced by numeric::MathMatrix< T >::inverse_square_matrix().
|
inline |
References numeric::MathVector< T >::begin(), hist2d::dat, numeric::MathVector< T >::end(), create_a3b_hbs::i, numeric::MathMatrix< T >::IsValidPosition(), numeric::MathMatrix< T >::NumberRows_, numeric::MathMatrix< T >::operator()(), and numeric::MathVector< T >::size().
|
inline |
References numeric::MathVector< T >::begin(), hist2d::dat, numeric::MathVector< T >::end(), numeric::MathMatrix< T >::IsValidPosition(), ptr(), and numeric::MathVector< T >::size().
|
inline |
check dimension agreement of two Matrices
MATRIX_LHS | rhs matrix |
MATRIX_RHS | lhs matrix |
References numeric::MathMatrix< T >::get_number_cols(), and numeric::MathMatrix< T >::get_number_rows().
|
inline |
|
inline |
|
inline |
number of elements
References numeric::MathMatrix< T >::size_.
Referenced by numeric::operator-(), and numeric::operator/().
|
inline |
References create_a3b_hbs::i, numeric::MathMatrix< T >::IsValidPosition(), numeric::MathMatrix< T >::NumberRows_, and swap().
|
inline |
References create_a3b_hbs::i, numeric::MathMatrix< T >::IsValidPosition(), numeric::MathMatrix< T >::NumberCols_, and swap().
Referenced by numeric::MathMatrix< T >::inverse_square_matrix(), and numeric::MathMatrix< T >::pivot().
|
inline |
References create_a3b_hbs::i, create_a3b_hbs::j, numeric::MathMatrix< T >::NumberCols_, numeric::MathMatrix< T >::NumberRows_, and numeric::MathMatrix< T >::operator()().
Referenced by numeric::MathMatrix< T >::inverse_rectangular_matrix().
|
inline |
References numeric::MathMatrix< T >::transpose().
Referenced by numeric::MathMatrix< T >::inverse_rectangular_matrix(), and numeric::MathMatrix< T >::transpose().
|
private |
|
private |
Referenced by numeric::MathMatrix< T >::get_number_cols(), numeric::MathMatrix< T >::get_row(), numeric::MathMatrix< T >::inverse_rectangular_matrix(), numeric::MathMatrix< T >::inverse_square_matrix(), numeric::MathMatrix< T >::is_diagonal(), numeric::MathMatrix< T >::is_square(), numeric::MathMatrix< T >::is_tri_diagonal(), numeric::MathMatrix< T >::IsValidPosition(), numeric::MathMatrix< T >::operator()(), numeric::MathMatrix< T >::operator*=(), numeric::MathMatrix< T >::operator=(), numeric::MathMatrix< T >::operator[](), numeric::MathMatrix< T >::set_unit(), numeric::MathMatrix< T >::swap_rows(), and numeric::MathMatrix< T >::transpose().
|
private |
Referenced by numeric::MathMatrix< T >::get_col(), numeric::MathMatrix< T >::get_number_rows(), numeric::MathMatrix< T >::inverse_diagonal_matrix(), numeric::MathMatrix< T >::inverse_rectangular_matrix(), numeric::MathMatrix< T >::inverse_square_matrix(), numeric::MathMatrix< T >::inverse_tridiagonal_matrix(), numeric::MathMatrix< T >::is_diagonal(), numeric::MathMatrix< T >::is_square(), numeric::MathMatrix< T >::is_tri_diagonal(), numeric::MathMatrix< T >::IsValidPosition(), numeric::MathMatrix< T >::operator()(), numeric::MathMatrix< T >::operator*=(), numeric::MathMatrix< T >::operator=(), numeric::MathMatrix< T >::operator[](), numeric::MathMatrix< T >::replace_col(), numeric::MathMatrix< T >::set_unit(), numeric::MathMatrix< T >::swap_cols(), and numeric::MathMatrix< T >::transpose().
|
private |