![]() |
NumCpp
2.16.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
A Class for slicing into NdArrays. More...
#include <Slice.hpp>
Public Member Functions | |
| constexpr | Slice ()=default |
| constexpr | Slice (int32 inStart, int32 inStop) noexcept |
| constexpr | Slice (int32 inStart, int32 inStop, int32 inStep) noexcept |
| constexpr | Slice (int32 inStop) noexcept |
| void | makePositiveAndValidate (uint32 inArraySize) |
| uint32 | numElements (uint32 inArraySize) |
| bool | operator!= (const Slice &inOtherSlice) const noexcept |
| bool | operator== (const Slice &inOtherSlice) const noexcept |
| void | print () const |
| std::string | str () const |
| std::vector< uint32 > | toIndices (uint32 inArrayDimSize) |
Data Fields | |
| int32 | start { 0 } |
| int32 | step { 1 } |
| int32 | stop { 1 } |
Friends | |
| std::ostream & | operator<< (std::ostream &inOStream, const Slice &inSlice) |
A Class for slicing into NdArrays.
|
constexprdefault |
Constructor
Constructor
| inStop | (index not included) |
Constructor
| inStart | |
| inStop | (index not included) |
Constructor
| inStart | |
| inStop | (not included) |
| inStep |
Make the slice all positive and does some error checking
| inArraySize |
Returns the number of elements that the slice contains. be aware that this method will also make the slice all positive!
| inArraySize |
Not equality operator
| inOtherSlice |
Equality operator
| inOtherSlice |
|
inline |
Prints the shape to the console
|
inline |
Prints the shape to the console
Returns the indices that coorespond to the slice be aware that this method will also make the slice all positive!
| inArrayDimSize | the size of the dimension that is being sliced |
| int32 nc::Slice::start { 0 } |
| int32 nc::Slice::step { 1 } |
| int32 nc::Slice::stop { 1 } |