#include <ogdf/energybased/fast_multipole_embedder/LinearQuadtree.h>
Classes | |
struct | bottom_up_traversal_functor |
bottom up traversal of the subtree of a given node More... | |
struct | forall_children_functor |
simple functor for iterating over all children of a node More... | |
struct | forall_ordered_pairs_of_children_functor |
functor for iterating over all ordered pairs of children of a node More... | |
struct | forall_points_functor |
simple functor for iterating over all points of a node More... | |
struct | forall_tree_nodes_functor |
simple functor for iterating over all nodes More... | |
struct | is_fence_condition_functor |
struct | is_leaf_condition_functor |
struct | LQNode |
struct | LQPoint |
struct | LQWSPair |
struct | StoreDirectNodeFunctor |
struct | StoreDirectPairFunctor |
struct | StoreWSPairFunctor |
struct | top_down_traversal_functor |
top down traversal of the subtree of a given node More... | |
struct | wspd_functor |
Public Types | |
using | NodeID = unsigned int |
using | PointID = unsigned int |
Public Member Functions | |
LinearQuadtree (uint32_t n, float *origXPos, float *origYPos, float *origSize) | |
constructor. required tree mem will be allocated More... | |
~LinearQuadtree (void) | |
destructor. tree mem will be released More... | |
template<typename F > | |
bottom_up_traversal_functor< F > | bottom_up_traversal (F f) const |
creator More... | |
template<typename F , typename Cond > | |
bottom_up_traversal_functor< F, Cond > | bottom_up_traversal (F f, Cond cond) const |
creator More... | |
NodeID | child (NodeID nodeID, uint32_t i) const |
returns the i th child index of node nodeID More... | |
void | clear () |
resets the tree More... | |
void | computeCoords (NodeID nodeIndex) |
void | computeWSPD () |
void | computeWSPD (NodeID n) |
NodeID | directNode (uint32_t i) const |
NodeID | directNodeA (uint32_t i) const |
NodeID | directNodeB (uint32_t i) const |
PointID | findFirstPointInCell (PointID somePointInCell) const |
NodeID | firstInnerNode () const |
NodeID | firstLeaf () const |
PointID | firstPoint (NodeID nodeID) const |
template<typename F > | |
forall_children_functor< F > | forall_children (F f) const |
creator More... | |
template<typename F > | |
forall_ordered_pairs_of_children_functor< F > | forall_ordered_pairs_of_children (F f) const |
creator More... | |
template<typename Func > | |
forall_points_functor< Func > | forall_points (const Func &func) const |
creator More... | |
template<typename F > | |
forall_tree_nodes_functor< F > | forall_tree_nodes (F f, NodeID begin, uint32_t num) const |
creator More... | |
template<typename A , typename B , typename C > | |
wspd_functor< A, B, C > | forall_well_separated_pairs (A a, B b, C c) |
template<typename A , typename B , typename C , typename ConditionType > | |
wspd_functor< A, B, C, ConditionType > | forall_well_separated_pairs (A a, B b, C c, ConditionType cond) |
void | init (float min_x, float min_y, float max_x, float max_y) |
is_fence_condition_functor | is_fence_condition () const |
creator More... | |
is_leaf_condition_functor | is_leaf_condition () const |
creator More... | |
bool | isFence (NodeID nodeID) const |
sets the fence flag for node nodeID More... | |
bool | isLeaf (NodeID nodeID) const |
returns true if the given node index is a leaf More... | |
bool | isWS (NodeID a, NodeID b) const |
NodeID | level (NodeID nodeID) const |
uint32_t | maxNumberOfNodes () const |
the upper bound for a compressed quadtree (2*numPoints) More... | |
float | maxX () const |
float | maxY () const |
float | minX () const |
float | minY () const |
MortonNR | mortonNr (PointID point) const |
NodeID | nextNode (NodeID nodeID) const |
void | nodeFence (NodeID nodeID) |
NodeID | nodeOfPoint (PointID id) const |
float | nodeSize (NodeID nodeID) const |
float | nodeX (NodeID nodeID) const |
float | nodeY (NodeID nodeID) const |
uint32_t | numberOfChilds (NodeID nodeID) const |
returns the number of children of node nodeID . for an inner node this is 1..4 and can be accessed by child(i). For a leaf the number of points in this leaf is returned starting with point child(0) More... | |
uint32_t | numberOfDirectNodes () const |
uint32_t | numberOfDirectPairs () const |
uint32_t | numberOfInnerNodes () const |
uint32_t | numberOfLeaves () const |
uint32_t | numberOfNodes () const |
returns the number of nodes in this tree More... | |
uint32_t | numberOfPoints () const |
returns the number of points in this tree More... | |
uint32_t | numberOfPoints (NodeID nodeID) const |
returns the number of points contained in the subtree of node nodeID More... | |
uint32_t | numberOfWSP () const |
LQPoint & | point (PointID pointID) |
const LQPoint & | point (PointID pointID) const |
LQPoint * | pointArray () |
NodeID | pointLeaf (PointID point) const |
float * | pointSize () const |
float | pointSize (PointID point) const |
float * | pointX () const |
float | pointX (PointID point) const |
float * | pointY () const |
float | pointY (PointID point) const |
uint32_t | refOfPoint (PointID id) const |
NodeID | root () const |
returns the index of the root More... | |
double | scaleInv () const |
void | setChild (NodeID nodeID, uint32_t i, NodeID c) |
sets the i th child index of node nodeID More... | |
void | setFirstPoint (NodeID nodeID, PointID firstPoint) |
void | setLevel (NodeID nodeID, uint32_t level) |
void | setNextNode (NodeID nodeID, NodeID next) |
void | setNodeSize (NodeID nodeID, float size) |
void | setNodeX (NodeID nodeID, float x) |
void | setNodeY (NodeID nodeID, float y) |
void | setNumberOfChilds (NodeID nodeID, uint32_t numChilds) |
sets the number of children of a node More... | |
void | setNumberOfPoints (NodeID nodeID, uint32_t numPoints) |
sets the number of nodes containted in node nodeID More... | |
void | setPoint (PointID id, float x, float y, float r) |
void | setPoint (PointID id, float x, float y, float r, uint32_t ref) |
void | setPoint (PointID id, float x, float y, uint32_t ref) |
void | setPointLeaf (PointID point, NodeID leaf) |
uint64_t | sizeInBytes () const |
StoreDirectNodeFunctor | StoreDirectNodeFunction () |
StoreDirectPairFunctor | StoreDirectPairFunction () |
StoreWSPairFunctor | StoreWSPairFunction () |
template<typename F > | |
top_down_traversal_functor< F > | top_down_traversal (F f) const |
creator More... | |
template<typename F , typename Cond > | |
top_down_traversal_functor< F, Cond > | top_down_traversal (F f, Cond cond) const |
creator More... | |
void | updatePointPositionSize (PointID id) |
WSPD * | wspd () const |
Private Member Functions | |
void | addDirect (NodeID s) |
add a direct node to the array list of direct nodes More... | |
void | addDirectPair (NodeID s, NodeID t) |
add a direct pair to the array list of direct pairs More... | |
void | addWSPD (NodeID s, NodeID t) |
adds a well-separated pair to the wspd More... | |
void | allocate (uint32_t n) |
helper function for allocating the array's More... | |
void | deallocate () |
helper function for releasing memory More... | |
void | initInnerNode (NodeID nodeID, NodeID leftChild, NodeID rightChild, uint32_t level, NodeID next) |
void | initLeaf (NodeID leaf, PointID firstPoint, uint32_t numPoints, NodeID next) |
void | leafAppendPoint (NodeID leaf, PointID point) |
appends an successing point by simply increasing childcount of a leaf. Assumes isLeaf More... | |
void | nodeAppendChild (NodeID nodeID, NodeID child) |
appends one child index. Assumes childCount < 4 and not leaf More... | |
Private Attributes | |
double | m_cellSize |
the height and width of a grid cell More... | |
NodeID * | m_directNodes |
NodeID | m_firstInner |
first inner node in the inner node chain More... | |
NodeID | m_firstLeaf |
first leaf in the leaf chain More... | |
float | m_max_x |
the x coordinate of the right most point More... | |
float | m_max_y |
the y coordinate of the top most point More... | |
uint32_t | m_maxNumNodes |
the maximum number of nodes (2*n here instead of 2*n-1) More... | |
float | m_min_x |
the x coordinate of the left most point More... | |
float | m_min_y |
the y coordinate of the bottom most point More... | |
float * | m_nodeSize |
node size More... | |
float * | m_nodeXPos |
node x coord More... | |
float * | m_nodeYPos |
node y coord More... | |
LQWSPair * | m_notWspd |
uint32_t | m_numDirectNodes |
uint32_t | m_numInnerNodes |
number of inner nodes in the chain More... | |
uint32_t | m_numLeaves |
number of leaves in the chain More... | |
uint32_t | m_numNotWSP |
uint32_t | m_numPoints |
number of points this quadtree is based on More... | |
uint32_t | m_numWSP |
float * | m_origSize |
point size in graph order More... | |
float * | m_origXPos |
point x coord in graph order More... | |
float * | m_origYPos |
point y coord in graph order More... | |
LQPoint * | m_points |
the point order in tree order More... | |
float * | m_pointSize |
point size in tree order More... | |
float * | m_pointXPos |
point x coord in tree order More... | |
float * | m_pointYPos |
point y coord in tree order More... | |
NodeID | m_root |
the root of the tree More... | |
double | m_scaleInv |
the inverse scale to transform More... | |
double | m_sideLengthGrid |
the resulting side length of the grid (constant) More... | |
double | m_sideLengthPoints |
the maximum of height and width More... | |
LQNode * | m_tree |
the main tree array containing all nodes (including leaves) More... | |
WSPD * | m_WSPD |
the wspd of this quadtree More... | |
Friends | |
class | LinearQuadtreeBuilder |
class | LinearQuadtreeBuilderList |
Definition at line 50 of file LinearQuadtree.h.
using ogdf::fast_multipole_embedder::LinearQuadtree::NodeID = unsigned int |
Definition at line 55 of file LinearQuadtree.h.
using ogdf::fast_multipole_embedder::LinearQuadtree::PointID = unsigned int |
Definition at line 56 of file LinearQuadtree.h.
ogdf::fast_multipole_embedder::LinearQuadtree::LinearQuadtree | ( | uint32_t | n, |
float * | origXPos, | ||
float * | origYPos, | ||
float * | origSize | ||
) |
constructor. required tree mem will be allocated
ogdf::fast_multipole_embedder::LinearQuadtree::~LinearQuadtree | ( | void | ) |
destructor. tree mem will be released
|
private |
add a direct node to the array list of direct nodes
add a direct pair to the array list of direct pairs
adds a well-separated pair to the wspd
|
private |
helper function for allocating the array's
|
inline |
creator
Definition at line 262 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 268 of file LinearQuadtree.h.
|
inline |
returns the i
th child index of node nodeID
Definition at line 406 of file LinearQuadtree.h.
void ogdf::fast_multipole_embedder::LinearQuadtree::clear | ( | ) |
resets the tree
|
inline |
Definition at line 555 of file LinearQuadtree.h.
void ogdf::fast_multipole_embedder::LinearQuadtree::computeWSPD | ( | ) |
void ogdf::fast_multipole_embedder::LinearQuadtree::computeWSPD | ( | NodeID | n | ) |
|
private |
helper function for releasing memory
|
inline |
Definition at line 535 of file LinearQuadtree.h.
|
inline |
Definition at line 537 of file LinearQuadtree.h.
|
inline |
Definition at line 539 of file LinearQuadtree.h.
PointID ogdf::fast_multipole_embedder::LinearQuadtree::findFirstPointInCell | ( | PointID | somePointInCell | ) | const |
|
inline |
Definition at line 521 of file LinearQuadtree.h.
|
inline |
Definition at line 525 of file LinearQuadtree.h.
Definition at line 383 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 154 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 204 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 177 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 130 of file LinearQuadtree.h.
|
inline |
Definition at line 337 of file LinearQuadtree.h.
|
inline |
Definition at line 331 of file LinearQuadtree.h.
void ogdf::fast_multipole_embedder::LinearQuadtree::init | ( | float | min_x, |
float | min_y, | ||
float | max_x, | ||
float | max_y | ||
) |
|
inlineprivate |
Definition at line 592 of file LinearQuadtree.h.
|
inlineprivate |
Definition at line 583 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 91 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 104 of file LinearQuadtree.h.
|
inline |
sets the fence flag for node nodeID
Definition at line 415 of file LinearQuadtree.h.
|
inline |
returns true if the given node index is a leaf
Definition at line 412 of file LinearQuadtree.h.
Definition at line 508 of file LinearQuadtree.h.
|
inlineprivate |
appends an successing point by simply increasing childcount of a leaf. Assumes isLeaf
Definition at line 611 of file LinearQuadtree.h.
Definition at line 375 of file LinearQuadtree.h.
|
inline |
the upper bound for a compressed quadtree (2*numPoints)
Definition at line 435 of file LinearQuadtree.h.
|
inline |
Definition at line 549 of file LinearQuadtree.h.
|
inline |
Definition at line 551 of file LinearQuadtree.h.
|
inline |
Definition at line 545 of file LinearQuadtree.h.
|
inline |
Definition at line 547 of file LinearQuadtree.h.
Definition at line 393 of file LinearQuadtree.h.
Definition at line 377 of file LinearQuadtree.h.
|
inlineprivate |
appends one child index. Assumes childCount < 4 and not leaf
Definition at line 605 of file LinearQuadtree.h.
|
inline |
Definition at line 506 of file LinearQuadtree.h.
Definition at line 504 of file LinearQuadtree.h.
|
inline |
Definition at line 472 of file LinearQuadtree.h.
|
inline |
Definition at line 464 of file LinearQuadtree.h.
|
inline |
Definition at line 468 of file LinearQuadtree.h.
|
inline |
returns the number of children of node nodeID
. for an inner node this is 1..4 and can be accessed by child(i). For a leaf the number of points in this leaf is returned starting with point child(0)
Definition at line 398 of file LinearQuadtree.h.
|
inline |
Definition at line 533 of file LinearQuadtree.h.
|
inline |
Definition at line 531 of file LinearQuadtree.h.
|
inline |
Definition at line 523 of file LinearQuadtree.h.
|
inline |
Definition at line 527 of file LinearQuadtree.h.
|
inline |
returns the number of nodes in this tree
Definition at line 432 of file LinearQuadtree.h.
|
inline |
returns the number of points in this tree
Definition at line 429 of file LinearQuadtree.h.
|
inline |
returns the number of points contained in the subtree of node nodeID
Definition at line 418 of file LinearQuadtree.h.
|
inline |
Definition at line 529 of file LinearQuadtree.h.
Definition at line 389 of file LinearQuadtree.h.
Definition at line 391 of file LinearQuadtree.h.
|
inline |
Definition at line 572 of file LinearQuadtree.h.
Definition at line 448 of file LinearQuadtree.h.
|
inline |
Definition at line 462 of file LinearQuadtree.h.
|
inline |
Definition at line 456 of file LinearQuadtree.h.
|
inline |
Definition at line 458 of file LinearQuadtree.h.
|
inline |
Definition at line 452 of file LinearQuadtree.h.
|
inline |
Definition at line 460 of file LinearQuadtree.h.
|
inline |
Definition at line 454 of file LinearQuadtree.h.
|
inline |
Definition at line 502 of file LinearQuadtree.h.
|
inline |
returns the index of the root
Definition at line 426 of file LinearQuadtree.h.
|
inline |
Definition at line 553 of file LinearQuadtree.h.
|
inline |
sets the i
th child index of node nodeID
Definition at line 409 of file LinearQuadtree.h.
|
inline |
Definition at line 385 of file LinearQuadtree.h.
|
inline |
Definition at line 381 of file LinearQuadtree.h.
|
inline |
Definition at line 379 of file LinearQuadtree.h.
|
inline |
Definition at line 474 of file LinearQuadtree.h.
|
inline |
Definition at line 466 of file LinearQuadtree.h.
|
inline |
Definition at line 470 of file LinearQuadtree.h.
|
inline |
sets the number of children of a node
Definition at line 401 of file LinearQuadtree.h.
|
inline |
sets the number of nodes containted in node nodeID
Definition at line 421 of file LinearQuadtree.h.
|
inline |
Definition at line 496 of file LinearQuadtree.h.
|
inline |
Definition at line 489 of file LinearQuadtree.h.
|
inline |
Definition at line 476 of file LinearQuadtree.h.
|
inline |
Definition at line 450 of file LinearQuadtree.h.
uint64_t ogdf::fast_multipole_embedder::LinearQuadtree::sizeInBytes | ( | ) | const |
|
inline |
Definition at line 371 of file LinearQuadtree.h.
|
inline |
Definition at line 359 of file LinearQuadtree.h.
|
inline |
Definition at line 349 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 230 of file LinearQuadtree.h.
|
inline |
creator
Definition at line 236 of file LinearQuadtree.h.
|
inline |
Definition at line 482 of file LinearQuadtree.h.
|
inline |
Definition at line 541 of file LinearQuadtree.h.
|
friend |
Definition at line 51 of file LinearQuadtree.h.
|
friend |
Definition at line 52 of file LinearQuadtree.h.
|
private |
the height and width of a grid cell
Definition at line 638 of file LinearQuadtree.h.
|
private |
Definition at line 694 of file LinearQuadtree.h.
|
private |
first inner node in the inner node chain
Definition at line 710 of file LinearQuadtree.h.
|
private |
first leaf in the leaf chain
Definition at line 704 of file LinearQuadtree.h.
|
private |
the x coordinate of the right most point
Definition at line 632 of file LinearQuadtree.h.
|
private |
the y coordinate of the top most point
Definition at line 635 of file LinearQuadtree.h.
|
private |
the maximum number of nodes (2*n here instead of 2*n-1)
Definition at line 681 of file LinearQuadtree.h.
|
private |
the x coordinate of the left most point
Definition at line 626 of file LinearQuadtree.h.
|
private |
the y coordinate of the bottom most point
Definition at line 629 of file LinearQuadtree.h.
|
private |
node size
Definition at line 675 of file LinearQuadtree.h.
|
private |
node x coord
Definition at line 668 of file LinearQuadtree.h.
|
private |
node y coord
Definition at line 672 of file LinearQuadtree.h.
|
private |
Definition at line 691 of file LinearQuadtree.h.
|
private |
Definition at line 695 of file LinearQuadtree.h.
|
private |
number of inner nodes in the chain
Definition at line 713 of file LinearQuadtree.h.
|
private |
number of leaves in the chain
Definition at line 707 of file LinearQuadtree.h.
|
private |
Definition at line 692 of file LinearQuadtree.h.
|
private |
number of points this quadtree is based on
Definition at line 687 of file LinearQuadtree.h.
|
private |
Definition at line 689 of file LinearQuadtree.h.
|
private |
point size in graph order
Definition at line 656 of file LinearQuadtree.h.
|
private |
point x coord in graph order
Definition at line 650 of file LinearQuadtree.h.
|
private |
point y coord in graph order
Definition at line 653 of file LinearQuadtree.h.
|
private |
the point order in tree order
Definition at line 684 of file LinearQuadtree.h.
|
private |
point size in tree order
Definition at line 665 of file LinearQuadtree.h.
|
private |
point x coord in tree order
Definition at line 659 of file LinearQuadtree.h.
|
private |
point y coord in tree order
Definition at line 662 of file LinearQuadtree.h.
|
private |
the root of the tree
Definition at line 701 of file LinearQuadtree.h.
|
private |
the inverse scale to transform
Definition at line 641 of file LinearQuadtree.h.
|
private |
the resulting side length of the grid (constant)
Definition at line 647 of file LinearQuadtree.h.
|
private |
the maximum of height and width
Definition at line 644 of file LinearQuadtree.h.
|
private |
the main tree array containing all nodes (including leaves)
Definition at line 678 of file LinearQuadtree.h.
|
private |
the wspd of this quadtree
Definition at line 698 of file LinearQuadtree.h.