MinLCA algorithms
Public Member Functions | Protected Types | Protected Attributes | List of all members
minlca::utils::RandomGeometric< BaseGraph > Class Template Reference

Class defining random geometric graphs. More...

#include <geometric.hh>

Inheritance diagram for minlca::utils::RandomGeometric< BaseGraph >:
[legend]
Collaboration diagram for minlca::utils::RandomGeometric< BaseGraph >:
[legend]

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...
 
Graphinit (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...
 
- Public Member Functions inherited from minlca::utils::RandomGraph< BaseGraph >
 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.
 
- Protected Attributes inherited from minlca::utils::RandomGraph< BaseGraph >
lemon::Random * _r
 Random number generator.
 
bool _delete_random
 Delete the random number generator in destructor.
 

Detailed Description

template<typename BaseGraph = lemon::SmartGraph>
class minlca::utils::RandomGeometric< BaseGraph >

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.

Constructor & Destructor Documentation

template<typename BaseGraph = lemon::SmartGraph>
template<typename Number = int>
minlca::utils::RandomGeometric< BaseGraph >::RandomGeometric ( Number  seed = 0)
inline

Constructor with seed.

See also
RandomGraph::RandomGraph(Number)

Definition at line 41 of file geometric.hh.

template<typename BaseGraph = lemon::SmartGraph>
minlca::utils::RandomGeometric< BaseGraph >::RandomGeometric ( lemon::Random &  r)
inline

Constructor with custom random number generator.

See also
RandomGraph::RandomGraph(lemon::Random &)

Definition at line 48 of file geometric.hh.

Member Function Documentation

template<typename BaseGraph = lemon::SmartGraph>
lemon::dim2::Point<double> minlca::utils::RandomGeometric< BaseGraph >::coord ( const Node &  v) const
inline

Retrieve coordinates for a vertex.

Returns
The coordinates of the vertex

Definition at line 91 of file geometric.hh.

template<typename BaseGraph = lemon::SmartGraph>
const Coords& minlca::utils::RandomGeometric< BaseGraph >::coords ( ) const
inline

Retrieve all the coordinates.

Returns
The coordinates of all vertices

Definition at line 101 of file geometric.hh.

template<typename BaseGraph = lemon::SmartGraph>
Graph& minlca::utils::RandomGeometric< BaseGraph >::init ( int  n,
double  radSq 
)
inline

Initialise the generator.

Parameters
nNumber of vertices
radSqSquare of the radius

Definition at line 54 of file geometric.hh.


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