Real Double-precision General Dence Matrix Class. More...
#include <dgematrix.hpp>
Public Member Functions | |
dgematrix () | |
dgematrix (const dgematrix &) | |
dgematrix (const _dgematrix &) | |
dgematrix (const CPPL_INT &, const CPPL_INT &) | |
dgematrix (const char *) | |
~dgematrix () | |
_zgematrix | to_zgematrix () const |
double & | operator() (const CPPL_INT &, const CPPL_INT &) |
double | operator() (const CPPL_INT &, const CPPL_INT &) const |
dgematrix & | set (const CPPL_INT &, const CPPL_INT &, const double &) |
void | write (const char *) const |
void | read (const char *) |
void | clear () |
dgematrix & | zero () |
dgematrix & | identity () |
void | chsign () |
void | copy (const dgematrix &) |
void | shallow_copy (const _dgematrix &) |
dgematrix & | resize (const CPPL_INT &, const CPPL_INT &) |
_drovector | row (const CPPL_INT &) const |
_dcovector | col (const CPPL_INT &) const |
CPPL_INT | dgesv (dgematrix &) |
CPPL_INT | dgesv (dcovector &) |
CPPL_INT | dgels (dgematrix &) |
CPPL_INT | dgels (dcovector &) |
CPPL_INT | dgels (dgematrix &, drovector &) |
CPPL_INT | dgels (dcovector &, double &) |
CPPL_INT | dgelss (dcovector &, dcovector &, CPPL_INT &, const double) |
CPPL_INT | dgelss (dgematrix &, dcovector &, CPPL_INT &, const double) |
CPPL_INT | dgelsd (dcovector &, dcovector &, CPPL_INT &, const double) |
CPPL_INT | dgeev (std::vector< double > &, std::vector< double > &) |
CPPL_INT | dgeev (zcovector &) |
CPPL_INT | dgeev (std::vector< double > &, std::vector< double > &, std::vector< dcovector > &, std::vector< dcovector > &) |
CPPL_INT | dgeev (std::vector< double > &, std::vector< double > &, std::vector< drovector > &, std::vector< drovector > &) |
CPPL_INT | dggev (dgematrix &, std::vector< double > &, std::vector< double > &) |
CPPL_INT | dggev (dgematrix &, std::vector< double > &, std::vector< double > &, std::vector< dcovector > &, std::vector< dcovector > &) |
CPPL_INT | dggev (dgematrix &, std::vector< double > &, std::vector< double > &, std::vector< drovector > &, std::vector< drovector > &) |
CPPL_INT | dgesvd (dgbmatrix &) |
CPPL_INT | dgesvd (dcovector &, dgematrix &, dgematrix &) |
CPPL_INT | dgglse (dgematrix &, dcovector &, dcovector &, dcovector &) |
dgematrix & | operator= (const dgematrix &) |
dgematrix & | operator= (const _dgematrix &) |
dgematrix & | operator+= (const dgematrix &) |
dgematrix & | operator+= (const _dgematrix &) |
dgematrix & | operator+= (const dsymatrix &) |
dgematrix & | operator+= (const _dsymatrix &) |
dgematrix & | operator+= (const dgbmatrix &) |
dgematrix & | operator+= (const _dgbmatrix &) |
dgematrix & | operator+= (const dgsmatrix &) |
dgematrix & | operator+= (const _dgsmatrix &) |
dgematrix & | operator+= (const dssmatrix &) |
dgematrix & | operator+= (const _dssmatrix &) |
dgematrix & | operator-= (const dgematrix &) |
dgematrix & | operator-= (const _dgematrix &) |
dgematrix & | operator-= (const dsymatrix &) |
dgematrix & | operator-= (const _dsymatrix &) |
dgematrix & | operator-= (const dgbmatrix &) |
dgematrix & | operator-= (const _dgbmatrix &) |
dgematrix & | operator-= (const dgsmatrix &) |
dgematrix & | operator-= (const _dgsmatrix &) |
dgematrix & | operator-= (const dssmatrix &) |
dgematrix & | operator-= (const _dssmatrix &) |
dgematrix & | operator*= (const dgematrix &) |
dgematrix & | operator*= (const _dgematrix &) |
dgematrix & | operator*= (const dsymatrix &) |
dgematrix & | operator*= (const _dsymatrix &) |
dgematrix & | operator*= (const dgbmatrix &) |
dgematrix & | operator*= (const _dgbmatrix &) |
dgematrix & | operator*= (const dgsmatrix &) |
dgematrix & | operator*= (const _dgsmatrix &) |
dgematrix & | operator*= (const dssmatrix &) |
dgematrix & | operator*= (const _dssmatrix &) |
dgematrix & | operator*= (const double &) |
dgematrix & | operator/= (const double &) |
Public Attributes | |
CPPL_INT | m |
matrix row size More... | |
CPPL_INT | n |
matrix column size More... | |
double * | array |
1D array to store matrix data More... | |
double ** | darray |
array of pointers of column head addresses More... | |
Real Double-precision General Dence Matrix Class.
Definition at line 3 of file dgematrix.hpp.
|
inline |
dgematrix constructor without arguments
Definition at line 3 of file dgematrix-constructor.hpp.
References array, darray, m, and n.
|
inline |
dgematrix copy constructor
Definition at line 18 of file dgematrix-constructor.hpp.
References array, darray, i, m, and n.
|
inline |
dgematrix constructor to cast _dgematrix
Definition at line 37 of file dgematrix-constructor.hpp.
References array, _dgematrix::array, _dgematrix::darray, darray, m, _dgematrix::m, _dgematrix::n, n, and _dgematrix::nullify().
|
inline |
dgematrix constructor with size specification
Definition at line 53 of file dgematrix-constructor.hpp.
References array, darray, i, m, and n.
|
inline |
dgematrix constructor with filename
Definition at line 76 of file dgematrix-constructor.hpp.
References array, darray, and read().
|
inline |
dgematrix destructor
Definition at line 91 of file dgematrix-constructor.hpp.
|
inline |
cast to _zgematrix
Definition at line 3 of file dgematrix-cast.hpp.
References _, array, zgematrix::array, i, m, and n.
|
inline |
operator() for non-const object
Definition at line 3 of file dgematrix-io.hpp.
References darray, i, m, and n.
Referenced by identity(), operator*=(), operator+=(), operator-=(), read(), and write().
|
inline |
operator() for const object
Definition at line 20 of file dgematrix-io.hpp.
References darray, i, m, and n.
|
inline |
set value for const object
Definition at line 41 of file dgematrix-io.hpp.
References darray, i, m, and n.
|
inline |
Definition at line 79 of file dgematrix-io.hpp.
References i, m, n, and operator()().
|
inline |
Definition at line 99 of file dgematrix-io.hpp.
References i, m, n, operator()(), and resize().
Referenced by dgematrix().
|
inline |
clear all the matrix data and set the sizes 0
Definition at line 3 of file dgematrix-misc.hpp.
References array, darray, m, and n.
Referenced by dgels(), and dgelss().
|
inline |
change the matrix into a zero matrix
Definition at line 15 of file dgematrix-misc.hpp.
References array, i, m, and n.
Referenced by operator*(), operator*=(), _dgsmatrix::to_dgematrix(), _dssmatrix::to_dgematrix(), dssmatrix::to_dgematrix(), dgrmatrix::to_dgematrix(), and dgsmatrix::to_dgematrix().
|
inline |
change the matrix into an identity matrix
Definition at line 25 of file dgematrix-misc.hpp.
References array, i, m, n, and operator()().
Referenced by i().
|
inline |
|
inline |
make a deep copy of the matrix
Definition at line 56 of file dgematrix-misc.hpp.
References array, darray, i, m, and n.
Referenced by operator=().
|
inline |
make a shallow copy of the matrix
This function is not designed to be used in project codes.
Definition at line 76 of file dgematrix-misc.hpp.
References array, _dgematrix::array, _dgematrix::darray, darray, m, _dgematrix::m, _dgematrix::n, n, and _dgematrix::nullify().
Referenced by operator=().
|
inline |
resize the matrix
Definition at line 90 of file dgematrix-misc.hpp.
References array, darray, i, m, and n.
Referenced by dgesvd(), and read().
|
inline |
|
inline |
|
inline |
solve A*X=Y using dgesv
The argument is dgematrix Y. Y is overwritten and become the solution X. A is also overwritten and become P*l*U.
Definition at line 6 of file dgematrix-lapack.hpp.
Referenced by i().
|
inline |
solve A*x=y using dgesv
The argument is dcovector y. y is overwritten and become the solution x. A is also overwritten and become P*l*U.
Definition at line 33 of file dgematrix-lapack.hpp.
References array, dcovector::array, dcovector::l, m, and n.
|
inline |
solve overdetermined or underdetermined A*X=Y using dgels
Definition at line 62 of file dgematrix-lapack.hpp.
|
inline |
solve overdetermined or underdetermined A*x=y using dgels
Definition at line 111 of file dgematrix-lapack.hpp.
References array, dcovector::array, dcovector::clear(), i, dcovector::l, m, n, and swap.
solve overdetermined or underdetermined A*X=Y using dgels with the sum of residual squares output
The residual is set as the columnwise sum of residual squares for overdetermined problems while it is always zero for underdetermined problems.
Definition at line 160 of file dgematrix-lapack.hpp.
References array, clear(), i, drovector::l, m, n, drovector::resize(), swap, and drovector::zero().
|
inline |
solve overdetermined or underdetermined A*x=y using dgels with the sum of residual squares output
The residual is set as the sum of residual squares for overdetermined problems while it is always zero for underdetermined problems.
Definition at line 222 of file dgematrix-lapack.hpp.
References array, dcovector::array, dcovector::clear(), i, dcovector::l, m, n, and swap.
|
inline |
calculate the least-squares-least-norm solution for overdetermined or underdetermined A*x=y using dgelss
Definition at line 279 of file dgematrix-lapack.hpp.
References dcovector::array, dcovector::clear(), i(), dcovector::l, dcovector::resize(), and swap().
|
inline |
calculate the least-squares-least-norm solution for overdetermined or underdetermined A*x=y using dgelss
Definition at line 323 of file dgematrix-lapack.hpp.
References array, dcovector::array, clear(), i(), m, n, dcovector::resize(), and swap().
|
inline |
calculate the least-squares-least-norm solution for overdetermined or underdetermined A*x=y using dgelsd
Definition at line 372 of file dgematrix-lapack.hpp.
References dcovector::array, dcovector::clear(), i(), dcovector::l, dcovector::resize(), and swap().
|
inline |
calculate eigenvalues
All of the arguments need not to be initialized. wr and wi are overwitten and become real and imaginary part of eigenvalues, respectively. This matrix is also overwritten.
Definition at line 442 of file dgematrix-lapack.hpp.
Referenced by dgeev().
|
inline |
calculate eigenvalues
All of the arguments need not to be initialized. w are overwitten and become eigenvalues, respectively. This matrix is also overwritten.
Definition at line 476 of file dgematrix-lapack.hpp.
References dgeev(), i, n, and zcovector::resize().
|
inline |
calculate right eigenvalues and right eigenvectors
All of the arguments need not to be initialized. wr, wi, vrr, vri are overwitten and become real and imaginary part of right eigenvalues and right eigenvectors, respectively. This matrix is also overwritten.
Definition at line 500 of file dgematrix-lapack.hpp.
|
inline |
calculate left eigenvalues and left eigenvectors
All of the arguments need not to be initialized. wr, wi, vrr, vri are overwitten and become real and imaginary part of left eigenvalues and left eigenvectors, respectively. This matrix is also overwritten.
Definition at line 567 of file dgematrix-lapack.hpp.
References array, i, m, and n.
|
inline |
calculate generalized eigenvalues
All of the arguments don't need to be initialized. wr and wi are overwitten and become real and imaginary part of generalized eigenvalues, respectively. This matrix and matB are also overwritten.
Definition at line 637 of file dgematrix-lapack.hpp.
|
inline |
calculate generalized eigenvalues and generalized right eigenvectors
All of the arguments don't need to be initialized. wr, wi, vrr and vri are overwitten and become real and imaginary part of generalized eigenvalue and generalized right eigenvector, respectively. This matrix and matB are also overwritten.
Definition at line 687 of file dgematrix-lapack.hpp.
|
inline |
calculate generalized eigenvalues and generalized left eigenvectors
All of the arguments don't need to be initialized. wr, wi, vlr and vli are overwitten and become real and imaginary part of generalized eigenvalue and generalized left eigenvector, respectively. This matrix and matB are also overwritten.
Definition at line 765 of file dgematrix-lapack.hpp.
|
inline |
compute the singular value decomposition (SVD)
The argument is dgbmatrix S. S doesn't need to be initialized. S is overwitten and become singular values. This matrix also overwritten.
Definition at line 847 of file dgematrix-lapack.hpp.
References dgbmatrix::array, and dgbmatrix::resize().
compute the singular value decomposition (SVD)
The arguments are dcocector S, dgematrix U and VT. All of them need not to be initialized. S, U and VT are overwitten and become singular values, left singular vectors, and right singular vectors respectively. This matrix also overwritten.
Definition at line 885 of file dgematrix-lapack.hpp.
References array, dcovector::array, m, n, resize(), and dcovector::resize().
solve the linear equality-constrained least squares (LSE) problem
Input matrix and vectors, B, c, and d, are overwitten. This matrix is also overwritten. The solution vector x is to be automatically resized.
Definition at line 915 of file dgematrix-lapack.hpp.
References array, dcovector::array, dcovector::clear(), dcovector::l, m, and dcovector::resize().
|
inline |
dgematrix=_dgematrix operator
Definition at line 3 of file dgematrix-_dgematrix.hpp.
References shallow_copy().
|
inline |
dgematrix+=_dgematrix operator
Definition at line 15 of file dgematrix-_dgematrix.hpp.
References array, _dgematrix::array, _dgematrix::destroy(), i, _dgematrix::m, m, n, and _dgematrix::n.
dgematrix+=dsymatrix operator
Definition at line 3 of file dgematrix-dsymatrix.hpp.
References i, m, dsymatrix::n, n, and operator()().
|
inline |
dgematrix+=_dsymatrix operator
Definition at line 3 of file dgematrix-_dsymatrix.hpp.
References _dsymatrix::destroy(), i, m, n, _dsymatrix::n, and operator()().
dgematrix+=dgbmatrix operator
Definition at line 3 of file dgematrix-dgbmatrix.hpp.
References i, dgbmatrix::kl, dgbmatrix::ku, m, dgbmatrix::m, dgbmatrix::n, n, and operator()().
|
inline |
dgematrix+=_dgbmatrix operator
Definition at line 3 of file dgematrix-_dgbmatrix.hpp.
References _dgbmatrix::destroy(), i, _dgbmatrix::kl, _dgbmatrix::ku, m, _dgbmatrix::m, _dgbmatrix::n, n, and operator()().
|
inline |
|
inline |
|
inline |
dgematrix-=_dgematrix operator
Definition at line 37 of file dgematrix-_dgematrix.hpp.
References array, _dgematrix::array, _dgematrix::destroy(), i, _dgematrix::m, m, n, and _dgematrix::n.
dgematrix-=dsymatrix operator
Definition at line 25 of file dgematrix-dsymatrix.hpp.
References i, m, dsymatrix::n, n, and operator()().
|
inline |
dgematrix-=_dsymatrix operator
Definition at line 26 of file dgematrix-_dsymatrix.hpp.
References _dsymatrix::destroy(), i, m, n, _dsymatrix::n, and operator()().
dgematrix-=dgbmatrix operator
Definition at line 26 of file dgematrix-dgbmatrix.hpp.
References i, dgbmatrix::kl, dgbmatrix::ku, m, dgbmatrix::m, dgbmatrix::n, n, and operator()().
|
inline |
dgematrix-=_dgbmatrix operator
Definition at line 27 of file dgematrix-_dgbmatrix.hpp.
References _dgbmatrix::destroy(), i, _dgbmatrix::kl, _dgbmatrix::ku, m, _dgbmatrix::m, _dgbmatrix::n, n, and operator()().
|
inline |
|
inline |
dgematrix operator*=
Definition at line 57 of file dgematrix-dgematrix.hpp.
|
inline |
dgematrix*=_dgematrix operator
Definition at line 59 of file dgematrix-_dgematrix.hpp.
References array, _dgematrix::array, _dgematrix::destroy(), _dgematrix::m, m, _dgematrix::n, n, and swap.
dgematrix*=dsymatrix operator
Definition at line 47 of file dgematrix-dsymatrix.hpp.
References dsymatrix::array, array, m, dsymatrix::n, n, and swap.
|
inline |
dgematrix*=_dsymatrix operator
Definition at line 49 of file dgematrix-_dsymatrix.hpp.
References array, _dsymatrix::array, _dsymatrix::destroy(), m, n, _dsymatrix::n, and swap.
dgematrix*=dgbmatrix operator
Definition at line 49 of file dgematrix-dgbmatrix.hpp.
References i, dgbmatrix::kl, dgbmatrix::ku, m, dgbmatrix::m, n, dgbmatrix::n, operator()(), swap, and zero().
|
inline |
dgematrix*=_dgbmatrix operator
Definition at line 50 of file dgematrix-_dgbmatrix.hpp.
References _dgbmatrix::destroy(), i, _dgbmatrix::kl, _dgbmatrix::ku, m, _dgbmatrix::m, n, _dgbmatrix::n, operator()(), swap, and zero().
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Definition at line 63 of file dgematrix-io.hpp.
swap two matrices
Definition at line 164 of file dgematrix-misc.hpp.
Referenced by dgels(), and operator*=().
|
friend |
convert user object to smart-temporary object
Definition at line 175 of file dgematrix-misc.hpp.
Referenced by col(), row(), and to_zgematrix().
|
friend |
|
friend |
return its inverse matrix
Definition at line 18 of file dgematrix-calc.hpp.
Referenced by chsign(), col(), copy(), dgeev(), dgels(), dgematrix(), dggev(), identity(), operator()(), operator*=(), operator+=(), operator-=(), read(), resize(), set(), to_zgematrix(), write(), and zero().
|
friend |
search the index of element having the largest absolute value in 0-based numbering system
Definition at line 43 of file dgematrix-calc.hpp.
|
friend |
+dgematrix operator
Definition at line 3 of file dgematrix-unary.hpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
dgematrix*dgematrix operator
Definition at line 132 of file dgematrix-dgematrix.hpp.
|
friend |
dgematrix*_dgematrix operator
Definition at line 131 of file dgematrix-_dgematrix.hpp.
|
friend |
dgematrix*dsymatrix operator
Definition at line 122 of file dgematrix-dsymatrix.hpp.
|
friend |
dgematrix*_dsymatrix operator
Definition at line 127 of file dgematrix-_dsymatrix.hpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
CPPL_INT dgematrix::m |
matrix row size
Definition at line 9 of file dgematrix.hpp.
Referenced by _(), chsign(), clear(), col(), copy(), damax(), dgbmatrix::dgbsv(), dgeev(), dgels(), dgelss(), dgematrix(), dgematrix_small< m, n >::dgematrix_small(), dgesv(), dgesvd(), dggev(), dgglse(), dsymatrix::dsysv(), hadamerd(), i(), idamax(), identity(), operator%(), operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), read(), resize(), row(), set(), shallow_copy(), swap(), t(), to_zgematrix(), write(), and zero().
CPPL_INT dgematrix::n |
matrix column size
Definition at line 10 of file dgematrix.hpp.
Referenced by _(), chsign(), clear(), col(), copy(), damax(), dgbmatrix::dgbsv(), dgeev(), dgels(), dgelss(), dgematrix(), dgematrix_small< m, n >::dgematrix_small(), dgesv(), dgesvd(), dggev(), dsymatrix::dsysv(), hadamerd(), i(), idamax(), identity(), operator%(), operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), read(), resize(), row(), set(), shallow_copy(), swap(), t(), to_zgematrix(), write(), and zero().
double* dgematrix::array |
1D array to store matrix data
Definition at line 11 of file dgematrix.hpp.
Referenced by _(), chsign(), clear(), copy(), damax(), dgbmatrix::dgbsv(), dgeev(), dgels(), dgelss(), dgematrix(), dgematrix_small< m, n >::dgematrix_small(), dgesv(), dgesvd(), dggev(), dgglse(), dsymatrix::dsysv(), idamax(), identity(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), resize(), shallow_copy(), swap(), to_zgematrix(), zero(), and ~dgematrix().
double** dgematrix::darray |
array of pointers of column head addresses
Definition at line 12 of file dgematrix.hpp.
Referenced by _(), clear(), copy(), dgematrix(), operator()(), resize(), set(), shallow_copy(), swap(), and ~dgematrix().