All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
NetworKit::HyperbolicSpace Class Reference

#include <HyperbolicSpace.h>

Public Member Functions

 HyperbolicSpace ()=default
 
virtual ~HyperbolicSpace ()=default
 

Static Public Member Functions

static void fillPoints (vector< double > &angles, vector< double > &radii, double R, double alpha)
 
static void fillPoints (vector< double > &angles, vector< double > &radii, double minPhi, double maxPhi, double minR, double maxR, double alpha)
 
static double poincareMetric (double firstangle, double firstR, double secondangle, double secondR)
 This distance measure is taken from the PoincarĂ© disc model. More...
 
static double nativeDistance (double firstangle, double firstR, double secondangle, double secondR)
 
static double poincareMetric (Point2D< double > a, Point2D< double > b)
 
static Point2D< double > polarToCartesian (double phi, double r)
 
static std::map< index, Point
< float > > 
polarToCartesian (const vector< double > &angles, const vector< double > &radii)
 Convenience function for visualizations which expect coordinates as map<index,Point<float> > More...
 
static void cartesianToPolar (Point2D< double > a, double &phi, double &r)
 
static void getEuclideanCircle (Point2D< double > hyperbolicCenter, double hyperbolicRadius, Point2D< double > &euclideanCenter, double &euclideanRadius)
 Converts a hyperbolic circle to a Euclidean circle. More...
 
static void getEuclideanCircle (double r_h, double hyperbolicRadius, double &radialCoordOfEuclideanCenter, double &euclideanRadius)
 
static double hyperbolicRadiusToEuclidean (double hyperbolicRadius)
 Project radial coordinates of the hyperbolic plane into the Poincare disk model. More...
 
static double EuclideanRadiusToHyperbolic (double EuclideanRadius)
 Project radial coordinates of the Poincare model into the hyperbolic plane. More...
 
static double hyperbolicAreaToRadius (double area)
 
static double radiusToHyperbolicArea (double radius)
 
static double getExpectedDegree (double n, double alpha, double R)
 
static double searchTargetRadiusForColdGraphs (double n, double k, double alpha, double epsilon)
 
static double getTargetRadius (double n, double m, double alpha=1, double T=0, double epsilon=0.01)
 
static double effectiveAreaInCell (double minPhi, double maxPhi, double minR, double maxR, double alpha)
 
static double hyperbolicSpaceInEuclideanCircle (double r_c, double d_c, double R)
 
static double maxRinSlice (double minPhi, double maxPhi, double phi_c, double r_c, double euRadius)
 

Constructor & Destructor Documentation

NetworKit::HyperbolicSpace::HyperbolicSpace ( )
default
virtual NetworKit::HyperbolicSpace::~HyperbolicSpace ( )
virtualdefault

Member Function Documentation

void NetworKit::HyperbolicSpace::cartesianToPolar ( Point2D< double >  a,
double &  phi,
double &  r 
)
static
Parameters
acartesian coordinates
phiempty double value to receive angular coordinate
rempty double value to receive radial coordinate
static double NetworKit::HyperbolicSpace::effectiveAreaInCell ( double  minPhi,
double  maxPhi,
double  minR,
double  maxR,
double  alpha 
)
inlinestatic
double NetworKit::HyperbolicSpace::EuclideanRadiusToHyperbolic ( double  EuclideanRadius)
static

Project radial coordinates of the Poincare model into the hyperbolic plane.

Parameters
EuclideanRadiusRadial coordinate of a point in the Poincare model
Returns
radial coordinate in the hyperbolic plane
void NetworKit::HyperbolicSpace::fillPoints ( vector< double > &  angles,
vector< double > &  radii,
double  R,
double  alpha 
)
static
Parameters
anglesempty vector to hold angular coordinates of generated points
radiiempty vector to hold radial coordinates of generated points
Rradius of the hyperbolic disk
alphadispersion parameter for the node positions

Fill preallocated vectors with randomly sampled points in native coordinates

void NetworKit::HyperbolicSpace::fillPoints ( vector< double > &  angles,
vector< double > &  radii,
double  minPhi,
double  maxPhi,
double  minR,
double  maxR,
double  alpha 
)
static
Parameters
anglesempty vector to hold angular coordinates of generated points
radiiempty vector to hold radial coordinates of generated points
stretchmultiplier for the radius of the hyperbolic disk
alphadispersion parameter for the node positions

Fill preallocated vectors with randomly sampled points in native coordinates

