Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1
32#pragma once
33
36
37namespace ogdf {
38namespace energybased {
39namespace fmmm {
40
42 const NodeArray<NodeAttributes>& A, const List<node>& contained_nodes) {
43 int length = contained_nodes.size();
44 Array<node> numbered_nodes(length + 1);
45 int i = 1;
46 for (node v : contained_nodes) {
47 numbered_nodes[i] = v;
48 ++i;
49 }
50
51 for (i = 1; i < length; i++) {
52 for (int j = i + 1; j <= length; j++) {
53 node u = numbered_nodes[i];
55 DPoint f_rep_u_on_v = numexcept::f_rep_u_on_v(A[u].get_position(), A[v].get_position());
56 F_rep[v] += f_rep_u_on_v;
57 F_rep[u] -= f_rep_u_on_v;
58 }
59 }
60}
61
62}
63}
64}
Declaration of class NodeAttributes.
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
int size() const
Returns the number of elements in the list.
Definition List.h:1472
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
static DPoint f_rep_u_on_v(DPoint pos_u, DPoint pos_v)
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
void calculate_forces_inside_contained_nodes(NodeArray< DPoint > &F_rep, const NodeArray< NodeAttributes > &A, const List< node > &contained_nodes)
Definition common.h:41
The namespace for all OGDF objects.
Declaration of class numexcept (handling of numeric problems).