Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
ndarray.h File Reference
#include <algorithm>
#include <array>
#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <initializer_list>
#include <memory>
#include <new>
#include <span>
#include <sstream>
#include <type_traits>
#include <utility>
#include <vector>
#include "clustering/ndarray_range.h"
Include dependency graph for ndarray.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clustering::NDArray< T, N, L >
 Represents a multidimensional array (NDArray) of a fixed number of dimensions N and element type T. More...
class  clustering::NDArray< T, N, L >::BaseAccessor
 Inner class providing base functionality for element access in NDArray. More...
class  clustering::NDArray< T, N, L >::ConstAccessor
 Provides read-only access to NDArray elements. More...
class  clustering::NDArray< T, N, L >::Accessor
 Provides read-write access to NDArray elements. More...

Namespaces

namespace  clustering
namespace  clustering::detail

Enumerations

enum class  clustering::NDArrayStorage : std::uint8_t { clustering::Owned , clustering::Borrowed }
 Tag indicating whether an NDArray owns its buffer or borrows memory from elsewhere. More...
enum class  clustering::Layout : std::uint8_t { clustering::Contig , clustering::MaybeStrided }
 Compile-time layout tag for NDArray. More...

Functions

std::atomic< std::uint64_t > & clustering::detail::alignedAllocCallCount () noexcept
 Process-global counter of non-empty AlignedAllocator::allocate calls.
template<class T, class U, std::size_t Align>
bool clustering::detail::operator== (const AlignedAllocator< T, Align > &, const AlignedAllocator< U, Align > &) noexcept
template<class T, class U, std::size_t Align>
bool clustering::detail::operator!= (const AlignedAllocator< T, Align > &, const AlignedAllocator< U, Align > &) noexcept
template<class T, std::size_t NA, Layout LA, std::size_t NB, Layout LB>
bool clustering::sameStorage (const NDArray< T, NA, LA > &a, const NDArray< T, NB, LB > &b) noexcept
 Returns true when a and b share the same underlying allocation.