1 #ifndef __SPARSE_TENSOR_H__ 2 #define __SPARSE_TENSOR_H__ 13 template<
typename dtype=
double>
58 void operator=(std::vector<dtype> values);
77 operator std::vector<dtype>();
void read(dtype alpha, dtype *values, dtype beta)
read the sparse set of indices on the parent tensor to values forall(j) i = indices[j]; values[j] = a...
Tensor< dtype > * parent
dense tensor whose subset this sparse tensor is of
Sparse_Tensor()
base constructor
void write(dtype alpha, dtype *values, dtype beta)
set the sparse set of indices on the parent tensor to values forall(j) i = indices[j]; parent[i] = be...
void operator-=(std::vector< dtype > values)
a sparse subset of a tensor
void operator=(std::vector< dtype > values)
void operator+=(std::vector< dtype > values)
std::vector< int64_t > indices
indices of the sparse elements of this tensor
an instance of a tensor within a CTF world
dtype scale
scaling factor by which to scale the tensor elements