Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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