Cytnx v1.0.0
Loading...
Searching...
No Matches
algo.hpp
Go to the documentation of this file.
1#ifndef CYTNX_ALGO_H_
2#define CYTNX_ALGO_H_
3
4#include "Type.hpp"
5#include "cytnx_error.hpp"
6#include "Tensor.hpp"
7
8namespace cytnx {
13 namespace algo {
14
20 Tensor Sort(const Tensor &Tin);
21
36
65 Tensor Vstack(const std::vector<Tensor> &In_tensors);
66
93 Tensor Hstack(const std::vector<Tensor> &In_tensors);
94
105 void Vsplit_(std::vector<Tensor> &out, const Tensor &Tin,
106 const std::vector<cytnx_uint64> &dims);
107
118 void Hsplit_(std::vector<Tensor> &out, const Tensor &Tin,
119 const std::vector<cytnx_uint64> &dims);
120
159 std::vector<Tensor> Vsplit(const Tensor &Tin, const std::vector<cytnx_uint64> &dims);
160
202 std::vector<Tensor> Hsplit(const Tensor &Tin, const std::vector<cytnx_uint64> &dims);
203
205 Tensor _fx_Matric_combine(std::vector<Tensor> &Tlist, const cytnx_uint64 &Row_Nblk,
206 const cytnx_uint64 &Col_Nblk);
207 void _fx_Matric_split(std::vector<Tensor> &out, const Tensor &Tin,
208 const std::vector<cytnx_uint64> &rdims,
209 const std::vector<cytnx_uint64> &cdims);
211
212 } // namespace algo
213} // namespace cytnx
214
215#endif // CYTNX_ALGO_H_
an tensor (multi-dimensional array)
Definition Tensor.hpp:33
void Hsplit_(std::vector< Tensor > &out, const Tensor &Tin, const std::vector< cytnx_uint64 > &dims)
split a Matrix (a 2d Tensor) into a list of Matrices along the horizontal direction.
Tensor Concatenate(Tensor T1, Tensor T2)
concatenate two 1d Tensor.
void Vsplit_(std::vector< Tensor > &out, const Tensor &Tin, const std::vector< cytnx_uint64 > &dims)
split a Matrix (a 2d Tensor) into a list of Matrices along the vertical direction.
Tensor Sort(const Tensor &Tin)
sort Tensor along last axis.
std::vector< Tensor > Hsplit(const Tensor &Tin, const std::vector< cytnx_uint64 > &dims)
split a Matrix (a 2d Tensor) into a list of Matrices along the horizontal direction.
std::vector< Tensor > Vsplit(const Tensor &Tin, const std::vector< cytnx_uint64 > &dims)
split a Matrix (a 2d Tensor) into a list of Matrices along the vertical direction.
Tensor Vstack(const std::vector< Tensor > &In_tensors)
vertical stack a list of Tensor.
Tensor Hstack(const std::vector< Tensor > &In_tensors)
horizontal stack a list of Tensor.
Definition Accessor.hpp:12