tensor-0.1.0
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
tensor::ListGenerator< elt_t > Class Template Reference

Compile-time generator of vectors, tensors and indices. More...

Detailed Description

template<typename elt_t>
class tensor::ListGenerator< elt_t >

Compile-time generator of vectors, tensors and indices.

This placeholder can be used to statically create arrays of data that can then be coerced to Vector, Tensor and Indices types. There are three generators tensor::igen, tensor::rgen and tensor::cgen of types ListGenerator<t> with t = tensor::index, double and cdouble, which can be used as shown in sec_tensor_gen

RTensor a = rgen << 2 << 3 << 4;
Indices d = igen << 1 << 2 << 3 << 5;

Definition at line 41 of file gen.h.