Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

numexcept.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
35 #include <ogdf/basic/geometry.h>
36 
37 namespace ogdf {
38 namespace energybased {
39 namespace fmmm {
40 
45 class numexcept {
46 public:
51  static DPoint choose_distinct_random_point_in_disque(DPoint old_point, double xmin, double xmax,
52  double ymin, double ymax);
53 
58  static bool f_near_machine_precision(double distance, DPoint& force);
59 
62  static bool nearly_equal(double a, double b);
63 
64  static DPoint f_rep_u_on_v(DPoint pos_u, DPoint pos_v);
65 
66 protected:
70 
75  static bool f_rep_near_machine_precision(double distance, DPoint& force);
76 
78  static double f_rep_scalar(double d) {
79  OGDF_ASSERT(d != 0);
80  return 1 / d;
81  }
82 };
83 
84 }
85 }
86 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GenericPoint< double >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:66
ogdf::energybased::fmmm::numexcept::choose_distinct_random_point_in_radius_epsilon
static DPoint choose_distinct_random_point_in_radius_epsilon(DPoint old_pos)
A random point (distinct from old_pos) on the disque around old_pos with radius epsilon = 0....
ogdf::energybased::fmmm::numexcept::nearly_equal
static bool nearly_equal(double a, double b)
Returns true if a is "nearly" equal to b (needed, when machine accuracy is insufficient in functions ...
ogdf::energybased::fmmm::numexcept::f_rep_near_machine_precision
static bool f_rep_near_machine_precision(double distance, DPoint &force)
If distance has a value near the machine precision the repulsive force calculation is not possible (c...
ogdf::energybased::fmmm::numexcept
This class is developed for exceptions that might occure, when nodes are placed at the same position ...
Definition: numexcept.h:45
ogdf::energybased::fmmm::numexcept::f_rep_scalar
static double f_rep_scalar(double d)
Returns the repulsing force_function_value of scalar d.
Definition: numexcept.h:78
basic.h
Basic declarations, included by all source files.
ogdf::energybased::fmmm::numexcept::f_rep_u_on_v
static DPoint f_rep_u_on_v(DPoint pos_u, DPoint pos_v)
ogdf::energybased::fmmm::numexcept::choose_distinct_random_point_in_disque
static DPoint choose_distinct_random_point_in_disque(DPoint old_point, double xmin, double xmax, double ymin, double ymax)
Returns a distinct random point within the smallest disque D with center old_point that is contained ...
ogdf::energybased::fmmm::numexcept::f_near_machine_precision
static bool f_near_machine_precision(double distance, DPoint &force)
If distance has a value near the machine precision the (attractive)force calculation is not possible ...