MPQC
3.0.0-alpha
|
#include <mpqc/math/tensor/base.hpp>
Public Types | |
typedef boost::array< size_t, N > | Dims |
typedef boost::array< size_t, N > | Strides |
Public Member Functions | |
TensorBase (T *data, const size_t *dims, const size_t *ld=NULL) | |
size_t | size () const |
const Dims & | dims () const |
template<typename U , class O > | |
void | operator= (const TensorBase< const U, N, O > &u) |
void | operator= (const TensorBase &o) |
template<class Seq > | |
T & | operator() (const detail::Tensor::integral_tie< Seq > &idx) |
element-access operator | |
template<class Seq > | |
const T & | operator() (const detail::Tensor::integral_tie< Seq > &idx) const |
element-access operator | |
template<class Seq > | |
TensorBase< T, N, Order > | operator() (const detail::Tensor::range_tie< Seq > &tie) |
template<class Seq > | |
TensorBase< const T, N, Order > | operator() (const detail::Tensor::range_tie< Seq > &tie) const |
Static Public Attributes | |
static const size_t | RANK = N |
Protected Attributes | |
T * | data_ |
Dims | dims_ |
Strides | strides_ |
Friends | |
class | TensorBase< typename boost::remove_const< T >::type, N, Order > |
Tensor base class.
For performance reasons the storage order needs to be known at compile time, for time being I assume col-major as default (Eigen default). Only the first major dimenstion is assumed to be contiguous. Only minimum functionality is provided, namely element and range operators