Tapkee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QuadTree Class Reference

#include <quadtree.hpp>

Public Member Functions

 QuadTree (ScalarType *inp_data, int N)
 
 QuadTree (ScalarType *inp_data, ScalarType inp_x, ScalarType inp_y, ScalarType inp_hw, ScalarType inp_hh)
 
 QuadTree (ScalarType *inp_data, int N, ScalarType inp_x, ScalarType inp_y, ScalarType inp_hw, ScalarType inp_hh)
 
 QuadTree (QuadTree *inp_parent, ScalarType *inp_data, int N, ScalarType inp_x, ScalarType inp_y, ScalarType inp_hw, ScalarType inp_hh)
 
 QuadTree (QuadTree *inp_parent, ScalarType *inp_data, ScalarType inp_x, ScalarType inp_y, ScalarType inp_hw, ScalarType inp_hh)
 
 ~QuadTree ()
 
void setData (ScalarType *inp_data)
 
QuadTreegetParent ()
 
bool insert (int new_index)
 
void subdivide ()
 
bool isCorrect ()
 
void rebuildTree ()
 
void getAllIndices (int *indices)
 
int getDepth ()
 
void computeNonEdgeForces (int point_index, ScalarType theta, ScalarType neg_f[], ScalarType *sum_Q)
 
void computeEdgeForces (int *row_P, int *col_P, ScalarType *val_P, int N, ScalarType *pos_f)
 
void print ()
 

Private Member Functions

 QuadTree (const QuadTree &)
 
QuadTreeoperator= (const QuadTree &)
 
void init (QuadTree *inp_parent, ScalarType *inp_data, ScalarType inp_x, ScalarType inp_y, ScalarType inp_hw, ScalarType inp_hh)
 
void fill (int N)
 
int getAllIndices (int *indices, int loc)
 

Private Attributes

ScalarType buff [QT_NO_DIMS]
 
QuadTreeparent
 
bool is_leaf
 
int size
 
int cum_size
 
Cell boundary
 
ScalarType * data
 
ScalarType center_of_mass [QT_NO_DIMS]
 
int index [QT_NODE_CAPACITY]
 
QuadTreenorthWest
 
QuadTreenorthEast
 
QuadTreesouthWest
 
QuadTreesouthEast
 

Static Private Attributes

static const int QT_NO_DIMS = 2
 
static const int QT_NODE_CAPACITY = 1
 

Detailed Description

Definition at line 67 of file quadtree.hpp.

Constructor & Destructor Documentation

QuadTree ( ScalarType *  inp_data,
int  N 
)

Definition at line 100 of file quadtree.hpp.

QuadTree ( ScalarType *  inp_data,
ScalarType  inp_x,
ScalarType  inp_y,
ScalarType  inp_hw,
ScalarType  inp_hh 
)

Definition at line 125 of file quadtree.hpp.

QuadTree ( ScalarType *  inp_data,
int  N,
ScalarType  inp_x,
ScalarType  inp_y,
ScalarType  inp_hw,
ScalarType  inp_hh 
)

Definition at line 133 of file quadtree.hpp.

QuadTree ( QuadTree inp_parent,
ScalarType *  inp_data,
int  N,
ScalarType  inp_x,
ScalarType  inp_y,
ScalarType  inp_hw,
ScalarType  inp_hh 
)

Definition at line 142 of file quadtree.hpp.

QuadTree ( QuadTree inp_parent,
ScalarType *  inp_data,
ScalarType  inp_x,
ScalarType  inp_y,
ScalarType  inp_hw,
ScalarType  inp_hh 
)

Definition at line 151 of file quadtree.hpp.

~QuadTree ( )

Definition at line 159 of file quadtree.hpp.

QuadTree ( const QuadTree )
private

Member Function Documentation

void computeEdgeForces ( int *  row_P,
int *  col_P,
ScalarType *  val_P,
int  N,
ScalarType *  pos_f 
)

Definition at line 350 of file quadtree.hpp.

void computeNonEdgeForces ( int  point_index,
ScalarType  theta,
ScalarType  neg_f[],
ScalarType *  sum_Q 
)

Definition at line 317 of file quadtree.hpp.

void fill ( int  N)
private

Definition at line 426 of file quadtree.hpp.

void getAllIndices ( int *  indices)

Definition at line 302 of file quadtree.hpp.

int getAllIndices ( int *  indices,
int  loc 
)
private

Definition at line 432 of file quadtree.hpp.

int getDepth ( )

Definition at line 307 of file quadtree.hpp.

QuadTree* getParent ( )

Definition at line 172 of file quadtree.hpp.

void init ( QuadTree inp_parent,
ScalarType *  inp_data,
ScalarType  inp_x,
ScalarType  inp_y,
ScalarType  inp_hw,
ScalarType  inp_hh 
)
private

Definition at line 407 of file quadtree.hpp.

bool insert ( int  new_index)

Definition at line 180 of file quadtree.hpp.

bool isCorrect ( )

Definition at line 250 of file quadtree.hpp.

QuadTree& operator= ( const QuadTree )
private
void print ( )

Definition at line 374 of file quadtree.hpp.

void rebuildTree ( )

Definition at line 264 of file quadtree.hpp.

void setData ( ScalarType *  inp_data)

Definition at line 167 of file quadtree.hpp.

void subdivide ( )

Definition at line 226 of file quadtree.hpp.

Member Data Documentation

Cell boundary
private

Definition at line 84 of file quadtree.hpp.

ScalarType buff[QT_NO_DIMS]
private

Definition at line 75 of file quadtree.hpp.

ScalarType center_of_mass[QT_NO_DIMS]
private

Definition at line 88 of file quadtree.hpp.

int cum_size
private

Definition at line 81 of file quadtree.hpp.

ScalarType* data
private

Definition at line 87 of file quadtree.hpp.

int index[QT_NODE_CAPACITY]
private

Definition at line 89 of file quadtree.hpp.

bool is_leaf
private

Definition at line 79 of file quadtree.hpp.

QuadTree* northEast
private

Definition at line 93 of file quadtree.hpp.

QuadTree* northWest
private

Definition at line 92 of file quadtree.hpp.

QuadTree* parent
private

Definition at line 78 of file quadtree.hpp.

const int QT_NO_DIMS = 2
staticprivate

Definition at line 71 of file quadtree.hpp.

const int QT_NODE_CAPACITY = 1
staticprivate

Definition at line 72 of file quadtree.hpp.

int size
private

Definition at line 80 of file quadtree.hpp.

QuadTree* southEast
private

Definition at line 95 of file quadtree.hpp.

QuadTree* southWest
private

Definition at line 94 of file quadtree.hpp.


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