|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
Thin wrapper over new T / delete that satisfies the library's allocator concept.
More...
#include <clustering/memory/new_alloc.h>
Public Member Functions | |
| NewAllocator (std::size_t) | |
| Constructs the allocator; the count hint is ignored since allocations are individual. | |
| NewAllocator (const NewAllocator &)=delete | |
| NewAllocator & | operator= (const NewAllocator &)=delete |
| T * | allocate () |
Allocates one default-constructed T via new. | |
| void | deallocate (T *ptr) |
Frees a pointer previously returned by allocate. | |
| void | reset () |
| No-op; the allocator holds no bulk state to rewind. | |
| bool | isDeallocSupported () |
Reports that per-element deallocate is supported (true for this allocator). | |
Thin wrapper over new T / delete that satisfies the library's allocator concept.
Definition at line 11 of file new_alloc.h.
|
inline |
Constructs the allocator; the count hint is ignored since allocations are individual.
Definition at line 14 of file new_alloc.h.
|
delete |
|
inline |
Allocates one default-constructed T via new.
Definition at line 20 of file new_alloc.h.
|
inline |
Frees a pointer previously returned by allocate.
Definition at line 23 of file new_alloc.h.
|
inline |
Reports that per-element deallocate is supported (true for this allocator).
Definition at line 31 of file new_alloc.h.
|
delete |
|
inline |
No-op; the allocator holds no bulk state to rewind.
Definition at line 26 of file new_alloc.h.