cheshirekow  v0.1.0
mpblocks::simplex_tree::Simplex< Traits > Class Template Reference

base class for nodes, implements storage and interface for the simplex tree More...

#include <mpblocks/simplex_tree/Simplex.h>

Public Types

typedef Traits::Format Format_t
 
typedef unsigned int Index_t
 
typedef Traits::Node Node_t
 
typedef std::vector< Node_t * > NodeList_t
 
typedef Eigen::Matrix
< Format_t, Traits::NDim+1,
Traits::NDim > 
Normals_t
 
typedef Eigen::Matrix
< Format_t, Traits::NDim+1, 1 > 
Offsets_t
 
typedef Eigen::Matrix
< Format_t, Traits::NDim, 1 > 
Point_t
 
typedef Simplex< Traits > Simplex_t
 
typedef std::vector< Simplex_t * > SimplexList_t
 
typedef Eigen::Matrix
< Format_t, Traits::NDim, 1 > 
Vector_t
 

Public Member Functions

bool contains (Node_t *)
 return true if the simplex contains the point More...
 
void initAsLeaf (Simplex_t *parent, Index_t i, Point_t &v)
 initialize the simplex as leaf, reserving storage for all the child node pointers More...
 
void insert (Node_t *)
 insert the point into the simplex, recursively inserting into children or splitting as necessary More...
 
bool isInterior ()
 
bool isLeaf ()
 
void setFace (Index_t i, const Vector_t &n, Format_t d)
 set the i'th face of this simplex with the specified normal and distance More...
 

Protected Member Functions

void split ()
 list of points in this node, if it's a leaf More...
 

Protected Attributes

SimplexList_t m_children
 offsets of the faces More...
 
Offsets_t m_d
 normals of the faces More...
 
Index_t m_idx
 
Normals_t m_n
 vertex of the parent which is replaced in creating this node More...
 
SimplexList_t m_neighbors
 list of neighbors More...
 
NodeList_t m_points
 
Point_t m_v
 index of the vertex of the parent which is replaced in creating this node More...
 

Detailed Description

template<class Traits>
class mpblocks::simplex_tree::Simplex< Traits >

base class for nodes, implements storage and interface for the simplex tree

A node is something which is inserted into the tree. It must provide a notion of a point in {R}^n .

The proper usage is to define a member class of Traits which is the actual node class, and which derives from this class. By CTRP it will contain storage and the necessary interface for the simplex tree, but the derived class is always returned through API calls

Definition at line 48 of file Simplex.h.

Member Typedef Documentation

template<class Traits >
typedef Traits::Format mpblocks::simplex_tree::Simplex< Traits >::Format_t

Definition at line 52 of file Simplex.h.

template<class Traits >
typedef unsigned int mpblocks::simplex_tree::Simplex< Traits >::Index_t

Definition at line 55 of file Simplex.h.

template<class Traits >
typedef Traits::Node mpblocks::simplex_tree::Simplex< Traits >::Node_t

Definition at line 53 of file Simplex.h.

template<class Traits >
typedef std::vector<Node_t*> mpblocks::simplex_tree::Simplex< Traits >::NodeList_t

Definition at line 62 of file Simplex.h.

template<class Traits >
typedef Eigen::Matrix<Format_t,Traits::NDim+1,Traits::NDim> mpblocks::simplex_tree::Simplex< Traits >::Normals_t

Definition at line 58 of file Simplex.h.

template<class Traits >
typedef Eigen::Matrix<Format_t,Traits::NDim+1,1> mpblocks::simplex_tree::Simplex< Traits >::Offsets_t

Definition at line 59 of file Simplex.h.

template<class Traits >
typedef Eigen::Matrix<Format_t,Traits::NDim,1> mpblocks::simplex_tree::Simplex< Traits >::Point_t

Definition at line 57 of file Simplex.h.

template<class Traits >
typedef Simplex<Traits> mpblocks::simplex_tree::Simplex< Traits >::Simplex_t

Definition at line 51 of file Simplex.h.

template<class Traits >
typedef std::vector<Simplex_t*> mpblocks::simplex_tree::Simplex< Traits >::SimplexList_t

Definition at line 61 of file Simplex.h.

template<class Traits >
typedef Eigen::Matrix<Format_t,Traits::NDim,1> mpblocks::simplex_tree::Simplex< Traits >::Vector_t

Definition at line 56 of file Simplex.h.

Member Function Documentation

template<class Traits >
bool mpblocks::simplex_tree::Simplex< Traits >::contains ( Node_t )

return true if the simplex contains the point

template<class Traits >
void mpblocks::simplex_tree::Simplex< Traits >::initAsLeaf ( Simplex_t parent,
Index_t  i,
Point_t v 
)

initialize the simplex as leaf, reserving storage for all the child node pointers

Definition at line 70 of file Simplex.hpp.

template<class Traits >
void mpblocks::simplex_tree::Simplex< Traits >::insert ( Node_t x)

insert the point into the simplex, recursively inserting into children or splitting as necessary

Definition at line 77 of file Simplex.hpp.

template<class Traits >
bool mpblocks::simplex_tree::Simplex< Traits >::isInterior ( )
inline

Definition at line 85 of file Simplex.h.

template<class Traits >
bool mpblocks::simplex_tree::Simplex< Traits >::isLeaf ( )
inline

Definition at line 86 of file Simplex.h.

template<class Traits >
void mpblocks::simplex_tree::Simplex< Traits >::setFace ( Index_t  i,
const Vector_t n,
Format_t  d 
)

set the i'th face of this simplex with the specified normal and distance

template<class Traits >
void mpblocks::simplex_tree::Simplex< Traits >::split ( )
protected

list of points in this node, if it's a leaf

split the node according to the split policy converting it from a leaf node to an interior node

Definition at line 35 of file Simplex.hpp.

Member Data Documentation

template<class Traits >
SimplexList_t mpblocks::simplex_tree::Simplex< Traits >::m_children
protected

offsets of the faces

list of children if it's an interior < simplex

Definition at line 73 of file Simplex.h.

template<class Traits >
Offsets_t mpblocks::simplex_tree::Simplex< Traits >::m_d
protected

normals of the faces

Definition at line 71 of file Simplex.h.

template<class Traits >
Index_t mpblocks::simplex_tree::Simplex< Traits >::m_idx
protected

Definition at line 65 of file Simplex.h.

template<class Traits >
Normals_t mpblocks::simplex_tree::Simplex< Traits >::m_n
protected

vertex of the parent which is replaced in creating this node

Definition at line 70 of file Simplex.h.

template<class Traits >
SimplexList_t mpblocks::simplex_tree::Simplex< Traits >::m_neighbors
protected

list of neighbors

Definition at line 75 of file Simplex.h.

template<class Traits >
NodeList_t mpblocks::simplex_tree::Simplex< Traits >::m_points
protected

Definition at line 77 of file Simplex.h.

template<class Traits >
Point_t mpblocks::simplex_tree::Simplex< Traits >::m_v
protected

index of the vertex of the parent which is replaced in creating this node

Definition at line 67 of file Simplex.h.


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