Marine systems simulation
CoRiBoDynamics::DataStructures::Sparse3DArray Class Reference

#include <DataStructures.h>

+ Collaboration diagram for CoRiBoDynamics::DataStructures::Sparse3DArray:

Classes

struct  ARRAY
 
struct  INDEX
 
struct  LINKEDLIST
 

Public Member Functions

void InsertToMap (int x, int y, int z, int ID, RadixSparseSet *set)
 
void CheckMap (int x, int y, int z, RadixSparseSet *set)
 
void Reset ()
 

Static Public Attributes

static const unsigned int BUFFER_SIZE = 512
 
static const unsigned int BRANCH_FACTOR = 5
 
static const unsigned int TREE_DEPTH = 3
 
static const unsigned int BLOCK_SIZE = 0x1<<BRANCH_FACTOR
 
static const unsigned int INDEX_SIZE = 3*TREE_DEPTH
 
static const unsigned int BIT_MASK = BLOCK_SIZE-1
 
static const unsigned int MAX_INDEX = 0x1<<(TREE_DEPTH*BRANCH_FACTOR)
 

Protected Member Functions

INDEX convert (int x, int y, int z)
 

Protected Attributes

ARRAY m_rootArray
 
ObjectFactoryStack< ARRAYm_ARRAY_factory
 
ObjectFactoryStack< LINKEDLISTm_List_factory
 

Detailed Description

sparse 3D map. stores sets of integers in discrete 3D space.

good cache behaviour for lookup/insertion of spatially close elements little/no dynamic allocation once "warmed up" to correct size

Same tree structure as RadixSparseSet, but different behavior at leaf nodes where they now point to the begining of a linked list of elements


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