Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
clustering::Range Struct Reference

Half-open index range with optional positive step for slicing an NDArray axis. More...

#include <clustering/ndarray_range.h>

Public Attributes

std::size_t begin = 0
 Inclusive start index along the target axis.
std::size_t end = std::numeric_limits<std::size_t>::max()
 Exclusive end index; sentinel is clamped to the axis size at slice time.
std::ptrdiff_t step = 1
 Positive stride in element units; negative values are rejected.

Detailed Description

Half-open index range with optional positive step for slicing an NDArray axis.

end defaults to the axis-size sentinel; at slice time it is clamped to m_shape[axis]. Negative step is rejected (no reversed views in v1).

Definition at line 14 of file ndarray_range.h.

Member Data Documentation

◆ begin

std::size_t clustering::Range::begin = 0

Inclusive start index along the target axis.

Definition at line 16 of file ndarray_range.h.

◆ end

std::size_t clustering::Range::end = std::numeric_limits<std::size_t>::max()

Exclusive end index; sentinel is clamped to the axis size at slice time.

Definition at line 18 of file ndarray_range.h.

◆ step

std::ptrdiff_t clustering::Range::step = 1

Positive stride in element units; negative values are rejected.

Definition at line 20 of file ndarray_range.h.


The documentation for this struct was generated from the following file: