#include <ogdf/energybased/dtree/DTreeEmbedder.h>
Classes | |
struct | NodeInfo |
node state More... | |
Public Member Functions | |
DTreeEmbedder (const Graph &graph) | |
constructor with a given graph, allocates memory and does initialization More... | |
virtual | ~DTreeEmbedder () |
destructor More... | |
void | centerNodesAt (double centerBBox[Dim]) |
computes the bounding box and all nodes are translated such that bbox center is at centerBBox More... | |
template<typename AttrForceFunc , bool UseForcePrime> | |
void | computeEdgeForces (AttrForceFunc attrForceFunc) |
computes the edge forces for one iteration More... | |
template<typename ForceFunc , bool UseForcePrime> | |
void | computeRepForces (ForceFunc forceFunc) |
computes the repulsive forces More... | |
template<typename ForceFunc , bool UseForcePrime> | |
void | computeRepForcesApprox (ForceFunc forceFunc) |
uses the tree code to approximate the repulsive forces in O(nlogn) for one iteration More... | |
template<typename ForceFunc , bool UseForcePrime> | |
void | computeRepForcesExact (ForceFunc forceFunc) |
computes the repulsive forces for one iteration in O(n^2) More... | |
template<typename RepForceFunc , typename AttrForceFunc > | |
void | doIterationsNewton (int numIterations, double epsilon, RepForceFunc repForceFunc, AttrForceFunc attrForceFunc) |
template<typename RepForceFunc , typename AttrForceFunc > | |
void | doIterationsStandard (int numIterations, double epsilon, RepForceFunc repForceFunc, AttrForceFunc attrForceFunc) |
template<typename RepForceFunc , typename AttrForceFunc , bool UseForcePrime> | |
void | doIterationsTempl (int numIterations, double epsilon, RepForceFunc repForceFunc, AttrForceFunc attrForceFunc) |
does multiple iterations using the given repulsive force function More... | |
double | edgeWeight (edge e) const |
returns the edge weight More... | |
const Graph & | graph () const |
returns the graph More... | |
double | mass (node v) const |
returns the mass of node v More... | |
double | moveNodes (double timeStep) |
moves the nodes by the computed force vector More... | |
double | moveNodesByForcePrime () |
double | position (node v, int d) const |
returns the d-th coordinate of node v More... | |
void | resetForces () |
sets the forces of all nodes to 0 More... | |
void | scaleNodes (double scaleFactor) |
changes the position of nodes according to a given scale factor More... | |
void | setEdgeWeight (edge e, double weight) |
sets the weight of an edge More... | |
void | setMass (node v, double mass) |
sets the mass of a node v More... | |
void | setPosition (node v, int d, double coord) |
sets the d-th coordinate of node v to coord More... | |
Private Attributes | |
double | m_defaultTimeStep |
EdgeArray< double > | m_edgeWeight |
the weight of the edges More... | |
const Graph & | m_graph |
the graph More... | |
int | m_maxNumNodesExactRepForces |
NodeArray< NodeInfo > | m_nodeInfo |
node states of all nodes More... | |
DTreeForce< Dim > * | m_pTreeForce |
the tree force approx More... | |
Definition at line 44 of file DTreeEmbedder.h.
|
explicit |
constructor with a given graph, allocates memory and does initialization
Definition at line 179 of file DTreeEmbedder.h.
|
virtual |
destructor
Definition at line 192 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::centerNodesAt | ( | double | centerBBox[Dim] | ) |
computes the bounding box and all nodes are translated such that bbox center is at centerBBox
Definition at line 715 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeEdgeForces | ( | AttrForceFunc | attrForceFunc | ) |
computes the edge forces for one iteration
Definition at line 351 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeRepForces | ( | ForceFunc | forceFunc | ) |
computes the repulsive forces
Definition at line 328 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeRepForcesApprox | ( | ForceFunc | forceFunc | ) |
uses the tree code to approximate the repulsive forces in O(nlogn) for one iteration
Definition at line 255 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeRepForcesExact | ( | ForceFunc | forceFunc | ) |
computes the repulsive forces for one iteration in O(n^2)
Definition at line 198 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::doIterationsNewton | ( | int | numIterations, |
double | epsilon, | ||
RepForceFunc | repForceFunc, | ||
AttrForceFunc | attrForceFunc | ||
) |
Definition at line 708 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::doIterationsStandard | ( | int | numIterations, |
double | epsilon, | ||
RepForceFunc | repForceFunc, | ||
AttrForceFunc | attrForceFunc | ||
) |
Definition at line 700 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::doIterationsTempl | ( | int | numIterations, |
double | epsilon, | ||
RepForceFunc | repForceFunc, | ||
AttrForceFunc | attrForceFunc | ||
) |
does multiple iterations using the given repulsive force function
Definition at line 661 of file DTreeEmbedder.h.
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::edgeWeight | ( | edge | e | ) | const |
returns the edge weight
Definition at line 784 of file DTreeEmbedder.h.
const Graph & ogdf::energybased::dtree::DTreeEmbedder< Dim >::graph |
returns the graph
Definition at line 774 of file DTreeEmbedder.h.
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::mass | ( | node | v | ) | const |
returns the mass of node v
Definition at line 764 of file DTreeEmbedder.h.
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::moveNodes | ( | double | timeStep | ) |
moves the nodes by the computed force vector
Definition at line 531 of file DTreeEmbedder.h.
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::moveNodesByForcePrime |
Definition at line 507 of file DTreeEmbedder.h.
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::position | ( | node | v, |
int | d | ||
) | const |
returns the d-th coordinate of node v
Definition at line 754 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::resetForces |
sets the forces of all nodes to 0
Definition at line 556 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::scaleNodes | ( | double | scaleFactor | ) |
changes the position of nodes according to a given scale factor
Definition at line 745 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::setEdgeWeight | ( | edge | e, |
double | weight | ||
) |
sets the weight of an edge
Definition at line 779 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::setMass | ( | node | v, |
double | mass | ||
) |
sets the mass of a node v
Definition at line 769 of file DTreeEmbedder.h.
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::setPosition | ( | node | v, |
int | d, | ||
double | coord | ||
) |
sets the d-th coordinate of node v to coord
Definition at line 759 of file DTreeEmbedder.h.
|
private |
Definition at line 172 of file DTreeEmbedder.h.
|
private |
the weight of the edges
Definition at line 165 of file DTreeEmbedder.h.
|
private |
the graph
Definition at line 159 of file DTreeEmbedder.h.
|
private |
Definition at line 170 of file DTreeEmbedder.h.
|
private |
node states of all nodes
Definition at line 162 of file DTreeEmbedder.h.
|
private |
the tree force approx
Definition at line 168 of file DTreeEmbedder.h.