![]() |
Sleipnir C++ API
|
#include <sleipnir/autodiff/slice.hpp>
Public Member Functions | |
| constexpr | Slice ()=default |
| constexpr | Slice (slicing::none_t) |
| constexpr | Slice (int start) |
| template<typename Start , typename Stop > requires (std::same_as<Start, slicing::none_t> || std::convertible_to<Start, int>) && (std::same_as<Stop, slicing::none_t> || std::convertible_to<Stop, int>) | |
| constexpr | Slice (Start start, Stop stop) |
| template<typename Start , typename Stop , typename Step > requires (std::same_as<Start, slicing::none_t> || std::convertible_to<Start, int>) && (std::same_as<Stop, slicing::none_t> || std::convertible_to<Stop, int>) && (std::same_as<Step, slicing::none_t> || std::convertible_to<Step, int>) | |
| constexpr | Slice (Start start, Stop stop, Step step) |
| constexpr int | adjust (int length) |
Public Attributes | |
| int | start = 0 |
| Start index (inclusive). | |
| int | stop = 0 |
| Stop index (exclusive). | |
| int | step = 1 |
| Step. | |
Represents a sequence of elements in an iterable object.
|
inlineconstexpr |
Constructs a slice.
Constructs a slice.
| start | Slice start index (inclusive). |
|
inlineconstexpr |
Adjusts start and end slice indices assuming a sequence of the specified length.
| length | The sequence length. |