APIs¶
tesnor.h¶
a tensor
-
namespace
abacus
¶ - template <int dimension>
-
struct
Shape
¶ - #include <tensor.h>
Public Types
-
typedef unsigned
Shape::index_t
¶
Public Functions
-
Shape::Shape
()¶ default constructor, do nothing
-
Shape::Shape
(const Shape < kDimension > & source) constuctor
- Parameters
s
: the shape to copy
-
index_t& abacus::Shape::operator[](index_t idx)
get corresponding index
- Return
- the corresponding dimension size
- Parameters
idx
: dimension index
-
const index_t& abacus::Shape::operator[](index_t idx) const
get corresponding index
- Return
- the corresponding dimension size
- Parameters
idx
: dimension index
Public Members
-
index_t abacus::Shape< dimension >::shape_[kDimension]
a list to store the shape
Public Static Attributes
-
const int
Shape::kDimension
= dimension¶ dimension of the shape
-
typedef unsigned