Image Component Library (ICL)
Public Member Functions | Public Attributes | List of all members
icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator Struct Reference

Inernally used block allocator. More...

#include <Octree.h>

Public Member Functions

 Allocator ()
 allocates the first data chunk More...
 
void grow ()
 allocates the next data chunk More...
 
void clear ()
 deletes all allocated data chunks (except for the first) More...
 
Nodenext ()
 returns the next four Node instances (allocates new data on demand) More...
 
 ~Allocator ()
 frees all allocated data More...
 
std::vector< Pt > all () const
 returns all contained points More...
 

Public Attributes

std::vector< Node * > allocated
 allocated data More...
 
int curr
 current data More...
 

Detailed Description

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
struct icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator

Inernally used block allocator.

The allocator allocates ALLOC_CHUNK_SIZE*4 Node instances at once and automatically frees all data at destruction time

Constructor & Destructor Documentation

◆ Allocator()

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::Allocator ( )
inline

allocates the first data chunk

◆ ~Allocator()

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::~Allocator ( )
inline

frees all allocated data

Member Function Documentation

◆ all()

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
std::vector<Pt> icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::all ( ) const
inline

returns all contained points

◆ clear()

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::clear ( )
inline

deletes all allocated data chunks (except for the first)

◆ grow()

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
void icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::grow ( )
inline

allocates the next data chunk

◆ next()

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
Node* icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::next ( )
inline

returns the next four Node instances (allocates new data on demand)

Member Data Documentation

◆ allocated

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
std::vector<Node*> icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::allocated

allocated data

◆ curr

template<class Scalar, int CAPACITY = 16, int SF = 1, class Pt = FixedColVector<Scalar,4>, int ALLOC_CHUNK_SIZE = 1024>
int icl::math::Octree< Scalar, CAPACITY, SF, Pt, ALLOC_CHUNK_SIZE >::Allocator::curr

current data


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