All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
NetworKit::Quadtree< T, poincare > Class Template Reference

#include <Quadtree.h>

Public Member Functions

 Quadtree ()
 
 Quadtree (double maxR, bool theoreticalSplit=false, double alpha=1, count capacity=1000, double balance=0.5)
 
 Quadtree (const vector< double > &angles, const vector< double > &radii, const vector< T > &content, double stretch, bool theoreticalSplit=false, double alpha=1, count capacity=1000, double balance=0.5)
 
void addContent (T newcomer, double angle, double r)
 
bool removeContent (T toRemove, double angle, double r)
 
vector< T > getElements () const
 Get all elements, regardless of position. More...
 
void extractCoordinates (vector< double > &anglesContainer, vector< double > &radiiContainer) const
 
vector< T > getElementsInHyperbolicCircle (Point2D< double > circleCenter, double hyperbolicRadius) const
 Get elements whose hyperbolic distance to the query point is less than the hyperbolic distance. More...
 
void getElementsInHyperbolicCircle (const Point2D< double > circleCenter, const double hyperbolicRadius, const bool suppressLeft, vector< T > &circleDenizens) const
 
void getElementsInHyperbolicCircle (const Point2D< double > circleCenter, const double hyperbolicRadius, vector< T > &circleDenizens) const
 
count getElementsProbabilistically (Point2D< double > euQuery, std::function< double(double)> prob, vector< T > &circleDenizens)
 
count getElementsProbabilistically (Point2D< double > euQuery, std::function< double(double)> prob, bool suppressLeft, vector< T > &circleDenizens)
 
void recount ()
 
count size () const
 
count height () const
 
count countLeaves () const
 
index indexSubtree (index nextID)
 
index getCellID (double phi, double r) const
 
double getMaxRadius () const
 
void reindex ()
 
void trim ()
 trims the vectors used to hold the content in the leaf cells. More...
 

Friends

class QuadTreeGTest
 

Constructor & Destructor Documentation

template<class T, bool poincare = true>
NetworKit::Quadtree< T, poincare >::Quadtree ( )
inline
template<class T, bool poincare = true>
NetworKit::Quadtree< T, poincare >::Quadtree ( double  maxR,
bool  theoreticalSplit = false,
double  alpha = 1,
count  capacity = 1000,
double  balance = 0.5 
)
inline
Parameters
maxRRadius of the managed area. Must be smaller than 1.
theoreticalSplitIf true, split cells to get the same area in each child cell. Default is false
alphadispersion Parameter of the point distribution. Only has an effect if theoretical split is true
capacityHow many points can inhabit a leaf cell before it is split up?
template<class T, bool poincare = true>
NetworKit::Quadtree< T, poincare >::Quadtree ( const vector< double > &  angles,
const vector< double > &  radii,
const vector< T > &  content,
double  stretch,
bool  theoreticalSplit = false,
double  alpha = 1,
count  capacity = 1000,
double  balance = 0.5 
)
inline

Member Function Documentation

template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::addContent ( newcomer,
double  angle,
double  r 
)
inline
Parameters
newcomercontent to be added at point x
angleangular coordinate of x
Rradial coordinate of x
template<class T, bool poincare = true>
count NetworKit::Quadtree< T, poincare >::countLeaves ( ) const
inline
template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::extractCoordinates ( vector< double > &  anglesContainer,
vector< double > &  radiiContainer 
) const
inline
template<class T, bool poincare = true>
index NetworKit::Quadtree< T, poincare >::getCellID ( double  phi,
double  r 
) const
inline
template<class T, bool poincare = true>
vector<T> NetworKit::Quadtree< T, poincare >::getElements ( ) const
inline

Get all elements, regardless of position.

Returns
vector<T> of elements
template<class T, bool poincare = true>
vector<T> NetworKit::Quadtree< T, poincare >::getElementsInHyperbolicCircle ( Point2D< double >  circleCenter,
double  hyperbolicRadius 
) const
inline

Get elements whose hyperbolic distance to the query point is less than the hyperbolic distance.

Parameters
circleCenterCartesian coordinates of the query circle's center
hyperbolicRadiusRadius of the query circle
template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::getElementsInHyperbolicCircle ( const Point2D< double >  circleCenter,
const double  hyperbolicRadius,
const bool  suppressLeft,
vector< T > &  circleDenizens 
) const
inline

If the circle overlaps the 2 line, we have to make two separate calls and collect

get Elements in Euclidean circle

template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::getElementsInHyperbolicCircle ( const Point2D< double >  circleCenter,
const double  hyperbolicRadius,
vector< T > &  circleDenizens 
) const
inline
template<class T, bool poincare = true>
count NetworKit::Quadtree< T, poincare >::getElementsProbabilistically ( Point2D< double >  euQuery,
std::function< double(double)>  prob,
vector< T > &  circleDenizens 
)
inline
template<class T, bool poincare = true>
count NetworKit::Quadtree< T, poincare >::getElementsProbabilistically ( Point2D< double >  euQuery,
std::function< double(double)>  prob,
bool  suppressLeft,
vector< T > &  circleDenizens 
)
inline
template<class T, bool poincare = true>
double NetworKit::Quadtree< T, poincare >::getMaxRadius ( ) const
inline
template<class T, bool poincare = true>
count NetworKit::Quadtree< T, poincare >::height ( ) const
inline
template<class T, bool poincare = true>
index NetworKit::Quadtree< T, poincare >::indexSubtree ( index  nextID)
inline
template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::recount ( )
inline
template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::reindex ( )
inline
template<class T, bool poincare = true>
bool NetworKit::Quadtree< T, poincare >::removeContent ( toRemove,
double  angle,
double  r 
)
inline
Parameters
newcomercontent to be removed at point x
angleangular coordinate of x
Rradial coordinate of x
template<class T, bool poincare = true>
count NetworKit::Quadtree< T, poincare >::size ( ) const
inline
template<class T, bool poincare = true>
void NetworKit::Quadtree< T, poincare >::trim ( )
inline

trims the vectors used to hold the content in the leaf cells.

Reduces memory usage, makes changes slower

Friends And Related Function Documentation

template<class T, bool poincare = true>
friend class QuadTreeGTest
friend

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