Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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>

Static Public Member Functions

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 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.
 
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 (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.
 
static DPoint f_rep_u_on_v (DPoint pos_u, DPoint pos_v)
 
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 well_seperated and bordering of NMM)
 

Static Protected Member 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.1 is computed.
 
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 (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.
 
static double f_rep_scalar (double d)
 Returns the repulsing force_function_value of scalar d.
 

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()

static DPoint ogdf::energybased::fmmm::numexcept::choose_distinct_random_point_in_disque ( DPoint  old_point,
double  xmin,
double  xmax,
double  ymin,
double  ymax 
)
static

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()

static DPoint ogdf::energybased::fmmm::numexcept::choose_distinct_random_point_in_radius_epsilon ( DPoint  old_pos)
staticprotected

A random point (distinct from old_pos) on the disque around old_pos with radius epsilon = 0.1 is computed.

◆ f_near_machine_precision()

static bool ogdf::energybased::fmmm::numexcept::f_near_machine_precision ( double  distance,
DPoint force 
)
static

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()

static bool ogdf::energybased::fmmm::numexcept::f_rep_near_machine_precision ( double  distance,
DPoint force 
)
staticprotected

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.

◆ f_rep_scalar()

static double ogdf::energybased::fmmm::numexcept::f_rep_scalar ( double  d)
inlinestaticprotected

Returns the repulsing force_function_value of scalar d.

Definition at line 77 of file numexcept.h.

◆ f_rep_u_on_v()

static DPoint ogdf::energybased::fmmm::numexcept::f_rep_u_on_v ( DPoint  pos_u,
DPoint  pos_v 
)
static

◆ nearly_equal()

static bool ogdf::energybased::fmmm::numexcept::nearly_equal ( double  a,
double  b 
)
static

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: