Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::energybased::dtree::DTreeEmbedder< Dim > Class Template Reference

#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 Graphgraph () 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 Graphm_graph
 the graph More...
 
int m_maxNumNodesExactRepForces
 
NodeArray< NodeInfom_nodeInfo
 node states of all nodes More...
 
DTreeForce< Dim > * m_pTreeForce
 the tree force approx More...
 

Detailed Description

template<int Dim>
class ogdf::energybased::dtree::DTreeEmbedder< Dim >

Definition at line 39 of file DTreeEmbedder.h.

Constructor & Destructor Documentation

◆ DTreeEmbedder()

template<int Dim>
ogdf::energybased::dtree::DTreeEmbedder< Dim >::DTreeEmbedder ( const Graph graph)
explicit

constructor with a given graph, allocates memory and does initialization

Definition at line 172 of file DTreeEmbedder.h.

◆ ~DTreeEmbedder()

template<int Dim>
ogdf::energybased::dtree::DTreeEmbedder< Dim >::~DTreeEmbedder
virtual

destructor

Definition at line 186 of file DTreeEmbedder.h.

Member Function Documentation

◆ centerNodesAt()

template<int Dim>
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.

◆ computeEdgeForces()

template<int Dim>
template<typename AttrForceFunc , bool UseForcePrime>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeEdgeForces ( AttrForceFunc  attrForceFunc)

computes the edge forces for one iteration

Definition at line 348 of file DTreeEmbedder.h.

◆ computeRepForces()

template<int Dim>
template<typename ForceFunc , bool UseForcePrime>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeRepForces ( ForceFunc  forceFunc)

computes the repulsive forces

Definition at line 324 of file DTreeEmbedder.h.

◆ computeRepForcesApprox()

template<int Dim>
template<typename ForceFunc , bool UseForcePrime>
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 250 of file DTreeEmbedder.h.

◆ computeRepForcesExact()

template<int Dim>
template<typename ForceFunc , bool UseForcePrime>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::computeRepForcesExact ( ForceFunc  forceFunc)

computes the repulsive forces for one iteration in O(n^2)

Definition at line 193 of file DTreeEmbedder.h.

◆ doIterationsNewton()

template<int Dim>
template<typename RepForceFunc , typename AttrForceFunc >
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::doIterationsNewton ( int  numIterations,
double  epsilon,
RepForceFunc  repForceFunc,
AttrForceFunc  attrForceFunc 
)

Definition at line 709 of file DTreeEmbedder.h.

◆ doIterationsStandard()

template<int Dim>
template<typename RepForceFunc , typename AttrForceFunc >
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::doIterationsStandard ( int  numIterations,
double  epsilon,
RepForceFunc  repForceFunc,
AttrForceFunc  attrForceFunc 
)

Definition at line 702 of file DTreeEmbedder.h.

◆ doIterationsTempl()

template<int Dim>
template<typename RepForceFunc , typename AttrForceFunc , bool UseForcePrime>
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 662 of file DTreeEmbedder.h.

◆ edgeWeight()

template<int Dim>
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::edgeWeight ( edge  e) const

returns the edge weight

Definition at line 792 of file DTreeEmbedder.h.

◆ graph()

template<int Dim>
const Graph & ogdf::energybased::dtree::DTreeEmbedder< Dim >::graph

returns the graph

Definition at line 780 of file DTreeEmbedder.h.

◆ mass()

template<int Dim>
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::mass ( node  v) const

returns the mass of node v

Definition at line 768 of file DTreeEmbedder.h.

◆ moveNodes()

template<int Dim>
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::moveNodes ( double  timeStep)

moves the nodes by the computed force vector

Definition at line 530 of file DTreeEmbedder.h.

◆ moveNodesByForcePrime()

template<int Dim>
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::moveNodesByForcePrime

Definition at line 505 of file DTreeEmbedder.h.

◆ position()

template<int Dim>
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::position ( node  v,
int  d 
) const

returns the d-th coordinate of node v

Definition at line 756 of file DTreeEmbedder.h.

◆ resetForces()

template<int Dim>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::resetForces

sets the forces of all nodes to 0

Definition at line 556 of file DTreeEmbedder.h.

◆ scaleNodes()

template<int Dim>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::scaleNodes ( double  scaleFactor)

changes the position of nodes according to a given scale factor

Definition at line 746 of file DTreeEmbedder.h.

◆ setEdgeWeight()

template<int Dim>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::setEdgeWeight ( edge  e,
double  weight 
)

sets the weight of an edge

Definition at line 786 of file DTreeEmbedder.h.

◆ setMass()

template<int Dim>
void ogdf::energybased::dtree::DTreeEmbedder< Dim >::setMass ( node  v,
double  mass 
)

sets the mass of a node v

Definition at line 774 of file DTreeEmbedder.h.

◆ setPosition()

template<int Dim>
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 762 of file DTreeEmbedder.h.

Member Data Documentation

◆ m_defaultTimeStep

template<int Dim>
double ogdf::energybased::dtree::DTreeEmbedder< Dim >::m_defaultTimeStep
private

Definition at line 165 of file DTreeEmbedder.h.

◆ m_edgeWeight

template<int Dim>
EdgeArray<double> ogdf::energybased::dtree::DTreeEmbedder< Dim >::m_edgeWeight
private

the weight of the edges

Definition at line 158 of file DTreeEmbedder.h.

◆ m_graph

template<int Dim>
const Graph& ogdf::energybased::dtree::DTreeEmbedder< Dim >::m_graph
private

the graph

Definition at line 152 of file DTreeEmbedder.h.

◆ m_maxNumNodesExactRepForces

template<int Dim>
int ogdf::energybased::dtree::DTreeEmbedder< Dim >::m_maxNumNodesExactRepForces
private

Definition at line 163 of file DTreeEmbedder.h.

◆ m_nodeInfo

template<int Dim>
NodeArray<NodeInfo> ogdf::energybased::dtree::DTreeEmbedder< Dim >::m_nodeInfo
private

node states of all nodes

Definition at line 155 of file DTreeEmbedder.h.

◆ m_pTreeForce

template<int Dim>
DTreeForce<Dim>* ogdf::energybased::dtree::DTreeEmbedder< Dim >::m_pTreeForce
private

the tree force approx

Definition at line 161 of file DTreeEmbedder.h.


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