MinLCA algorithms
|
Class defining random geometric graphs. More...
#include <geometric.hh>
Public Member Functions | |
TEMPLATE_GRAPH_TYPEDEFS (Graph) | |
template<typename Number = int> | |
RandomGeometric (Number seed=0) | |
Constructor with seed. More... | |
RandomGeometric (lemon::Random &r) | |
Constructor with custom random number generator. More... | |
Graph & | init (int n, double radSq) |
Initialise the generator. More... | |
virtual void | generate () |
Generate graph. | |
lemon::dim2::Point< double > | coord (const Node &v) const |
Retrieve coordinates for a vertex. More... | |
const Coords & | coords () const |
Retrieve all the coordinates. More... | |
![]() | |
RandomGraph (Number seed=0) | |
Constructor with seed. More... | |
RandomGraph (lemon::Random &r) | |
Constructor with custom random number generator. More... | |
~RandomGraph () | |
Destructor. More... | |
void | seed (Number seed) |
Change the random number generator seed. More... | |
void | changeRandom (lemon::Random &r) |
Change the random number generator. More... | |
Protected Types | |
typedef RandomGeometric< BaseGraph > | Graph |
typedef RandomGraph< BaseGraph > | Base |
typedef Graph::template NodeMap< lemon::dim2::Point< double > > | Coords |
Protected Attributes | |
Coords | _coords |
Coordinates of the vertices. | |
int | _n |
Number of vertices. | |
double | _rad_sq |
Square of the radius. | |
![]() | |
lemon::Random * | _r |
Random number generator. | |
bool | _delete_random |
Delete the random number generator in destructor. | |
Class defining random geometric graphs.
This class defines random geometric graphs on the unit disc with the standard Euclidean distance.
Definition at line 21 of file geometric.hh.
|
inline |
Constructor with seed.
Definition at line 41 of file geometric.hh.
|
inline |
Constructor with custom random number generator.
Definition at line 48 of file geometric.hh.
|
inline |
Retrieve coordinates for a vertex.
Definition at line 91 of file geometric.hh.
|
inline |
Retrieve all the coordinates.
Definition at line 101 of file geometric.hh.
|
inline |
Initialise the generator.
n | Number of vertices |
radSq | Square of the radius |
Definition at line 54 of file geometric.hh.