#include <constant_edge_random.h>


Public Types | |
| typedef DynamicNodeArray< int > | base_type |
Public Member Functions | |
| ConstantEdgeRandom (World &, const std::string &tag="") | |
| virtual | ~ConstantEdgeRandom () |
| double | operator() (const Node &, const Node &, bool directed=false) const throw () |
| virtual void | node_added (Node &v) throw () |
| Is called whenever a node gets added to the world. | |
Protected Member Functions | |
| virtual void | assign_seed (Node &) throw () |
| typedef DynamicNodeArray<int> shawn::ConstantEdgeRandom::base_type |
| shawn::ConstantEdgeRandom::ConstantEdgeRandom | ( | World & | , | |
| const std::string & | tag = "" | |||
| ) |
constructs a ConstantEdgeRandom. If tag is not empty, it will save write state information to node tags (with the given name) so that the random values survive a save&load cycle
| virtual shawn::ConstantEdgeRandom::~ConstantEdgeRandom | ( | ) | [virtual] |
| double shawn::ConstantEdgeRandom::operator() | ( | const Node & | , | |
| const Node & | , | |||
| bool | directed = false | |||
| ) | const throw () |
returns a number uniformly distributed between 0.0 and 1.0 (both inclusive). For the same node pair, it always returns the same number. If directed==true, ()(u,v) and ()(v,u) are different.
| virtual void shawn::ConstantEdgeRandom::node_added | ( | Node & | ) | throw () [virtual] |
Is called whenever a node gets added to the world.
Reimplemented from shawn::DynamicNodeArray< int >.
| virtual void shawn::ConstantEdgeRandom::assign_seed | ( | Node & | ) | throw () [protected, virtual] |
1.5.6