for the radial coordinate distribution, I took the probability density from Greedy Forwarding in Dynamic Scale-Free Networks Embedded in Hyperbolic Metric Spaces f (r) = sinh r/(cosh R − 1) sinh = cosh+const

void NetworKit::HyperbolicSpace::getEuclideanCircle ( Point2D< double >  hyperbolicCenter,
double  hyperbolicRadius,
Point2D< double > &  euclideanCenter,
double &  euclideanRadius 
)
static

Converts a hyperbolic circle to a Euclidean circle.

Parameters
hyperbolicCentercenter of the hyperbolic circle, given in cartesian coordinates within the poincare disk
hyperbolicRadiusradius of the hyperbolic circle
euclideanCenterpoint to receive the center of the Euclidean circle, given in cartesian coordinates
euclidenRadiusdouble to receive the radius of the Euclidean circle
void NetworKit::HyperbolicSpace::getEuclideanCircle ( double  r_h,
double  hyperbolicRadius,
double &  radialCoordOfEuclideanCenter,
double &  euclideanRadius 
)
static
static double NetworKit::HyperbolicSpace::getExpectedDegree ( double  n,
double  alpha,
double  R 
)
inlinestatic
static double NetworKit::HyperbolicSpace::getTargetRadius ( double  n,
double  m,
double  alpha = 1,
double  T = 0,
double  epsilon = 0.01 
)
inlinestatic
static double NetworKit::HyperbolicSpace::hyperbolicAreaToRadius ( double  area)
inlinestatic
Parameters
areaThe area of the hyperbolic circle
returnRadius of a hyperbolic circle with the given area
double NetworKit::HyperbolicSpace::hyperbolicRadiusToEuclidean ( double  hyperbolicRadius)
static

Project radial coordinates of the hyperbolic plane into the Poincare disk model.

Parameters
hyperbolicRadiusradial coordinate of a point in the native hyperbolic disc
Returns
radial coordinate in the Poincare model
double NetworKit::HyperbolicSpace::hyperbolicSpaceInEuclideanCircle ( double  r_c,
double  d_c,
double  R 
)
static
Parameters
r_cradial coordinate of the circle center
d_cradius of the Euclidean circle
Rradius of the hyperbolic base disk

Now, the integral. It is 4{min}^{max} {acos}({r_c^2-d_c^2+r^2}{2r_c r}) {1}{1-r^2} ( ({acosh}( 1 + 2{r^2}{1 - r^2})))\,dr This solution was computed by WolframAlpha

double NetworKit::HyperbolicSpace::maxRinSlice ( double  minPhi,
double  maxPhi,
double  phi_c,
double  r_c,
double  euRadius 
)
static
double NetworKit::HyperbolicSpace::nativeDistance ( double  firstangle,
double  firstR,
double  secondangle,
double  secondR 
)
static
Parameters
firstangleangular coordinate of the first point
firstRradial coordiante of the first point
secondangleangular coordinate of the second point
secondRradial coordinate of the second point
Returns
distance between two points in native hyperbolic representation
double NetworKit::HyperbolicSpace::poincareMetric ( double  firstangle,
double  firstR,
double  secondangle,
double  secondR 
)
static

This distance measure is taken from the Poincaré disc model.

Parameters
firstangleangular coordinate of the first point
firstRradial coordiante of the first point
secondangleangular coordinate of the second point
secondRradial coordinate of the second point
Returns
distance between two points in the poincare metric
double NetworKit::HyperbolicSpace::poincareMetric ( Point2D< double >  a,
Point2D< double >  b 
)
static
Parameters
afirst point in cartesian coordinates
bsecond point in cartesian coordinates
Returns
distance between a and b in the poincare metric
Point2D< double > NetworKit::HyperbolicSpace::polarToCartesian ( double  phi,
double  r 
)
static
Parameters
phiangular coordinate of point
rradial coordinate of point
Returns
cartesian coordinates represented by phi and r
std::map< index, Point< float > > NetworKit::HyperbolicSpace::polarToCartesian ( const vector< double > &  angles,
const vector< double > &  radii 
)
static

Convenience function for visualizations which expect coordinates as map<index,Point<float> >

static double NetworKit::HyperbolicSpace::radiusToHyperbolicArea ( double  radius)
inlinestatic
static double NetworKit::HyperbolicSpace::searchTargetRadiusForColdGraphs ( double  n,
double  k,
double  alpha,
double  epsilon 
)
inlinestatic

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