Tapkee
QuadTree Class Reference

#include <quadtree.hpp>

List of all members.

Public Member Functions

 QuadTree (double *inp_data, int N)
 QuadTree (double *inp_data, double inp_x, double inp_y, double inp_hw, double inp_hh)
 QuadTree (double *inp_data, int N, double inp_x, double inp_y, double inp_hw, double inp_hh)
 QuadTree (QuadTree *inp_parent, double *inp_data, int N, double inp_x, double inp_y, double inp_hw, double inp_hh)
 QuadTree (QuadTree *inp_parent, double *inp_data, double inp_x, double inp_y, double inp_hw, double inp_hh)
 ~QuadTree ()
void setData (double *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, double theta, double neg_f[], double *sum_Q)
void computeEdgeForces (int *row_P, int *col_P, double *val_P, int N, double *pos_f)
void print ()

Private Member Functions

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

Private Attributes

double buff [QT_NO_DIMS]
QuadTreeparent
bool is_leaf
int size
int cum_size
Cell boundary
double * data
double 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 65 of file quadtree.hpp.


Constructor & Destructor Documentation

QuadTree ( double *  inp_data,
int  N 
)

Definition at line 98 of file quadtree.hpp.

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

Definition at line 123 of file quadtree.hpp.

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

Definition at line 131 of file quadtree.hpp.

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

Definition at line 140 of file quadtree.hpp.

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

Definition at line 149 of file quadtree.hpp.

~QuadTree ( )

Definition at line 157 of file quadtree.hpp.

QuadTree ( const QuadTree ) [private]

Member Function Documentation

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

Definition at line 348 of file quadtree.hpp.

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

Definition at line 315 of file quadtree.hpp.

void fill ( int  N) [private]

Definition at line 424 of file quadtree.hpp.

void getAllIndices ( int *  indices)

Definition at line 300 of file quadtree.hpp.

int getAllIndices ( int *  indices,
int  loc 
) [private]

Definition at line 430 of file quadtree.hpp.

int getDepth ( )

Definition at line 305 of file quadtree.hpp.

Definition at line 170 of file quadtree.hpp.

void init ( QuadTree inp_parent,
double *  inp_data,
double  inp_x,
double  inp_y,
double  inp_hw,
double  inp_hh 
) [private]

Definition at line 405 of file quadtree.hpp.

bool insert ( int  new_index)

Definition at line 178 of file quadtree.hpp.

bool isCorrect ( )

Definition at line 248 of file quadtree.hpp.

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

Definition at line 372 of file quadtree.hpp.

void rebuildTree ( )

Definition at line 262 of file quadtree.hpp.

void setData ( double *  inp_data)

Definition at line 165 of file quadtree.hpp.

void subdivide ( )

Definition at line 224 of file quadtree.hpp.


Member Data Documentation

Cell boundary [private]

Definition at line 82 of file quadtree.hpp.

double buff[QT_NO_DIMS] [private]

Definition at line 73 of file quadtree.hpp.

double center_of_mass[QT_NO_DIMS] [private]

Definition at line 86 of file quadtree.hpp.

int cum_size [private]

Definition at line 79 of file quadtree.hpp.

double* data [private]

Definition at line 85 of file quadtree.hpp.

int index[QT_NODE_CAPACITY] [private]

Definition at line 87 of file quadtree.hpp.

bool is_leaf [private]

Definition at line 77 of file quadtree.hpp.

QuadTree* northEast [private]

Definition at line 91 of file quadtree.hpp.

QuadTree* northWest [private]

Definition at line 90 of file quadtree.hpp.

QuadTree* parent [private]

Definition at line 76 of file quadtree.hpp.

const int QT_NO_DIMS = 2 [static, private]

Definition at line 69 of file quadtree.hpp.

const int QT_NODE_CAPACITY = 1 [static, private]

Definition at line 70 of file quadtree.hpp.

int size [private]

Definition at line 78 of file quadtree.hpp.

QuadTree* southEast [private]

Definition at line 93 of file quadtree.hpp.

QuadTree* southWest [private]

Definition at line 92 of file quadtree.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines