Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

numexcept.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/geometry.h>
35 
36 namespace ogdf {
37 namespace energybased {
38 namespace fmmm {
39 
44 class numexcept
45 {
46 public:
52  DPoint old_point,
53  double xmin,
54  double xmax,
55  double ymin,
56  double ymax);
57 
62  static bool f_near_machine_precision(double distance, DPoint& force);
63 
66  static bool nearly_equal(double a, double b);
67 
68  static DPoint f_rep_u_on_v(DPoint pos_u, DPoint pos_v);
69 
70 protected:
74 
79  static bool f_rep_near_machine_precision(double distance, DPoint& force);
80 
82  static double f_rep_scalar(double d) {
83  OGDF_ASSERT(d != 0);
84  return 1/d;
85  }
86 };
87 
88 }
89 }
90 }
static double f_rep_scalar(double d)
Returns the repulsing force_function_value of scalar d.
Definition: numexcept.h:82
static DPoint f_rep_u_on_v(DPoint pos_u, DPoint pos_v)
This class is developed for exceptions that might occure, when nodes are placed at the same position ...
Definition: numexcept.h:44
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 ...
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 ...
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 ...
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...
The namespace for all OGDF objects.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment, DPolygon, DRect, DIntersectableRect.
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...
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:41