|
TBCI Numerical high perf. C++ Library
2.8.0
|
#include <bvector.h>


Public Types | |
| typedef T | value_type |
| typedef T | element_type |
| typedef T aligned_value_type | TALIGN (MIN_ALIGN2) |
Public Types inherited from TMatrix< T > | |
| typedef T | value_type |
| typedef T | element_type |
| typedef T aligned_value_type | TALIGN (MIN_ALIGN2) |
Public Member Functions | |
| Matrix (const unsigned d=0) | |
| Matrix (const unsigned r, const unsigned c) | |
| Matrix (const T &v, const unsigned r, const unsigned c) | |
| Matrix (const Vector< T > &v, const enum rowcolvec r=colvec) | |
| Matrix (const Matrix< T > &m) | |
| copy, does a real copy, as TM(M) is invoked (not TM(TM)) More... | |
| Matrix (const TMatrix< T > &tm) HOT | |
| alias More... | |
| Matrix (const TSMatrix< T > &ts) | |
| ~Matrix () | |
| template<typename U > | |
| Matrix (const Matrix< U > &m) | |
| template<typename U > | |
| Matrix (const TMatrix< U > &tm) | |
| tbci_traits< T >::const_refval_type | operator() (const unsigned int, const unsigned int) const HOT |
| ro element access More... | |
| T & | operator() (const unsigned int, const unsigned int) HOT |
| rw element access More... | |
| TVector< T > | operator() (const unsigned int) const |
| get row More... | |
| Matrix< T > & | operator= (const Matrix< T > &m) |
| Assignment, non-resizing. More... | |
| Matrix< T > & | operator= (const TMatrix< T > &tm) |
| Matrix< T > & | operator= (TSMatrix< T > ts) |
| Matrix< T > & | operator= (const T &v) |
| Matrix< T > & | resize (const unsigned r, const unsigned c) |
| Matrix< T > & | resize (const unsigned d) |
| Matrix< T > & | resize (const T &v, const unsigned r, const unsigned c) |
| Matrix< T > & | resize (const Matrix< T > &m) |
| Matrix< T > & | fill (const T &v=(T) 0) |
| Matrix< T > & | fill (const Vector< T > &v) |
| Matrix< T > & | setunit (const T &f=(T) 1) |
| Matrix< T > & | clear () |
| Matrix< T > & | operator+= (const Matrix< T > &a) |
| Matrix< T > & | operator-= (const Matrix< T > &a) |
| Matrix< T > & | operator+= (TMatrix< T > a) |
| Matrix< T > & | operator-= (TMatrix< T > a) |
| Matrix< T > & | operator+= (TSMatrix< T > a) |
| Matrix< T > & | operator-= (TSMatrix< T > a) |
| Matrix< T > & | operator+= (const T &a) |
| Matrix< T > & | operator-= (const T &a) |
| Matrix< T > & | operator*= (const T &a) |
| Matrix< T > & | operator/= (const T &a) |
| TMatrix< T > | operator- () const |
| TMatrix< T > | operator+ (const Matrix< T > &) const |
| TMatrix< T > | operator- (const Matrix< T > &) const |
| TMatrix< T > | operator* (const Matrix< T > &) const |
| TMatrix< T > & | operator+ (TMatrix< T > &) const |
| TMatrix< T > & | operator- (TMatrix< T > &) const |
| TMatrix< T > | operator* (TMatrix< T > &) const |
| TMatrix< T > | operator+ (TSMatrix< T > &) const |
| TMatrix< T > | operator- (TSMatrix< T > &) const |
| TMatrix< T > | operator* (TSMatrix< T > &) const |
| TMatrix< T > | operator+ (const T &) const |
| TMatrix< T > | operator- (const T &) const |
| TSMatrix< T > | operator* (const T &) const |
| TSMatrix< T > | operator/ (const T &) const |
| TVector< T > | operator* (const Vector< T > &) const HOT |
| TVector< T > | operator* (TVector< T >) const HOT |
| Now for the Matrix-Vector multiplications. More... | |
| TVector< T > | operator* (const TSVector< T > &tsv) const HOT |
| TVector< T > | transMult (const Vector< T > &) const HOT |
| bool | operator== (const Matrix< T > &m) const |
| bool | operator!= (const Matrix< T > &m) const |
| bool | operator== (TMatrix< T > tm) const |
| bool | operator!= (TMatrix< T > tm) const |
| bool | operator== (TSMatrix< T >) const |
| bool | operator!= (TSMatrix< T > ts) const |
| Matrix< T > & | mult_rows (const Vector< T > &) |
| Elementwise ops. More... | |
| Matrix< T > & | div_rows (const Vector< T > &) |
| Matrix< T > & | mult_row (const T &, const unsigned) |
| Matrix< T > & | div_row (const T &, const unsigned) |
| double | fabssqr () const |
| double | fabs () const |
Public Member Functions inherited from TMatrix< T > | |
| T * | getvec () const |
| T * | getendvec () const |
| TMatrix (const unsigned=0) | |
| c'tor for square Matrix More... | |
| TMatrix (const unsigned, const unsigned) | |
| c'tor for Matrix, specifying rows and columns More... | |
| TMatrix (const T &, const unsigned, const unsigned) | |
| c'tor for Matrix, specifying and initialization value and rows and columns More... | |
| TMatrix (const Vector< T > &, const enum rowcolvec=colvec) | |
| c'tor to construct 1-column (or 1-row) Matrix from Vector More... | |
| TMatrix (const TMatrix< T > &) HOT | |
| aliasing copies (TBCI) More... | |
| TMatrix (TSMatrix< T >) | |
| TMatrix (const Matrix< T > &) HOT | |
| full copying More... | |
| void | real_destroy () |
| real destructor More... | |
| void | mark_destroy () const |
| mark destructible More... | |
| ~TMatrix () | |
| template<typename U > | |
| TMatrix (const Matrix< U > &m) | |
| template<typename U > | |
| TMatrix (const TMatrix< U > &tm) | |
| TMatrix< T > & | operator= (const Matrix< T > &) HOT |
| assignment, non-resizing More... | |
| TMatrix< T > & | operator= (const TMatrix< T > &) HOT |
| TMatrix< T > & | operator= (TSMatrix< T >) |
| TMatrix< T > & | operator= (const T &) |
| TMatrix< T > & | alias (const TMatrix< T > &m) |
| TMatrix< T > & | operator+= (TMatrix< T >) |
| arithmetics ... More... | |
| TMatrix< T > & | operator+= (const Matrix< T > &) |
| TMatrix< T > & | operator+= (const T &) |
| TMatrix< T > & | operator+= (TSMatrix< T >) |
| TMatrix< T > & | operator-= (TMatrix< T >) |
| TMatrix< T > & | operator-= (const Matrix< T > &) |
| TMatrix< T > & | operator-= (const T &) |
| TMatrix< T > & | operator-= (TSMatrix< T >) |
| TSMatrix< T > | operator*= (const T &) |
| TSMatrix< T > | operator/= (const T &) |
| TMatrix< T > & | operator- () |
| TMatrix< T > & | operator+ (TMatrix< T >) |
| TMatrix< T > & | operator+ (TSMatrix< T >) |
| TMatrix< T > & | operator+ (const Matrix< T > &) |
| TMatrix< T > & | operator+ (const T &) |
| TMatrix< T > & | operator- (TMatrix< T >) |
| TMatrix< T > & | operator- (TSMatrix< T >) |
| TMatrix< T > & | operator- (const Matrix< T > &) |
| TMatrix< T > & | operator- (const T &) |
| TSMatrix< T > | operator* (const T &) |
| TSMatrix< T > | operator/ (const T &) |
| TMatrix< T > | operator* (const Matrix< T > &) |
| TMatrix< T > | operator* (TMatrix< T >) |
| TMatrix< T > | operator* (TSMatrix< T >) |
| TVector< T > | operator* (const Vector< T > &v) |
| TVector< T > | operator* (TVector< T > &tv) |
| TVector< T > | operator* (const TSVector< T > &tsv) |
| TMatrix< T > & | swap (TMatrix< T > &) |
| TMatrix< T > | transposed_copy () const |
| Inefficient! Use transMult if possible. More... | |
| TMatrix< T > & | transpose () |
| T | operator() (const unsigned int, const unsigned int) const HOT |
| Element access (desctructive for TMatrix!) More... | |
| Mat_Brack< T > | operator[] (const unsigned int i) const |
| T & | setval (const T &val, const unsigned int r, const unsigned int c) |
| T & | setval (const unsigned r, const unsigned c) |
| tbci_traits< T >::const_refval_type | get (const unsigned r, const unsigned c) const |
| get, set and getcref are used internally and not for public consumption More... | |
| T & | set (const T &val, const unsigned r, const unsigned c) |
| const T & | getcref (const unsigned r, const unsigned c) const |
| const T * | getrowptr (const unsigned r) const |
| Helpers for matvecmul. More... | |
| T * | getrowptr (const unsigned r) |
| bool | operator== (const Matrix< T > &m) |
| Comparison. More... | |
| bool | operator!= (const Matrix< T > &m) |
| bool | operator== (TMatrix< T > tm) |
| bool | operator!= (TMatrix< T > tm) |
| bool | operator== (TSMatrix< T >) |
| bool | operator!= (TSMatrix< T > ts) |
| unsigned int | columns () const |
| number of columns More... | |
| unsigned int | rows () const |
| number of rows More... | |
| unsigned long | size () const |
| number of elements More... | |
| TVector< T > | operator() (const unsigned int) const |
| Row vector. More... | |
| TVector< T > | get_row (const unsigned int) const |
| Row vector. More... | |
| TVector< T > | get_col (const unsigned int) const |
| Column vector. More... | |
| void | set_row (const Vector< T > &, const unsigned int) |
| Fill complete row. More... | |
| void | set_col (const Vector< T > &, const unsigned int) |
| Fill complete column. More... | |
| void | set_row_partial (const Vector< T > &, const unsigned int, const unsigned int) |
| Fill partial row. More... | |
| void | set_col_partial (const Vector< T > &, const unsigned int, const unsigned int) |
| Fill partial column. More... | |
| TMatrix< T > & | resize (const unsigned int, const unsigned int) |
| Resize Matrix, specifying rows and columns. More... | |
| TMatrix< T > & | resize (const unsigned int d) |
| Resize Matrix to square shape. More... | |
| TMatrix< T > & | resize (const T &, const unsigned int, const unsigned int) |
| Resize Matrix and fill with value. More... | |
| TMatrix< T > & | resize (const TMatrix< T > &) |
| Resizing assignment. More... | |
| TMatrix< T > & | cheapdownsizerow (const unsigned) |
| Resize number of rows without actually freeing memory (efficiency) More... | |
| TMatrix< T > & | fill (const T &=(T) 0) |
| Fill matrix. More... | |
| TMatrix< T > & | clear () |
| Clear matrix (fill with 0) More... | |
| TMatrix< T > & | fill (const Vector< T > &) |
| Fill complete matrix by vector elements (m00, m01, ... m0C, m10, ...) More... | |
| TMatrix< T > & | setunit (const T &=(T) 1) |
| Set to unit matrix (optionally scaled) More... | |
| TMatrix< T > & | row_expand (const unsigned int r) |
| Set new numbers of rows to matrix (expansion only) More... | |
| TMatrix< T > & | row_expand (const TMatrix< T > &m) |
| Append matrix below existing one. More... | |
| T | trace () const |
| Trace. More... | |
| double | fabssqr () const |
| Sum over all squared elements. More... | |
| double | fabs () const |
Public Member Functions inherited from Matrix_Sig< T > | |
| Matrix_Sig () | |
| ~Matrix_Sig () | |
| tbci_traits< T >::const_refval_type | operator() (const unsigned, const unsigned) const |
| ro access More... | |
| T & | operator() (const unsigned, const unsigned) |
| rw access More... | |
| Matrix_Sig< T > & | fill (const T &) |
| Matrix_Sig< T > & | setunit (const T &=(T) 1) |
| Matrix_Sig< T > & | clear () |
| TVector< T > | operator* (const Vector_Sig< T > &) const |
| TVector< T > | transMult (const Vector_Sig< T > &) const |
| unsigned int | rows () const |
| unsigned int | columns () const |
Static Public Member Functions | |
| static const char * | mat_info () |
Static Public Member Functions inherited from TMatrix< T > | |
| static const char * | mat_info () |
Static Public Member Functions inherited from Matrix_Sig< T > | |
| static const char * | mat_info () |
Friends | |
| class | TSMatrix< T > |
| BVector< T > &FRIEND_TBCI2__ bvfillm | FGD (BVector< T > &, const Matrix< T > &m) |
| STD__ ostream & | operator<< FGDT (STD__ ostream &, const Matrix< T > &) |
| STD__ istream & | operator>> FGDT (STD__ istream &, Matrix< T > &) |
| NOINST char FRIEND_TBCI2__ gaussj | FGD (Matrix< T > &, Matrix< T > &) |
Additional Inherited Members | |
Protected Types inherited from TMatrix< T > | |
| typedef T | mat_t |
| typedef T * | Tptr |
Protected Member Functions inherited from TMatrix< T > | |
| int | set_ptrs () |
Protected Attributes inherited from TMatrix< T > | |
| unsigned long | dim |
| unsigned int | row |
| unsigned int | col:31 |
| unsigned int | freeable:1 |
| T ** | mat |
| C storage layout: mat[row][col]. More... | |
| T * | vec |
| T * | endvec |
Real, user referable, Matrix Does implement high performance arithmetics, together with TMatrix and TSMatrix. All objects that the user creates should be of class Matrix; the temporary objects are emitted by the compiler as suitable.
The implementation is NOT optimized for sparse matrices; please have a look at BdMatrix and CSCMatrix if you want to do computations with sparse matrices.
| typedef T aligned_value_type Matrix< T >::TALIGN(MIN_ALIGN2) |
Definition at line 1612 of file matrix.h.
References TMatrix< T >::freeable.
Definition at line 1661 of file matrix.h.
References TMatrix< T >::clear().
Definition at line 2296 of file matrix.h.
References BCHK, c, TSMatrix< T >::col, index, TSMatrix< T >::row, and T.
Definition at line 2274 of file matrix.h.
References BCHK, c, TSMatrix< T >::col, fac, TSMatrix< T >::row, Matrix_Sig< T >::rows(), TVector< T >::size(), and T.
Definition at line 1752 of file matrix.h.
References Matrix< T >::fabssqr(), GLBL__, MATH__, and std::sqrt().
Definition at line 2102 of file matrix.h.
References TSMatrix< T >::dim, do_exactsum(), res, and TSMatrix< T >::vec.
Referenced by Matrix< T >::fabs(), TMatrix< T >::fabssqr(), and fabssqr().
Definition at line 1655 of file matrix.h.
References TMatrix< T >::fill().
Referenced by operator<<().
Definition at line 1657 of file matrix.h.
References TMatrix< T >::fill().
Definition at line 2287 of file matrix.h.
References BCHK, c, TSMatrix< T >::col, index, and TSMatrix< T >::row.
Elementwise ops.
Definition at line 2261 of file matrix.h.
References BCHK, c, TSMatrix< T >::col, fac, TSMatrix< T >::row, Matrix_Sig< T >::rows(), TVector< T >::size(), T, and v.
|
inline |
ro element access
Definition at line 1775 of file matrix.h.
References TSMatrix< T >::col, EXPCHK, i, index, TSMatrix< T >::mat, and TSMatrix< T >::row.
|
inline |
rw element access
Definition at line 1783 of file matrix.h.
References TSMatrix< T >::col, EXPCHK, i, index, TSMatrix< T >::mat, and TSMatrix< T >::row.
get row
Definition at line 1791 of file matrix.h.
References BCHK, TSMatrix< T >::col, index, TSMatrix< T >::row, T, TBCICOPY, v, and BVector< T >::vec.
Definition at line 1966 of file matrix.h.
References b, BCHK, c, TMatrix< T >::clear(), TMatrix< T >::col, TSMatrix< T >::col, LIKELY, PREFETCH_R, PREFETCH_W, TMatrix< T >::row, TSMatrix< T >::row, SMP_MATSLICE2, T, thread_start_off(), thread_wait(), threads_avail, TMatrix< T >::vec, and TSMatrix< T >::vec.
Definition at line 2016 of file matrix.h.
References ALIGN, BCHK, c, TSMatrix< T >::col, TSMatrix< T >::fac(), i, TMatrix< T >::mat, TSMatrix< T >::mat, MIN_ALIGN2, TSMatrix< T >::real_destroy(), REGISTER, TSMatrix< T >::row, and T.
Definition at line 2151 of file matrix.h.
References BCHK, TSMatrix< T >::col, LIKELY, PREFETCH_R, PREFETCH_W, TSMatrix< T >::row, TVector< T >::size(), SMP_MATSLICE2, T, thread_start_off(), thread_wait(), threads_avail, v, BVector< T >::vec, and TSMatrix< T >::vec.
Definition at line 2238 of file matrix.h.
References BCHK, TSMatrix< T >::col, do_mat_tsv_mult(), TSMatrix< T >::row, and TSVector< T >::size().
Definition at line 1849 of file matrix.h.
References TSMatrix< T >::dim, STD_SMP_TEMPLATE2C, and TSMatrix< T >::vec.
Definition at line 1890 of file matrix.h.
References BCHK, TSMatrix< T >::col, TMatrix< T >::dim, TSMatrix< T >::dim, TSMatrix< T >::row, TSMatrix< T >::size(), STD_SMP_TEMPLATE3VV, and TMatrix< T >::vec.
Definition at line 1907 of file matrix.h.
References a, BCHK, TMatrix< T >::dim, TSMatrix< T >::dim, TSMatrix< T >::size(), STD_SMP_TEMPLATE2V, and TMatrix< T >::vec.
Definition at line 1922 of file matrix.h.
References BCHK, TSMatrix< T >::detach(), TSMatrix< T >::dim, TSMatrix< T >::fac(), TSMatrix< T >::real_destroy(), TSMatrix< T >::size(), STD_SMP_TEMPLATE4V, T, and TSMatrix< T >::vec.
Definition at line 1864 of file matrix.h.
References TSMatrix< T >::col, TSMatrix< T >::dim, TSMatrix< T >::row, STD_SMP_TEMPLATE3VC, and TMatrix< T >::vec.
Definition at line 1671 of file matrix.h.
References TMatrix< T >::operator+=().
Definition at line 1675 of file matrix.h.
References TMatrix< T >::operator+=().
Definition at line 1679 of file matrix.h.
References TMatrix< T >::operator+=().
Definition at line 1683 of file matrix.h.
References TMatrix< T >::operator+=().
Definition at line 1898 of file matrix.h.
References BCHK, TSMatrix< T >::col, TMatrix< T >::dim, TSMatrix< T >::dim, TSMatrix< T >::row, TSMatrix< T >::size(), STD_SMP_TEMPLATE3VV, and TMatrix< T >::vec.
Definition at line 1914 of file matrix.h.
References a, BCHK, TMatrix< T >::dim, TSMatrix< T >::dim, TSMatrix< T >::size(), STD_SMP_TEMPLATE2V, and TMatrix< T >::vec.
Definition at line 1930 of file matrix.h.
References BCHK, TSMatrix< T >::detach(), TSMatrix< T >::dim, TSMatrix< T >::fac(), TSMatrix< T >::real_destroy(), TSMatrix< T >::size(), STD_SMP_TEMPLATE4V, T, and TSMatrix< T >::vec.
Definition at line 1871 of file matrix.h.
References TSMatrix< T >::col, TSMatrix< T >::dim, TSMatrix< T >::row, STD_SMP_TEMPLATE3VC, and TMatrix< T >::vec.
Definition at line 1673 of file matrix.h.
References TMatrix< T >::operator-=().
Definition at line 1677 of file matrix.h.
References TMatrix< T >::operator-=().
Definition at line 1681 of file matrix.h.
References TMatrix< T >::operator-=().
Definition at line 1685 of file matrix.h.
References TMatrix< T >::operator-=().
Definition at line 1855 of file matrix.h.
References TSMatrix< T >::dim, STD_SMP_TEMPLATE2C, and TSMatrix< T >::vec.
Assignment, non-resizing.
Definition at line 1638 of file matrix.h.
References TMatrix< T >::operator=().
Definition at line 1640 of file matrix.h.
References TMatrix< T >::operator=().
Definition at line 1642 of file matrix.h.
References TMatrix< T >::operator=().
Definition at line 1644 of file matrix.h.
References TMatrix< T >::operator=().
Definition at line 2064 of file matrix.h.
References TMatrix< T >::col, LIKELY, TMatrix< T >::row, TSMatrix< T >::row, T, TBCICOMP, TMatrix< T >::vec, and TSMatrix< T >::vec.
Definition at line 2077 of file matrix.h.
References TSMatrix< T >::col, TSMatrix< T >::dim, TSMatrix< T >::endvec, TSMatrix< T >::fac(), LIKELY, TSMatrix< T >::real_destroy(), REGISTER, TSMatrix< T >::row, T, TBCICOMP, UNLIKELY, and TSMatrix< T >::vec.
Definition at line 1647 of file matrix.h.
References TMatrix< T >::resize().
Referenced by Matrix< T >::resize().
Definition at line 1649 of file matrix.h.
References Matrix< T >::resize().
|
inline |
Definition at line 1651 of file matrix.h.
References TMatrix< T >::resize().
Definition at line 1653 of file matrix.h.
References TMatrix< T >::resize().
Definition at line 1659 of file matrix.h.
References TMatrix< T >::setunit().
Definition at line 2184 of file matrix.h.
References BCHK, TSMatrix< T >::col, LIKELY, TSMatrix< T >::row, TVector< T >::size(), SMP_MATSLICE2, T, thread_start_off(), thread_wait(), threads_avail, Matrix_Sig< T >::transMult(), and v.
|
friend |
|
friend |
1.8.5