|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Class representing an slice of an array. More...
#include <rexlib/core/layout/slice.hpp>
Public Types | |
| using | start_type = std::ptrdiff_t |
| using | count_type = std::size_t |
| using | step_type = std::ptrdiff_t |
Public Member Functions | |
| REXLIB_CONSTEXPR | slice (start_type start, count_type count, step_type step) noexcept |
| Constructor. | |
| slice (const slice &other)=default | |
| slice (slice &&other)=default | |
| slice & | operator= (const slice &other)=default |
| slice & | operator= (slice &&other)=default |
| REXLIB_CONSTEXPR void | set_start (start_type start) noexcept |
| Set the starting index. | |
| REXLIB_CONSTEXPR const start_type & | get_start () const noexcept |
| Get the starting index. | |
| REXLIB_CONSTEXPR void | set_count (count_type count) noexcept |
| Set the index element count. | |
| REXLIB_CONSTEXPR const count_type & | get_count () const noexcept |
| Get the element count. | |
| REXLIB_CONSTEXPR void | set_step (step_type step) noexcept |
| Set the step. | |
| REXLIB_CONSTEXPR const step_type & | get_step () const noexcept |
| Get the step. | |
Friends | |
| REXLIB_CONSTEXPR bool | operator== (const slice &lhs, const slice &rhs) noexcept |
| REXLIB_CONSTEXPR bool | operator!= (const slice &lhs, const slice &rhs) noexcept |
| template<typename T > | |
| std::basic_ostream< T > & | operator<< (std::basic_ostream< T > &os, const slice &s) |
Class representing an slice of an array.
This class is used to represent a slice of an array axis. It consists of a start index, an element count and a step between elements.
|
noexcept |
Constructor.
| start | Index of the first element |
| count | Number of elements. |
| step | Step between consecutive elements |
|
noexcept |
Get the element count.
|
noexcept |
Get the starting index.
|
noexcept |
Get the step.
|
noexcept |
Set the index element count.
| count | New number of elements referred by this slice. |
|
noexcept |
Set the starting index.
| start | Index of the first element |
|
noexcept |
Set the step.
| step | Step between consecutive elements |