Cytnx v0.9.1
Loading...
Searching...
No Matches
algo.hpp
Go to the documentation of this file.
1#ifndef _algo_H_
2#define _algo_H_
3
4#include "Type.hpp"
5#include "cytnx_error.hpp"
6#include "Tensor.hpp"
7#include "Storage.hpp"
8#include "Scalar.hpp"
9
10namespace cytnx {
15 namespace algo {
16
22 Tensor Sort(const Tensor &Tin);
23
38
67 Tensor Vstack(const std::vector<Tensor> &In_tensors);
68
95 Tensor Hstack(const std::vector<Tensor> &In_tensors);
96
107 void Vsplit_(std::vector<Tensor> &out, const Tensor &Tin, const std::vector<cytnx_uint64> &dims);
108
119 void Hsplit_(std::vector<Tensor> &out, const Tensor &Tin, 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
204
205
206
207
208
210 Tensor _fx_Matric_combine(std::vector<Tensor> &Tlist, const cytnx_uint64 &Row_Nblk, const cytnx_uint64 &Col_Nblk);
211 void _fx_Matric_split(std::vector<Tensor> &out, const Tensor &Tin, const std::vector<cytnx_uint64> &rdims, const std::vector<cytnx_uint64> &cdims);
213
214
215
216
217 } // namespace algo
218} // namespace cytnx
219
220#endif
an tensor (multi-dimensional array)
Definition Tensor.hpp:345
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
uint64_t cytnx_uint64
Definition Type.hpp:45