![]() |
aimsdata
5.1.2
Neuroimaging data handling
|
#include <aims/sparsematrix/sparseMatrix.h>
Public Types | |
typedef boost_sparse_matrix::reference | reference |
typedef boost_sparse_matrix::const_reference | const_reference |
typedef boost_sparse_matrix::iterator1 | iterator1 |
typedef boost_sparse_matrix::iterator2 | iterator2 |
typedef boost_sparse_matrix::const_iterator1 | const_iterator1 |
typedef boost_sparse_matrix::const_iterator2 | const_iterator2 |
![]() | |
typedef int | RefCounterType |
Public Member Functions | |
SparseMatrix (int32_t size1=1, int32_t size2=1) | |
SparseMatrix (const SparseMatrix &other) | |
virtual | ~SparseMatrix () |
SparseMatrix & | operator= (const SparseMatrix &other) |
void | reallocate (int32_t size1, int32_t size2) |
iterator1 | begin1 () |
iterator1 | end1 () |
const_iterator1 | begin1 () const |
const_iterator1 | end1 () const |
iterator2 | begin2 () |
iterator2 | end2 () |
const_iterator2 | begin2 () const |
const_iterator2 | end2 () const |
int32_t | getSize1 () const |
int32_t | getSize2 () const |
int32_t | getNonZeroElementCount () const |
bool | hasElement (int32_t i, int32_t j) const |
const_reference | operator() (int32_t i, int32_t j) const |
reference | operator() (int32_t i, int32_t j) |
bool | isSquare () const |
void | setZero () |
void | setIdentity () |
void | setRow (int32_t s1, const std::vector< double > &row) |
void | setColumn (int32_t s2, const std::vector< double > &column) |
void | fill (const double &value) |
void | fill (int32_t offset1, int32_t offset2, int32_t size1, int32_t size2, const double &value) |
void | fill (int32_t offset1, int32_t offset2, const SparseMatrix &other, int32_t size1=0, int32_t size2=0) |
void | setDiagonal (const double &value) |
void | transpose () |
double | getTrace () const |
SparseMatrix | getTransposition () const |
SparseMatrix | getComposition (const SparseMatrix &other) const |
std::vector< double > | getComposition (const std::vector< double > &other) const |
std::vector< double > | toVector () const |
std::vector< double > | getRow (int32_t i) const |
std::vector< double > | getColumn (int32_t j) const |
template<typename VectorType > | |
VectorType | getSparseRow (int32_t i) const |
template<typename VectorType > | |
VectorType | getSparseColumn (int32_t i) const |
void | erase_element (int32_t i, int32_t j) |
void | read (const std::string &filename, const std::string &openmode="binar", bool bswap=false) |
Avoid using this function, prefer the more standard Reader<SparseMatrix> instead. More... | |
void | write (const std::string &filename, const std::string &openmode="binar", bool bswap=false) const |
Avoid using this function, prefer the more standard Writer<SparseMatrix> instead. More... | |
aims::SparseMatrix & | operator+= (const aims::SparseMatrix &thing) |
aims::SparseMatrix & | operator-= (const aims::SparseMatrix &thing) |
aims::SparseMatrix & | operator*= (double x) |
aims::SparseMatrix & | operator/= (double x) |
boost_sparse_matrix & | boostMatrix () |
for low-level boost operations More... | |
const boost_sparse_matrix & | boostMatrix () const |
carto::Object | header () |
const carto::Object | header () const |
void | setHeader (carto::Object ph) |
![]() | |
RCObject () | |
RCObject (const RCObject &) | |
RCObject & | operator= (const RCObject &) |
virtual | ~RCObject () |
Protected Attributes | |
boost_sparse_matrix | _matrix |
carto::Object | _header |
Definition at line 57 of file sparseMatrix.h.
typedef boost_sparse_matrix::const_iterator1 aims::SparseMatrix::const_iterator1 |
Definition at line 71 of file sparseMatrix.h.
typedef boost_sparse_matrix::const_iterator2 aims::SparseMatrix::const_iterator2 |
Definition at line 73 of file sparseMatrix.h.
typedef boost_sparse_matrix::const_reference aims::SparseMatrix::const_reference |
Definition at line 65 of file sparseMatrix.h.
typedef boost_sparse_matrix::iterator1 aims::SparseMatrix::iterator1 |
Definition at line 67 of file sparseMatrix.h.
typedef boost_sparse_matrix::iterator2 aims::SparseMatrix::iterator2 |
Definition at line 68 of file sparseMatrix.h.
typedef boost_sparse_matrix::reference aims::SparseMatrix::reference |
Definition at line 63 of file sparseMatrix.h.
aims::SparseMatrix::SparseMatrix | ( | int32_t | size1 = 1 , |
int32_t | size2 = 1 |
||
) |
aims::SparseMatrix::SparseMatrix | ( | const SparseMatrix & | other | ) |
|
virtual |
iterator1 aims::SparseMatrix::begin1 | ( | ) |
const_iterator1 aims::SparseMatrix::begin1 | ( | ) | const |
iterator2 aims::SparseMatrix::begin2 | ( | ) |
const_iterator2 aims::SparseMatrix::begin2 | ( | ) | const |
|
inline |
|
inline |
Definition at line 163 of file sparseMatrix.h.
References _matrix.
iterator1 aims::SparseMatrix::end1 | ( | ) |
const_iterator1 aims::SparseMatrix::end1 | ( | ) | const |
iterator2 aims::SparseMatrix::end2 | ( | ) |
const_iterator2 aims::SparseMatrix::end2 | ( | ) | const |
void aims::SparseMatrix::erase_element | ( | int32_t | i, |
int32_t | j | ||
) |
void aims::SparseMatrix::fill | ( | const double & | value | ) |
void aims::SparseMatrix::fill | ( | int32_t | offset1, |
int32_t | offset2, | ||
const SparseMatrix & | other, | ||
int32_t | size1 = 0 , |
||
int32_t | size2 = 0 |
||
) |
void aims::SparseMatrix::fill | ( | int32_t | offset1, |
int32_t | offset2, | ||
int32_t | size1, | ||
int32_t | size2, | ||
const double & | value | ||
) |
std::vector<double> aims::SparseMatrix::getColumn | ( | int32_t | j | ) | const |
SparseMatrix aims::SparseMatrix::getComposition | ( | const SparseMatrix & | other | ) | const |
std::vector<double> aims::SparseMatrix::getComposition | ( | const std::vector< double > & | other | ) | const |
int32_t aims::SparseMatrix::getNonZeroElementCount | ( | ) | const |
std::vector<double> aims::SparseMatrix::getRow | ( | int32_t | i | ) | const |
int32_t aims::SparseMatrix::getSize1 | ( | ) | const |
int32_t aims::SparseMatrix::getSize2 | ( | ) | const |
|
inline |
Definition at line 211 of file sparseMatrix.h.
|
inline |
Definition at line 179 of file sparseMatrix.h.
double aims::SparseMatrix::getTrace | ( | ) | const |
SparseMatrix aims::SparseMatrix::getTransposition | ( | ) | const |
bool aims::SparseMatrix::hasElement | ( | int32_t | i, |
int32_t | j | ||
) | const |
|
inline |
Definition at line 165 of file sparseMatrix.h.
References _header.
|
inline |
Definition at line 166 of file sparseMatrix.h.
References _header.
bool aims::SparseMatrix::isSquare | ( | ) | const |
reference aims::SparseMatrix::operator() | ( | int32_t | i, |
int32_t | j | ||
) |
const_reference aims::SparseMatrix::operator() | ( | int32_t | i, |
int32_t | j | ||
) | const |
aims::SparseMatrix& aims::SparseMatrix::operator*= | ( | double | x | ) |
aims::SparseMatrix& aims::SparseMatrix::operator+= | ( | const aims::SparseMatrix & | thing | ) |
aims::SparseMatrix& aims::SparseMatrix::operator-= | ( | const aims::SparseMatrix & | thing | ) |
aims::SparseMatrix& aims::SparseMatrix::operator/= | ( | double | x | ) |
SparseMatrix& aims::SparseMatrix::operator= | ( | const SparseMatrix & | other | ) |
void aims::SparseMatrix::read | ( | const std::string & | filename, |
const std::string & | openmode = "binar" , |
||
bool | bswap = false |
||
) |
Avoid using this function, prefer the more standard Reader<SparseMatrix> instead.
void aims::SparseMatrix::reallocate | ( | int32_t | size1, |
int32_t | size2 | ||
) |
void aims::SparseMatrix::setColumn | ( | int32_t | s2, |
const std::vector< double > & | column | ||
) |
void aims::SparseMatrix::setDiagonal | ( | const double & | value | ) |
void aims::SparseMatrix::setHeader | ( | carto::Object | ph | ) |
void aims::SparseMatrix::setIdentity | ( | ) |
void aims::SparseMatrix::setRow | ( | int32_t | s1, |
const std::vector< double > & | row | ||
) |
void aims::SparseMatrix::setZero | ( | ) |
std::vector<double> aims::SparseMatrix::toVector | ( | ) | const |
void aims::SparseMatrix::transpose | ( | ) |
void aims::SparseMatrix::write | ( | const std::string & | filename, |
const std::string & | openmode = "binar" , |
||
bool | bswap = false |
||
) | const |
Avoid using this function, prefer the more standard Writer<SparseMatrix> instead.
|
protected |
Definition at line 172 of file sparseMatrix.h.
Referenced by header().
|
protected |
Definition at line 171 of file sparseMatrix.h.
Referenced by boostMatrix().