MPQC  3.0.0-alpha
mpqc::TensorBase< T, N, Order > Struct Template Reference

Tensor base class. More...

#include <mpqc/math/tensor/base.hpp>

Inheritance diagram for mpqc::TensorBase< T, N, Order >:
mpqc::TensorRef< T, N, Order > mpqc::Tensor< T, N, Order >

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 >
 

Detailed Description

template<typename T, size_t N, class Order>
struct mpqc::TensorBase< T, 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


The documentation for this struct was generated from the following file:

Generated at Sun Jan 26 2020 23:24:02 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.