12 #ifndef HAMMER_MATH_IMULTICONTAINER
13 #define HAMMER_MATH_IMULTICONTAINER
22 namespace MultiDimensional {
38 virtual size_t rank()
const = 0;
56 virtual reference element(IndexList::const_iterator start, IndexList::const_iterator
end) = 0;
57 virtual ElementType element(IndexList::const_iterator start, IndexList::const_iterator
end)
const = 0;
61 virtual void clear() = 0;
68 using SerialType = std::pair<flatbuffers::Offset<void>, Serial::FBTensorTypes>;
70 virtual SerialType write(flatbuffers::FlatBufferBuilder* msgwriter)
const = 0;
virtual IContainer & operator*=(double value)=0
virtual size_t entrySize() const =0
std::pair< flatbuffers::Offset< void >, Serial::FBTensorTypes > SerialType
Forward declaration of serialization related typedefs and includes.
virtual LabelsList labels() const =0
std::vector< IndexPair > IndexPairList
virtual bool compare(const IContainer &other) const =0
virtual IndexPairList getSpinLabelPairs() const =0
virtual size_t rank() const =0
virtual TensorData clone() const =0
virtual size_t dataSize() const =0
virtual IndexPairList getSameLabelPairs(const IContainer &other, const UniqueLabelsList &indices) const =0
std::complex< double > ElementType
virtual IndexType labelToIndex(IndexLabel label) const =0
std::unique_ptr< IContainer > TensorData
Forward declarations of types used in the tensor classes.
const ElementType & const_reference
std::vector< IndexType > IndexList
virtual SerialType write(flatbuffers::FlatBufferBuilder *msgwriter) const =0
IndexLabel
label identifiers of tensor indices they are used to determine which indices can be contracted togeth...
virtual IndexList dims() const =0
virtual bool isSameShape(const IContainer &other) const =0
std::vector< IndexLabel > LabelsList
std::set< IndexLabel > UniqueLabelsList
virtual size_t numValues() const =0
IContainer & operator=(const IContainer &)=default
virtual bool canAddAt(const IContainer &subContainer, IndexLabel coord, IndexType position) const =0
auto end(reversion_wrapper< T > w)
virtual IContainer & conjugate()=0
virtual reference element(const IndexList &coords={})=0