Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
decomposition.h
Go to the documentation of this file.
1 #ifndef __DECOMPOSITION_H__
2 #define __DECOMPOSITION_H__
3 #include "tensor.h"
4 #include "matrix.h"
5 #include "vector.h"
6 namespace CTF {
7 
8  void fold_unfold(Tensor<dtype>& X, Tensor<dtype>& Y);
9 
10  template<typename dtype>
11  class Decomposition {
12  public:
17  virtual Contract_Term operator[](char const * idx_map) = 0;
18  };
19 
20  template<typename dtype>
21  class HoSVD : public Decomposition {
22  public:
24  std::vector< Matrix<dtype> > factor_matrices;
25 
30  HoSVD(Tensor<dtype> T, int * ranks);
31 
37  HoSVD(int * lens, int * ranks);
38 
43  Contract_Term operator[](char const * idx_map);
44 
45  };
46 
47 }
48 
49 #endif
virtual Contract_Term operator[](char const *idx_map)=0
associated an index map with the tensor decomposition for algebra
Tensor< dtype > core_tensor
Definition: decomposition.h:23
std::vector< Matrix< dtype > > factor_matrices
Definition: decomposition.h:24
Definition: apsp.cxx:17
an instance of a tensor within a CTF world
Definition: tensor.h:74
void fold_unfold(Tensor< dtype > &X, Tensor< dtype > &Y)