29 #ifndef _TENSOR_RSVD_HPP_
30 #define _TENSOR_RSVD_HPP_
38 template <
template <
typename>
class Matrix,
typename C>
39 int rsvd(
const Tensor<Matrix, C> &a,
const Axes &axes_row,
const Axes &axes_col,
40 Tensor<Matrix, C> &u, std::vector<double> &s, Tensor<Matrix, C> &vt,
41 const size_t target_rank,
const size_t oversamp);
43 template <
template <
typename>
class Matrix,
typename C>
44 int rsvd(
const Tensor<Matrix, C> &a,
const Axes &axes_row,
const Axes &axes_col,
45 Tensor<Matrix, C> &u, std::vector<double> &s, Tensor<Matrix, C> &vt,
46 const size_t target_rank);
48 template <
template <
typename>
class Matrix,
typename C,
typename Func1,
50 int rsvd(Func1 &multiply_row, Func2 &multiply_col,
const Shape &shape_row,
51 const Shape &shape_col, Tensor<Matrix, C> &u, std::vector<double> &s,
52 Tensor<Matrix, C> &vt,
const size_t target_rank,
53 const size_t oversamp);
55 template <
template <
typename>
class Matrix,
typename C,
typename Func1,
57 int rsvd(Func1 &multiply_row, Func2 &multiply_col,
const Shape &shape_row,
58 const Shape &shape_col, Tensor<Matrix, C> &u, std::vector<double> &s,
59 Tensor<Matrix, C> &vt,
const size_t target_rank);
61 inline void set_seed(
unsigned int seed);
int rsvd(const Tensor< Matrix, C > &a, const Axes &axes_row, const Axes &axes_col, Tensor< Matrix, C > &u, std::vector< double > &s, Tensor< Matrix, C > &vt, const size_t target_rank, const size_t oversamp)
Singular value decomposition by randomized algorithm.
Definition: rsvd_impl.hpp:82
void set_seed(unsigned int seed)
Set seed for random number generator.
Definition: rsvd_impl.hpp:197
Definition: complex.hpp:34
Index Shape
Definition: tensor.hpp:46
Index Axes
Definition: tensor.hpp:45