This class is developed for exceptions that might occure, when nodes are placed at the same position and a new random position has to be found, or when the calculated forces are near the machine accuracy, where no reasonable numeric and logic calculations are possible any more. More...
#include <ogdf/energybased/fmmm/numexcept.h>
Public Member Functions | |
| 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 in the box defined by xmin,...,ymax; The size of D is shrunk by multiplying with epsilon = 0.1; Precondition: old_point is contained in the box and the box is not equal to old_point. More... | |
| 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.1 is computed. More... | |
| 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 (calculated values exceed the machine accuracy) in this cases true is returned and force is set to a reasonable value that does not cause problems; Else false is returned and force keeps unchanged. More... | |
| 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 (calculated values exceed the machine accuracy) in this cases true is returned and force is set to a reasonable value that does not cause problems; Else false is returned and force keeps unchanged. More... | |
| bool | nearly_equal (double a, double b) |
| Returns true if a is "nearly" equal to b (needed, when machine accuracy is insufficient in functions well_seperated and bordering of NMM) More... | |
This class is developed for exceptions that might occure, when nodes are placed at the same position and a new random position has to be found, or when the calculated forces are near the machine accuracy, where no reasonable numeric and logic calculations are possible any more.
Definition at line 44 of file numexcept.h.
| DPoint ogdf::energybased::fmmm::numexcept::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 in the box defined by xmin,...,ymax; The size of D is shrunk by multiplying with epsilon = 0.1; Precondition: old_point is contained in the box and the box is not equal to old_point.
| DPoint ogdf::energybased::fmmm::numexcept::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.1 is computed.
| bool ogdf::energybased::fmmm::numexcept::f_near_machine_precision | ( | double | distance, |
| DPoint & | force | ||
| ) |
If distance has a value near the machine precision the (attractive)force calculation is not possible (calculated values exceed the machine accuracy) in this cases true is returned and force is set to a reasonable value that does not cause problems; Else false is returned and force keeps unchanged.
| bool ogdf::energybased::fmmm::numexcept::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 (calculated values exceed the machine accuracy) in this cases true is returned and force is set to a reasonable value that does not cause problems; Else false is returned and force keeps unchanged.
| bool ogdf::energybased::fmmm::numexcept::nearly_equal | ( | double | a, |
| double | b | ||
| ) |
Returns true if a is "nearly" equal to b (needed, when machine accuracy is insufficient in functions well_seperated and bordering of NMM)