#include <ogdf/energybased/fmmm/NewMultipoleMethod.h>
Public Member Functions | |
NewMultipoleMethod () | |
Constructor. | |
void | calculate_repulsive_forces (const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep) |
Calculate rep. forces for each node. | |
void | deallocate_memory () |
Dynamically allocated memory is freed here. | |
void | make_initialisations (const Graph &G, double boxlength, DPoint down_left_corner, int particles_in_leaves, int precision, FMMMOptions::ReducedTreeConstruction tree_construction_way, FMMMOptions::SmallestCellFinding find_small_cell) |
Make all initialisations that are needed for New Multipole Method (NMM) | |
void | update_boxlength_and_cornercoordinate (double b_l, DPoint d_l_c) |
Import updated information of the drawing area. | |
Private Member Functions | |
void | add_local_expansion (QuadTreeNodeNM *ptr_1, QuadTreeNodeNM *ptr_2) |
The multipole expansion of *ptr_1 is transformed into a local expansion around the center of *ptr_2 and added to *ptr_2 s local expansion list. | |
void | add_local_expansion_of_leaf (NodeArray< NodeAttributes > &A, QuadTreeNodeNM *leaf_ptr, QuadTreeNodeNM *act_ptr) |
The multipole expansion for every particle of leaf_ptr->contained_nodes (1,0,...) is transformed into a local expansion around the center of *ptr_2 and added to *ptr_2 s local expansion List;precondition: *leaf_ptr is a leaf. | |
void | add_rep_forces (const Graph &G, NodeArray< DPoint > &F_direct, NodeArray< DPoint > &F_multipole_exp, NodeArray< DPoint > &F_local_exp, NodeArray< DPoint > &F_rep) |
Add repulsive force contributions for each node. | |
void | add_shifted_expansion_to_father_expansion (QuadTreeNodeNM *act_ptr) |
Add the shifted ME Lists of *act_ptr to act_ptr->get_father_ptr() ; precondition *act_ptr has a father_node. | |
void | add_shifted_local_exp_of_parent (QuadTreeNodeNM *node_ptr) |
The shifted local expansion of the father of node_ptr is added to the local expansion of node_ptr;precondition: node_ptr is not the root of T. | |
double | binko (int n, int k) |
Returns n over k. | |
bool | bordering (QuadTreeNodeNM *ptr_1, QuadTreeNodeNM *ptr_2) |
If ptr_1 and ptr_2 are nonequal and bordering true is returned; else false. | |
void | calculate_local_expansions_and_WSPRLS (NodeArray< NodeAttributes > &A, QuadTreeNodeNM *act_node_ptr) |
According to NMM T is traversed recursively top-down starting from act_node_ptr == T.get_root_ptr() and thereby the lists D1, D2, M and LE are calculated for all treenodes. | |
void | calculate_neighbourcell_forces (NodeArray< NodeAttributes > &A, List< QuadTreeNodeNM * > &quad_tree_leaves, NodeArray< DPoint > &F_direct) |
For each leaf v in quad_tree_leaves the force contributions from all leaves in v.get_D1() and v.get_D2() are calculated. | |
void | calculate_repulsive_forces_by_exact_method (const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep) |
Use the exact method for force calculation (used for small Graphs (|V| <= MIN_NODE_NUMBER) for speed reasons). | |
void | calculate_repulsive_forces_by_NMM (const Graph &G, NodeArray< NodeAttributes > &A, NodeArray< DPoint > &F_rep) |
Use NMM for force calculation (used for large Graphs (|V| > MIN_NODE_NUMBER)). | |
void | delete_red_quad_tree_and_count_treenodes (QuadTreeNM &T) |
The reduced quad tree is deleted; Furthermore the treenode_number is calculated. | |
FMMMOptions::SmallestCellFinding | find_sm_cell () const |
Returns the way the smallest quadratic cell that surrounds the particles of a node in the reduced bucket quadtree is calculated. | |
void | find_sm_cell (FMMMOptions::SmallestCellFinding scf) |
void | find_small_cell (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
Finds the small cell of the actual node using the selected algorithm. | |
void | find_small_cell_by_formula (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
Finds the small cell of the actual Node of T by Aluru's Formula, and updates Sm_downleftcorner, Sm_boxlength, and level of *act_ptr. | |
void | find_small_cell_iteratively (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
Finds the small cell of the actual Node of T iteratively,and updates Sm_downleftcorner, Sm_boxlength, and level of *act_ptr. | |
void | form_multipole_expansion_of_leaf_node (NodeArray< NodeAttributes > &A, QuadTreeNodeNM *act_ptr) |
Calculate List ME for *act_ptr Precondition: *act_ptr is a leaf. | |
void | form_multipole_expansion_of_subtree (NodeArray< NodeAttributes > &A, QuadTreeNM &T, List< QuadTreeNodeNM * > &quad_tree_leaves) |
The multipole expansion List ME for the tree rooted at T.get_act_ptr() is recursively calculated. | |
void | form_multipole_expansions (NodeArray< NodeAttributes > &A, QuadTreeNM &T, List< QuadTreeNodeNM * > &quad_tree_leaves) |
The multipole expansion terms ME are calculated for all nodes of T ( centers are initialized for each cell and quad_tree_leaves stores pointers to leaves of T). | |
void | free_binko () |
Free space for BK. | |
void | init_binko (int t) |
Init BK -matrix for values n, k in 0 to t. | |
void | init_expansion_Lists (QuadTreeNodeNM *act_ptr) |
The Lists ME and LE are both initialized to zero entries for *act_ptr. | |
int | maxboxindex (int level) |
Returns the maximal index of a box in level i. | |
int | particles_in_leaves () const |
void | particles_in_leaves (int b) |
Max. number of particles that are contained in a leaf of the red. quadtree. | |
int | power_of_two (int i) |
Returns power_of_2[i] for values <= max_power_of_2_index. | |
int | precision () const |
void | precision (int p) |
The precision p for the p-term multipole expansions. | |
void | set_center (QuadTreeNodeNM *act_ptr) |
The center of the box of *act_ptr is initialized. | |
void | transform_local_exp_to_forces (NodeArray< NodeAttributes > &A, List< QuadTreeNodeNM * > &quad_tree_leaves, NodeArray< DPoint > &F_local_exp) |
For each leaf v in quad_tree_leaves the force contribution defined by v.get_local_exp() is calculated and stored in F_local_exp. | |
void | transform_multipole_exp_to_forces (NodeArray< NodeAttributes > &A, List< QuadTreeNodeNM * > &quad_tree_leaves, NodeArray< DPoint > &F_multipole_exp) |
For each leaf v in quad_tree_leaves the force contribution defined by all nodes in v.get_M() is calculated and stored in F_multipole_exp. | |
FMMMOptions::ReducedTreeConstruction | tree_construction_way () const |
Returns the way to construct the reduced tree. | |
void | tree_construction_way (FMMMOptions::ReducedTreeConstruction rtc) |
bool | well_separated (QuadTreeNodeNM *ptr_1, QuadTreeNodeNM *ptr_2) |
If the small cell of ptr_1 and ptr_2 are well separated true is returned (else false). | |
Functions needed for path by path tree construction | |
void | build_up_red_quad_tree_path_by_path (const Graph &G, NodeArray< NodeAttributes > &A, QuadTreeNM &T) |
The reduced quadtree is build up path by path (the Lists LE,ME, the centers, D1, D2, M, and quad_tree_leaves are not calculated here. | |
void | make_copy_and_init_Lists (List< ParticleInfo > &L_x_orig, List< ParticleInfo > &L_x_copy, List< ParticleInfo > &L_y_orig, List< ParticleInfo > &L_y_copy) |
Makes L_x(y)_copy a copy of L_x(y)_orig and sets p.copy_item for each element in L_x(y)_orig to the ListIterator of the corresponding element in L_x(y)_copy. Furthermore, the p.cross_ref_items in L_x(y)_copy are set and p.subList_ptr and p.tmp_cross_ref_item is reset to nullptr in both lists. | |
void | build_up_root_node (const Graph &G, NodeArray< NodeAttributes > &A, QuadTreeNM &T) |
The root node of T is constructed. | |
void | create_sorted_coordinate_Lists (const Graph &G, NodeArray< NodeAttributes > &A, List< ParticleInfo > &L_x, List< ParticleInfo > &L_y) |
The sorted and linked Lists L_x and L_y for the root node are created. | |
void | decompose_subtreenode (QuadTreeNM &T, List< ParticleInfo > &act_x_List_copy, List< ParticleInfo > &act_y_List_copy, List< QuadTreeNodeNM * > &new_leaf_List) |
T is extended by a subtree T1 rooted at the T.get_act_node(). The boxlength and down_left_corner of the actual node is reduced if it is not the minimal subquad that contains all the particles in the represented area. | |
void | calculate_boundaries_of_act_node (QuadTreeNodeNM *act_ptr, DPoint &min, DPoint &max) |
The extreme coordinates of the particles contained in *act_ptr are calculated. | |
bool | in_lt_quad (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
Returns true if the rectangle defined by min and max lies within the left(right)_top(bottom) quad of the small cell of *act_ptr. | |
bool | in_rt_quad (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
bool | in_lb_quad (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
bool | in_rb_quad (QuadTreeNodeNM *act_ptr, DPoint min, DPoint max) |
bool | quadHelper (DPoint min, DPoint max, DPoint bottomleft, DPoint topright, QuadTreeNodeNM *act_ptr) |
void | split (QuadTreeNodeNM *act_ptr, List< ParticleInfo > *&L_x_left_ptr, List< ParticleInfo > *&L_y_left_ptr, List< ParticleInfo > *&L_x_right_ptr, List< ParticleInfo > *&L_y_right_ptr, bool isHorizontal) |
The Lists *act_ptr->get_x(y)_List_ptr() are split into two sublists containing the particles in the left and right half of the actual quad. The list that is larger is constructed from *act_ptr->get_x(y)_List_ptr() by deleting the other elements; The smaller List stays empty at this point, but the corresponding elements in L_x(y)_copy contain a pointer to the x(y) List, where they belong to. If isHorizontal is true, we are talking about the respective x lists, otherwise about the y lists. | |
void | delete_subLists (QuadTreeNodeNM *act_ptr, List< ParticleInfo > *&L_x_left_ptr, List< ParticleInfo > *&L_y_left_ptr, List< ParticleInfo > *&L_x_right_ptr, List< ParticleInfo > *&L_y_right_ptr, ListIterator< ParticleInfo > last_left_item, bool deleteRight, bool isHorizontal) |
The Lists *L_x(y)_left_ptr are constructed from *act_ptr->get_x(y)_List_ptr() by deleting all elements right (if deleteRight is true, otherwise left) from last_left_item in *act_ptr->get_x_List_ptr() the corresponding values in *act_ptr->get_y_List_ptr() are deleted as well. The corresponding List-elements of the deleted elements in the Lists L_x(y)_copy hold the information, that they belong to the Lists *L_x(y)_left_ptr. If isHorizontal is true, we are talking about the respective x lists, otherwise about the y lists. | |
void | split_in_y_direction (QuadTreeNodeNM *act_ptr, List< ParticleInfo > *&L_x_ptr, List< ParticleInfo > *&L_x_b_ptr, List< ParticleInfo > *&L_x_t_ptr, List< ParticleInfo > *&L_y_ptr, List< ParticleInfo > *&L_y_b_ptr, List< ParticleInfo > *&L_y_t_ptr) |
The Lists *L_x(y)_b_ptr and *L_x(y)_t_ptr are constructed from the Lists *L_x(y)_ptr. | |
void | move_subLists_vertical (List< ParticleInfo > *&L_x_ptr, List< ParticleInfo > *&L_x_b_ptr, List< ParticleInfo > *&L_x_t_ptr, List< ParticleInfo > *&L_y_ptr, List< ParticleInfo > *&L_y_b_ptr, List< ParticleInfo > *&L_y_t_ptr, ListIterator< ParticleInfo > last_left_item, bool moveRight) |
The Lists *L_x(y)_b(t)_ptr are constructed from the Lists *L_x(y)_ptr by moving all List elements from *L_x(y)_ptr that belong to *L_x(y)_l_ptr (moveRight false) or *L_x(y)_r_ptr (moveRight true) to this List. The L_x(y)_right_ptr point to the reduced Lists L_x(y)_ptr afterwards but the elements that belong to *&L_x(y)_right_ptr are moved. | |
void | build_up_sorted_subLists (List< ParticleInfo > &L_x_copy, List< ParticleInfo > &act_y_List_copy) |
The sorted subLists, that can be accesssed by the entries in L_x(y)_copy->get_subList_ptr() are constructed. | |
Functions needed for subtree by subtree tree construction | |
void | build_up_red_quad_tree_subtree_by_subtree (const Graph &G, NodeArray< NodeAttributes > &A, QuadTreeNM &T) |
The reduced quadtree is build up subtree by subtree (the lists LE, ME the centers, D1, D2, M, quad_tree_leaves are not calculated here. | |
void | build_up_root_vertex (const Graph &G, QuadTreeNM &T) |
The root node of T is constructed and contained_nodes is set to the list of all nodes of G. | |
void | construct_subtree (NodeArray< NodeAttributes > &A, QuadTreeNM &T, QuadTreeNodeNM *subtree_root_ptr, List< QuadTreeNodeNM * > &new_subtree_root_List) |
The reduced subtree of T rooted at *subtree_root_ptr containing all the particles of subtree_root_ptr->get_contained_nodes() is constructed; Pointers to leaves of the subtree that contain more than particles_in_leaves() particles in their contained_nodes() lists are added to new_subtree_root_List_ptr; The lists contained_nodes() are nonempty only for the (actual) leaves of T. | |
void | construct_complete_subtree (QuadTreeNM &T, int subtree_depth, Array2D< QuadTreeNodeNM * > &leaf_ptr, int act_depth, int act_x_index, int act_y_index) |
A complete subtree of T and of depth subtree_depth, rooted at *T.get_act_ptr() is constructed. Furthermore leaf_ptr[i][j] points to a leaf node of the subtree that represents the quadratic subregion of *T.get_act_ptr() at subtree_depth and position [i][j] i,j in 0,...,maxindex;act_depth(x_index,y_index) are helping variables for recursive calls. | |
void | set_contained_nodes_for_leaves (NodeArray< NodeAttributes > &A, QuadTreeNodeNM *subtree_root_ptr, Array2D< QuadTreeNodeNM * > &leaf_ptr, int maxindex) |
The particles in subtree_root_ptr->get_contained_nodes() are assigned to the the contained_nodes lists of the leaves of the subtree by using the information of A,leaf_ptr and maxindex. Afterwards contained_nodes of *subtree_root_ptr is empty. | |
void | set_particlenumber_in_subtree_entries (QuadTreeNM &T) |
The subtree of T rooted at *T.get_act_ptr() is traversed bottom up, such that the subtreeparticlenumber of every node in this subtree is set correctly. | |
void | construct_reduced_subtree (NodeArray< NodeAttributes > &A, QuadTreeNM &T, List< QuadTreeNodeNM * > &new_subtree_root_List) |
The reduced subtree rooted at *T.get_act_ptr() is calculated ; A pointer to every leaf of this subtree that contains more then particles_in_leaves() particles is added to new_subtree_root_List; The lists contained_nodes are empty for all but the leaves. | |
void | delete_empty_subtrees (QuadTreeNM &T) |
All subtrees of *T.get_act_ptr() that have a child c of *T.get_act_ptr() as root and c.get_particlenumber_in_subtree() == 0 are deleted. | |
bool | check_and_delete_degenerated_node (QuadTreeNM &T) |
If *T.get_act_ptr() is a degenerated node (has only one child c) *T.get_act_ptr() is deleted from T and the child c is linked with the father of *T.get_act_ptr() if *T.get_act_ptr() is the root of T than c is set to the new root of T T.get_act_ptr() points to c afterwards; Furthermore true is returned if *T.get_act_ptr() has been degenerated, else false is returned. | |
void | delete_sparse_subtree (QuadTreeNM &T, QuadTreeNodeNM *new_leaf_ptr) |
The subtree rooted at new_leaf_ptr is deleted, *new_leaf_ptr is a leaf of T and new_leaf_ptr->get_contained_nodes() contains all the particles contained in the leaves of the deleted subtree; Precondition: T.get_act_ptr() is new_leaf_ptr. | |
void | collect_contained_nodes (QuadTreeNM &T, QuadTreeNodeNM *new_leaf_ptr) |
new_leaf_ptr->get_contained_nodes() contains all the particles contained in the leaves of its subtree afterwards; Precondition: T.get_act_ptr() is new_leaf_ptr | |
bool | find_smallest_quad (NodeArray< NodeAttributes > &A, QuadTreeNM &T) |
If all nodes in T.get_act_ptr()->get_contained_nodes() have the same position false is returned. Else true is returned and the boxlength, down_left_corner and level of *T.get_act_ptr() is updated such that this values are minimal (i.e. the smallest quad that contains all the particles of T.get_act_ptr()->get_contained_nodes(); If all this particles are placed at a point nothing is done. | |
Private Attributes | |
FMMMOptions::SmallestCellFinding | _find_small_cell |
int | _particles_in_leaves |
max. | |
int | _precision |
precision for p-term multipole expansion | |
FMMMOptions::ReducedTreeConstruction | _tree_construction_way |
double ** | BK |
holds the binomial coefficients | |
double | boxlength |
length of drawing box | |
DPoint | down_left_corner |
down left corner of drawing box | |
FruchtermanReingold | ExactMethod |
needed in case that using_NMM == false | |
const int | max_power_of_2_index |
holds max. | |
int | MIN_NODE_NUMBER |
The minimum number of nodes for which the forces are calculated using NMM (for lower values the exact calculation is used). | |
List< DPoint > | rep_forces |
stores the rep. forces of the last iteration needed for error calculation) | |
bool | using_NMM |
Indicates whether the exact method or NMM is used for force calculation (value depends on MIN_NODE_NUMBER) | |
Definition at line 55 of file NewMultipoleMethod.h.
ogdf::energybased::fmmm::NewMultipoleMethod::NewMultipoleMethod | ( | ) |
Constructor.
|
private |
The multipole expansion of *ptr_1 is transformed into a local expansion around the center of *ptr_2 and added to *ptr_2 s local expansion list.
|
private |
The multipole expansion for every particle of leaf_ptr->contained_nodes (1,0,...) is transformed into a local expansion around the center of *ptr_2 and added to *ptr_2 s local expansion List;precondition: *leaf_ptr is a leaf.
|
private |
Add repulsive force contributions for each node.
|
private |
Add the shifted ME Lists of *act_ptr to act_ptr->get_father_ptr() ; precondition *act_ptr has a father_node.
|
private |
The shifted local expansion of the father of node_ptr is added to the local expansion of node_ptr;precondition: node_ptr is not the root of T.
|
private |
Returns n over k.
|
private |
If ptr_1 and ptr_2 are nonequal and bordering true is returned; else false.
|
private |
The reduced quadtree is build up path by path (the Lists LE,ME, the centers, D1, D2, M, and quad_tree_leaves are not calculated here.
|
private |
The reduced quadtree is build up subtree by subtree (the lists LE, ME the centers, D1, D2, M, quad_tree_leaves are not calculated here.
|
private |
The root node of T is constructed.
|
private |
The root node of T is constructed and contained_nodes is set to the list of all nodes of G.
|
private |
The sorted subLists, that can be accesssed by the entries in L_x(y)_copy->get_subList_ptr() are constructed.
|
private |
The extreme coordinates of the particles contained in *act_ptr are calculated.
|
private |
According to NMM T is traversed recursively top-down starting from act_node_ptr == T.get_root_ptr() and thereby the lists D1, D2, M and LE are calculated for all treenodes.
|
private |
For each leaf v in quad_tree_leaves the force contributions from all leaves in v.get_D1() and v.get_D2() are calculated.
void ogdf::energybased::fmmm::NewMultipoleMethod::calculate_repulsive_forces | ( | const Graph & | G, |
NodeArray< NodeAttributes > & | A, | ||
NodeArray< DPoint > & | F_rep | ||
) |
Calculate rep. forces for each node.
|
private |
Use the exact method for force calculation (used for small Graphs (|V| <= MIN_NODE_NUMBER) for speed reasons).
|
private |
Use NMM for force calculation (used for large Graphs (|V| > MIN_NODE_NUMBER)).
|
private |
If *T.get_act_ptr() is a degenerated node (has only one child c) *T.get_act_ptr() is deleted from T and the child c is linked with the father of *T.get_act_ptr() if *T.get_act_ptr() is the root of T than c is set to the new root of T T.get_act_ptr() points to c afterwards; Furthermore true is returned if *T.get_act_ptr() has been degenerated, else false is returned.
|
private |
new_leaf_ptr->get_contained_nodes() contains all the particles contained in the leaves of its subtree afterwards; Precondition: T.get_act_ptr() is new_leaf_ptr
|
private |
A complete subtree of T and of depth subtree_depth, rooted at *T.get_act_ptr() is constructed. Furthermore leaf_ptr[i][j] points to a leaf node of the subtree that represents the quadratic subregion of *T.get_act_ptr() at subtree_depth and position [i][j] i,j in 0,...,maxindex;act_depth(x_index,y_index) are helping variables for recursive calls.
|
private |
The reduced subtree rooted at *T.get_act_ptr() is calculated ; A pointer to every leaf of this subtree that contains more then particles_in_leaves() particles is added to new_subtree_root_List; The lists contained_nodes are empty for all but the leaves.
|
private |
The reduced subtree of T rooted at *subtree_root_ptr containing all the particles of subtree_root_ptr->get_contained_nodes() is constructed; Pointers to leaves of the subtree that contain more than particles_in_leaves() particles in their contained_nodes() lists are added to new_subtree_root_List_ptr; The lists contained_nodes() are nonempty only for the (actual) leaves of T.
|
private |
The sorted and linked Lists L_x and L_y for the root node are created.
void ogdf::energybased::fmmm::NewMultipoleMethod::deallocate_memory | ( | ) |
Dynamically allocated memory is freed here.
|
private |
T is extended by a subtree T1 rooted at the T.get_act_node(). The boxlength and down_left_corner of the actual node is reduced if it is not the minimal subquad that contains all the particles in the represented area.
|
private |
All subtrees of *T.get_act_ptr() that have a child c of *T.get_act_ptr() as root and c.get_particlenumber_in_subtree() == 0 are deleted.
|
private |
The reduced quad tree is deleted; Furthermore the treenode_number is calculated.
|
private |
The subtree rooted at new_leaf_ptr is deleted, *new_leaf_ptr is a leaf of T and new_leaf_ptr->get_contained_nodes() contains all the particles contained in the leaves of the deleted subtree; Precondition: T.get_act_ptr() is new_leaf_ptr.
|
private |
The Lists *L_x(y)_left_ptr are constructed from *act_ptr->get_x(y)_List_ptr() by deleting all elements right (if deleteRight
is true, otherwise left) from last_left_item in *act_ptr->get_x_List_ptr() the corresponding values in *act_ptr->get_y_List_ptr() are deleted as well. The corresponding List-elements of the deleted elements in the Lists L_x(y)_copy hold the information, that they belong to the Lists *L_x(y)_left_ptr. If isHorizontal
is true, we are talking about the respective x lists, otherwise about the y lists.
|
inlineprivate |
Returns the way the smallest quadratic cell that surrounds the particles of a node in the reduced bucket quadtree is calculated.
Definition at line 396 of file NewMultipoleMethod.h.
|
inlineprivate |
Definition at line 398 of file NewMultipoleMethod.h.
|
inlineprivate |
Finds the small cell of the actual node using the selected algorithm.
Definition at line 292 of file NewMultipoleMethod.h.
|
private |
Finds the small cell of the actual Node of T by Aluru's Formula, and updates Sm_downleftcorner, Sm_boxlength, and level of *act_ptr.
|
private |
Finds the small cell of the actual Node of T iteratively,and updates Sm_downleftcorner, Sm_boxlength, and level of *act_ptr.
|
private |
If all nodes in T.get_act_ptr()->get_contained_nodes() have the same position false is returned. Else true is returned and the boxlength, down_left_corner and level of *T.get_act_ptr() is updated such that this values are minimal (i.e. the smallest quad that contains all the particles of T.get_act_ptr()->get_contained_nodes(); If all this particles are placed at a point nothing is done.
|
private |
Calculate List ME for *act_ptr Precondition: *act_ptr is a leaf.
|
private |
The multipole expansion List ME for the tree rooted at T.get_act_ptr() is recursively calculated.
|
private |
The multipole expansion terms ME are calculated for all nodes of T ( centers are initialized for each cell and quad_tree_leaves stores pointers to leaves of T).
|
private |
Free space for BK.
|
private |
|
private |
Returns true if the rectangle defined by min and max lies within the left(right)_top(bottom) quad of the small cell of *act_ptr.
|
private |
|
private |
|
private |
Init BK -matrix for values n, k in 0 to t.
|
private |
The Lists ME and LE are both initialized to zero entries for *act_ptr.
|
private |
Makes L_x(y)_copy a copy of L_x(y)_orig and sets p.copy_item for each element in L_x(y)_orig to the ListIterator of the corresponding element in L_x(y)_copy. Furthermore, the p.cross_ref_items in L_x(y)_copy are set and p.subList_ptr and p.tmp_cross_ref_item is reset to nullptr in both lists.
void ogdf::energybased::fmmm::NewMultipoleMethod::make_initialisations | ( | const Graph & | G, |
double | boxlength, | ||
DPoint | down_left_corner, | ||
int | particles_in_leaves, | ||
int | precision, | ||
FMMMOptions::ReducedTreeConstruction | tree_construction_way, | ||
FMMMOptions::SmallestCellFinding | find_small_cell | ||
) |
Make all initialisations that are needed for New Multipole Method (NMM)
|
private |
Returns the maximal index of a box in level i.
|
private |
The Lists *L_x(y)_b(t)_ptr are constructed from the Lists *L_x(y)_ptr by moving all List elements from *L_x(y)_ptr that belong to *L_x(y)_l_ptr (moveRight
false) or *L_x(y)_r_ptr (moveRight
true) to this List. The L_x(y)_right_ptr point to the reduced Lists L_x(y)_ptr afterwards but the elements that belong to *&L_x(y)_right_ptr are moved.
|
inlineprivate |
Definition at line 403 of file NewMultipoleMethod.h.
|
inlineprivate |
Max. number of particles that are contained in a leaf of the red. quadtree.
Definition at line 401 of file NewMultipoleMethod.h.
|
private |
Returns power_of_2[i] for values <= max_power_of_2_index.
|
inlineprivate |
Definition at line 408 of file NewMultipoleMethod.h.
|
inlineprivate |
The precision p for the p-term multipole expansions.
Definition at line 406 of file NewMultipoleMethod.h.
|
private |
|
private |
The center of the box of *act_ptr is initialized.
|
private |
The particles in subtree_root_ptr->get_contained_nodes() are assigned to the the contained_nodes lists of the leaves of the subtree by using the information of A,leaf_ptr and maxindex. Afterwards contained_nodes of *subtree_root_ptr is empty.
|
private |
The subtree of T rooted at *T.get_act_ptr() is traversed bottom up, such that the subtreeparticlenumber of every node in this subtree is set correctly.
|
private |
The Lists *act_ptr->get_x(y)_List_ptr() are split into two sublists containing the particles in the left and right half of the actual quad. The list that is larger is constructed from *act_ptr->get_x(y)_List_ptr() by deleting the other elements; The smaller List stays empty at this point, but the corresponding elements in L_x(y)_copy contain a pointer to the x(y) List, where they belong to. If isHorizontal
is true, we are talking about the respective x lists, otherwise about the y lists.
|
private |
The Lists *L_x(y)_b_ptr and *L_x(y)_t_ptr are constructed from the Lists *L_x(y)_ptr.
|
private |
For each leaf v in quad_tree_leaves the force contribution defined by v.get_local_exp() is calculated and stored in F_local_exp.
|
private |
For each leaf v in quad_tree_leaves the force contribution defined by all nodes in v.get_M() is calculated and stored in F_multipole_exp.
|
inlineprivate |
Returns the way to construct the reduced tree.
Definition at line 386 of file NewMultipoleMethod.h.
|
inlineprivate |
Definition at line 390 of file NewMultipoleMethod.h.
void ogdf::energybased::fmmm::NewMultipoleMethod::update_boxlength_and_cornercoordinate | ( | double | b_l, |
DPoint | d_l_c | ||
) |
Import updated information of the drawing area.
|
private |
If the small cell of ptr_1 and ptr_2 are well separated true is returned (else false).
|
private |
Definition at line 87 of file NewMultipoleMethod.h.
|
private |
max.
number of particles for leaves of the quadtree
Definition at line 88 of file NewMultipoleMethod.h.
|
private |
precision for p-term multipole expansion
Definition at line 89 of file NewMultipoleMethod.h.
|
private |
Definition at line 86 of file NewMultipoleMethod.h.
|
private |
holds the binomial coefficients
Definition at line 95 of file NewMultipoleMethod.h.
|
private |
length of drawing box
Definition at line 91 of file NewMultipoleMethod.h.
|
private |
down left corner of drawing box
Definition at line 92 of file NewMultipoleMethod.h.
|
private |
needed in case that using_NMM == false
Definition at line 84 of file NewMultipoleMethod.h.
|
private |
|
private |
The minimum number of nodes for which the forces are calculated using NMM (for lower values the exact calculation is used).
Definition at line 80 of file NewMultipoleMethod.h.
stores the rep. forces of the last iteration needed for error calculation)
Definition at line 99 of file NewMultipoleMethod.h.
|
private |
Indicates whether the exact method or NMM is used for force calculation (value depends on MIN_NODE_NUMBER)
Definition at line 83 of file NewMultipoleMethod.h.