Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::energybased::fmmm::numexcept Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

◆ choose_distinct_random_point_in_disque()

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.

◆ choose_distinct_random_point_in_radius_epsilon()

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.

◆ f_near_machine_precision()

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.

◆ f_rep_near_machine_precision()

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.

◆ nearly_equal()

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)


The documentation for this class was generated from the following file: