mcpele
1.0.0
The Monte Carlo Python Energy Landscape Explorer
|
#include <matrix.h>
Public Member Functions | |
MatrixAdapter (size_t dim1, size_t dim2, dtype val=0) | |
MatrixAdapter (pele::Array< double > v, size_t dim2) | |
MatrixAdapter (double *data, size_t dim1, size_t dim2) | |
dtype const & | operator() (size_t i, size_t j) const |
dtype & | operator() (size_t i, size_t j) |
std::pair< size_t, size_t > | shape () const |
Public Attributes | |
size_t | _dim2 |
This is a very minimal implementation of a matrix. It's primary function is to act as a wrapper for pele::Array, so a pele array can be act as a matrix temporarily. The idea is to redo somthing like the reshape() function in numpy.
pele::MatrixAdapter< dtype >::MatrixAdapter | ( | size_t | dim1, |
size_t | dim2, | ||
dtype | val = 0 |
||
) | [inline] |
pele::MatrixAdapter< dtype >::MatrixAdapter | ( | pele::Array< double > | v, |
size_t | dim2 | ||
) | [inline] |
wrap a pele::Array to act like a matrix
This is like numpy.reshape. v.size() must be divisable by dim2
pele::MatrixAdapter< dtype >::MatrixAdapter | ( | double * | data, |
size_t | dim1, | ||
size_t | dim2 | ||
) | [inline] |
dtype const& pele::MatrixAdapter< dtype >::operator() | ( | size_t | i, |
size_t | j | ||
) | const [inline] |
dtype& pele::MatrixAdapter< dtype >::operator() | ( | size_t | i, |
size_t | j | ||
) | [inline] |
std::pair<size_t, size_t> pele::MatrixAdapter< dtype >::shape | ( | ) | const [inline] |
size_t pele::MatrixAdapter< dtype >::_dim2 |