|
Cytnx v0.9.7
|
object that mimic the python slice to access elements in C++ [this is for c++ API only]. More...
#include <Accessor.hpp>
Public Member Functions | |
| Accessor (const cytnx_int64 &loc) | |
| access the specific index at the assigned rank in Tensor. | |
| template<class T > | |
| Accessor (const std::initializer_list< T > &list) | |
| template<class T > | |
| Accessor (const std::vector< T > &list) | |
| int | type () const |
Static Public Member Functions | |
| static Accessor | all () |
| access the whole rank, this is similar to [:] in python | |
| static Accessor | range (const cytnx_int64 &min, const cytnx_int64 &max, const cytnx_int64 &step=1) |
| access the range at assigned rank, this is similar to min:max:step in python | |
| static Accessor | tilend (const cytnx_int64 &min, const cytnx_int64 &step=1) |
| static Accessor | step (const cytnx_int64 &step) |
| static Accessor | qns (const std::vector< std::vector< cytnx_int64 > > &qns) |
object that mimic the python slice to access elements in C++ [this is for c++ API only].
|
explicit |
access the specific index at the assigned rank in Tensor.
| loc | the specify index |
See also cytnx::Tensor.get() for how to using them.
|
inlineexplicit |
|
inlineexplicit |
|
inlinestatic |
access the whole rank, this is similar to [:] in python
|
inlinestatic |
|
inlinestatic |
access the range at assigned rank, this is similar to min:max:step in python
| min | |
| max | |
| step |
|
inlinestatic |
|
inlinestatic |
|
inline |