25 namespace MultiDimensional {
39 for (
size_t index = 0; index < b.
numValues(); ++index) {
41 a[newpos] += b[index];
43 return static_cast<Base*
>(&a);
47 for (
auto it = b.
begin(); it != b.
end(); ++it) {
49 a[newpos] += it->second;
51 return static_cast<Base*
>(&a);
55 for (
auto it = b.
begin(); it != b.
end(); ++it) {
58 a[newpos] += it->second;
60 return static_cast<Base*
>(&a);
65 for (
size_t index = 0; index < b.
numValues(); ++index) {
67 a[newpos] += b[index];
69 return static_cast<Base*
>(&a);
79 for (
auto it = bf.begin(); it != bf.end(); ++it) {
82 a[newpos] += b.
value(*it);
84 return static_cast<Base*
>(&a);
90 for (
auto it = bf.begin(); it != bf.end(); ++it) {
92 a[newpos] += b.
value(*it);
94 return static_cast<Base*
>(&a);
102 throw Error(
"Invalid data types for tensor AddAt");
IContainer * error(IContainer &, const IContainer &)
const LabeledIndexing< SequentialIndexing > & getIndexing() const
const LabeledIndexing< AlignedIndexing > & getIndexing() const
IContainer * operator()(VectorContainer &first, const VectorContainer &second)
Non-sparse tensor data container.
Sub-tensor block insertion algorithm.
(Sum of) Outer product tensor data container
Hammer exception definitions.
size_t numValues() const override
Sparse tensor data container.
IndexList dims() const override
Generic tensor indexing iterator.
ElementType value(const IndexList &indices) const