1#ifndef PLAIN_INTERFACE_EIGEN_IMPL_H_
2#define PLAIN_INTERFACE_EIGEN_IMPL_H_
5#include <unsupported/Eigen/CXX11/Tensor>
9struct PlainInterface :
public MatrixInterface,
public TensorInterface,
public VectorInterface
42 template <std::
size_t Rank,
typename Derived,
typename ClebschScalar,
typename Scalar>
48 const ClebschScalar&
scale,
51 template <std::
size_t Rank,
typename Derived,
typename ClebschScalar,
typename Scalar>
57 const ClebschScalar&
scale,
60 template <std::
size_t Rank,
typename Derived,
typename ClebschScalar,
typename Scalar>
66 const ClebschScalar&
scale,
69 template <std::
size_t Rank,
typename Derived,
typename ClebschScalar,
typename Scalar>
75 const ClebschScalar&
scale,
78 template <std::
size_t Rank,
typename Derived>
84 const std::array<Indextype, Rank>& dims);
86 template <
typename Derived>
89 template <
typename Scalar>
92 template <
typename Scalar>
95 template <
typename Derived>
97 svd(
const Eigen::MatrixBase<Derived>& M);
99 template <
typename Scalar>
105#ifndef XPED_COMPILED_LIB
static void setZero(MType< Scalar > &M)
Definition: MatrixInterface_Cyclops_impl.cpp:47
static void setConstant(MType< Scalar > &M, const Scalar &val)
Definition: MatrixInterface_Cyclops_impl.cpp:65
static MType< Scalar > construct_with_zero(const MIndextype &rows, const MIndextype &cols, CTF::World &world)
Definition: MatrixInterface_Cyclops_impl.cpp:32
static void print(MT &&M)
Definition: MatrixInterface_Cyclops_impl.cpp:343
static Scalar getVal(const MType< Scalar > &M, const MIndextype &row, const MIndextype &col)
Definition: MatrixInterface_Cyclops_impl.cpp:136
static void setRandom(MType< Scalar > &M)
Definition: MatrixInterface_Cyclops_impl.cpp:53
static MIndextype cols(const MType< Scalar > &M)
Definition: MatrixInterface_Cyclops_impl.cpp:90
static MType< typename ctf_traits< MT1 >::Scalar > difference(MT1 &&M1, MT2 &&M2)
Definition: MatrixInterface_Cyclops_impl.cpp:219
static MIndextype rows(const MType< Scalar > &M)
Definition: MatrixInterface_Cyclops_impl.cpp:84
static MType< Scalar > construct(const MIndextype &rows, const MIndextype &cols, CTF::World &world)
Definition: MatrixInterface_Cyclops_impl.cpp:26
static const Scalar * get_raw_data(const Eigen::Matrix< Scalar, -1, -1 > &M)
Definition: MatrixInterface_Eigen_impl.hpp:81
static MType< typename ctf_traits< MT1 >::Scalar > add(MT1 &&M1, MT2 &&M2)
Definition: MatrixInterface_Cyclops_impl.cpp:210
static void setVal(MType< Scalar > &M, const MIndextype row, const MIndextype col, const Scalar &val)
static void scale(MType< Scalar > &M, const Scalar &val)
Definition: MatrixInterface_Cyclops_impl.cpp:228
CTF::Matrix< Scalar > MType
Definition: MatrixInterface_Cyclops_impl.hpp:40
static void vec_diff(VT &&vec, MType< typename ctf_traits< VT >::Scalar > &res)
static MType< Scalar > vec_to_diagmat(const VType< Scalar > &V)
int Indextype
Definition: PlainInterface_Cyclops_impl.hpp:11
static void add_to_block_from_tensor(MType< Scalar > &M, const Indextype &row_off, const Indextype &col_off, const Indextype &rows, const Indextype &cols, const Scalar &scale, const TType< Scalar, Rank > &T)
Definition: PlainInterface_Cyclops_impl.cpp:63
static void diagonal_head_matrix_to_vector(VType< typename Derived::Scalar > &V, const Eigen::MatrixBase< Derived > &M, const Indextype &n_elems)
static TType< typename Derived::Scalar, Rank > tensor_from_matrix_block(const Eigen::MatrixBase< Derived > &M, const Indextype &row, const Indextype &col, const Indextype &rows, const Indextype &cols, const std::array< Indextype, Rank > &dims)
static std::tuple< MType< typename ctf_traits< MT >::Scalar >, VType< typename ctf_traits< MT >::Scalar >, MType< typename ctf_traits< MT >::Scalar > > svd(MT &&M)
Definition: PlainInterface_Cyclops_impl.cpp:138
static void set_block_from_tensor(MType< Scalar > &M, const Indextype &row_off, const Indextype &col_off, const Indextype &rows, const Indextype &cols, const Scalar &scale, const TType< Scalar, Rank > &T)
Definition: PlainInterface_Cyclops_impl.cpp:36
static void scale(MType< Scalar > &M, const Scalar &val)
Definition: MatrixInterface_Cyclops_impl.cpp:228
static void vec_add(VT &&vec, MType< typename ctf_traits< VT >::Scalar > &res)
nda::dense_array< Scalar, Rank > TType
Definition: TensorInterface_Array_impl.hpp:44
static void setZero(TType< Scalar, Rank > &T)
Definition: TensorInterface_Array_impl.hpp:95
static void setConstant(TType< Scalar, Rank > &T, const Scalar &val)
Definition: TensorInterface_Array_impl.hpp:107
static std::string print(const TType< Scalar, Rank > &T)
Definition: TensorInterface_Array_impl.hpp:389
static Scalar getVal(const TType< Scalar, Rank > &T, const std::array< Indextype, Rank > &index)
Definition: TensorInterface_Array_impl.hpp:119
static TType< Scalar, Rank > construct(const std::array< Indextype, Rank > &dims, mpi::XpedWorld &world=mpi::getUniverse())
Definition: TensorInterface_Array_impl.hpp:58
static void setVal(TType< Scalar, Rank > &T, const std::array< Indextype, Rank > &index, const Scalar &val)
Definition: TensorInterface_Array_impl.hpp:113
static const Scalar * get_raw_data(const TType< Scalar, Rank > &T)
Definition: TensorInterface_Array_impl.hpp:130
static void setRandom(TType< Scalar, Rank > &T)
Definition: TensorInterface_Array_impl.hpp:101
static void setZero(VType< Scalar > &V)
Definition: VectorInterface_Cyclops_impl.cpp:34
static VType< Scalar > construct(const VIndextype &elems, CTF::World &world)
Definition: VectorInterface_Cyclops_impl.cpp:15
static VType< Scalar > construct_with_zero(const VIndextype &elems, CTF::World &world)
Definition: VectorInterface_Cyclops_impl.cpp:21
static void setRandom(VType< Scalar > &V)
Definition: VectorInterface_Cyclops_impl.cpp:40
static std::string print(const VType< Scalar > &V)
Definition: VectorInterface_Cyclops_impl.cpp:92
static void setConstant(VType< Scalar > &V, const Scalar &val)
Definition: VectorInterface_Cyclops_impl.cpp:46
static VType< Scalar > scale(VT1 &&V, const Scalar &val)
Definition: VectorInterface_Cyclops_impl.cpp:75
CTF::Vector< Scalar > VType
Definition: VectorInterface_Cyclops_impl.hpp:12