|
| SymMatrix () |
| Empty constructor. More...
|
|
| SymMatrix (int N) |
| Constructor (known size). More...
|
|
| SymMatrix (const SymMatrix &A) |
| Copy constructor. More...
|
|
| SymMatrix (T *t, int N, bool handleDelete=false) |
| Constructor (pre-allocated). More...
|
|
| SymMatrix (const Matrix< T > &A) |
| Conversion from Matrix. More...
|
|
| ~SymMatrix () |
| Destructor. More...
|
|
SymMatrix | clone () const |
| Cloning. More...
|
|
SymMatrix & | fill (T x) |
| Filling. More...
|
|
Vector< T > | getDiagonal () const |
| Get diagonal. More...
|
|
Matrix< T > | getSubMat (int i0, int m, int j0, int n) const |
| Get sub matrix. More...
|
|
int | ncol () const |
| Number of columns. More...
|
|
int | nrow () const |
| Number of rows. More...
|
|
const T & | operator() (int i, int j) const |
| Read access. More...
|
|
T & | operator() (int i, int j) |
| Write access. More...
|
|
Vector< T > | operator* (const Vector< T > &v) const |
| Product with vector. More...
|
|
Matrix< T > | operator* (const SymMatrix &B) const |
| Product. More...
|
|
Matrix< T > | operator* (const Matrix< T > &B) const |
| Product. More...
|
|
SymMatrix | operator* (T x) const |
| Scalar multiplication. More...
|
|
SymMatrix & | operator*= (T x) |
| Scalar in place multiplication. More...
|
|
SymMatrix | operator+ (const SymMatrix &B) const |
| Addition. More...
|
|
SymMatrix & | operator+= (const SymMatrix &B) |
| In place Addition. More...
|
|
SymMatrix | operator- (const SymMatrix &B) const |
| Substraction. More...
|
|
SymMatrix | operator- () const |
| Opposite. More...
|
|
SymMatrix & | operator-= (const SymMatrix &B) |
| In place Substraction. More...
|
|
SymMatrix | operator/ (T x) const |
| Scalar division. More...
|
|
SymMatrix & | operator/= (T x) |
| Scalar in place division. More...
|
|
SymMatrix & | operator= (const SymMatrix &A) |
| Assignment. More...
|
|
void | read (std::istream &in) |
| Binary read. More...
|
|
void | setSize (int n) |
| Change sizes. More...
|
|
void | write (std::ostream &out) const |
| Binary write. More...
|
|
| Array () |
| Empty constructor. More...
|
|
| Array (size_t size) |
| Constructor (known size). More...
|
|
| Array (T *ptr, size_t size, bool handleDelete=false) |
| Constructor (pre-allocated). More...
|
|
| Array (const Array &A) |
| Copy constructor. More...
|
|
template<typename T2 > |
| Array (const Array< T2 > &A) |
| Constructor (different type). More...
|
|
| Array (const std::list< T > &L) |
| Constructor (from list). More...
|
|
virtual | ~Array () |
| Destructor. More...
|
|
iterator | begin () |
| Begin iterator. More...
|
|
const_iterator | begin () const |
| Begin const iterator. More...
|
|
Array | clone () const |
| Cloning. More...
|
|
T * | data () |
| Data pointer (read/write). More...
|
|
const T * | data () const |
| Data pointer (read). More...
|
|
bool | empty () const |
| Is empty. More...
|
|
iterator | end () |
| End iterator. More...
|
|
const_iterator | end () const |
| End const iterator. More...
|
|
Array & | fill (const T &x) |
| Filling. More...
|
|
Array | getSubArray (size_t offset, size_t size) const |
| Sub array. More...
|
|
bool | operator!= (const Array &A) const |
| Inequality test. More...
|
|
Array & | operator= (const Array &A) |
| Assignment. More...
|
|
template<typename T2 > |
Array & | operator= (const Array< T2 > &A) |
| Assignment (different type). More...
|
|
bool | operator== (const Array &A) const |
| Equality test. More...
|
|
const T & | operator[] (size_t i) const |
| Read access. More...
|
|
T & | operator[] (size_t i) |
| Write access. More...
|
|
void | setSize (size_t size) |
| Change size. More...
|
|
size_t | size () const |
| Size. More...
|
|
template<typename T>
class Imagine::SymMatrix< T >
Symmetric Matrix of variable size. Memory is reference counted, i.e.:
- a=b results in a and b sharing the same memory
- the last object using memory frees it when it dies
- use clone() when this sharing is not desired
- Parameters
-
- Examples:
- LinAlg/test/test.cpp.
Constructs an symmetric matrix from variables type T stored at an already allocated memory. t contains partial rows (0,0), (1,0), (1,1), (2,0), ... Does not allocate fresh memory. Does not free given memory at object destruction unless handleDelete=true. This memory must indeed stay available during object life.
- Parameters
-
t | address of memory |
N | matrix size |
handleDelete | delete memory at destruction? (default=false) T t[]={1,2,3,4,5}; SymMatrix<T> D(t,3); T *t2=new T[5]; SymMatrix<T> D2(t2,3,true); |