|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
Provides read-only access to NDArray elements. More...
#include <clustering/ndarray.h>
Public Member Functions | |
| ConstAccessor (const NDArray< T, N, Layout::Contig > &ndarray, std::size_t index, std::size_t dim) | |
| Constructs a ConstAccessor for a constant NDArray. | |
| ConstAccessor (const ConstAccessor &other)=default | |
| Defaulted copy constructor; accessors are lightweight and trivially copyable. | |
| ConstAccessor | operator[] (std::size_t index) const noexcept |
| Provides access to the next dimension of the NDArray. | |
| operator T () const noexcept | |
| Converts the accessor to the element type T, allowing read access to the element. | |
| size_t | index () const noexcept |
| Returns the flat index in the NDArray corresponding to the accessor. | |
| Public Member Functions inherited from clustering::NDArray< T, N, L >::BaseAccessor | |
| const T * | data () const |
| Returns a pointer to the element data. | |
Additional Inherited Members | |
| Protected Member Functions inherited from clustering::NDArray< T, N, L >::BaseAccessor | |
| BaseAccessor (NDArray< T, N, Layout::Contig > *ndarray, std::size_t index, std::size_t dim) | |
| Constructs a BaseAccessor for a given NDArray, index, and dimension. | |
| Protected Attributes inherited from clustering::NDArray< T, N, L >::BaseAccessor | |
| NDArray< T, N, Layout::Contig > * | m_ndarray |
| Pointer to the NDArray. | |
| std::size_t | m_index |
| Index in the flat representation of the array. | |
| std::size_t | m_dim |
| Current dimension of the accessor. | |
Provides read-only access to NDArray elements.
|
inline |
|
default |
Defaulted copy constructor; accessors are lightweight and trivially copyable.
|
inlinenodiscardnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Provides access to the next dimension of the NDArray.
| index | Index in the next dimension. |