 |
Synthia
Generic and flexible data structure generator
|
Go to the documentation of this file.
19 package examples.graphs;
56 public static void main(String[] args)
67 }.setNodeString(
"[style=\"filled\",width=0.1,height=0.1,shape=\"circle\"]");
75 super(node_picker, size);
85 connect(start_node1, start_node2);
98 int k_i = n.getChildren().size();
void printToDot(PrintStream ps, Node< T > n)
BarabasiAlbert(Picker< Node< T >> node_picker, Picker< Integer > size, Reactive< Float, Boolean > coin)
static String colorGradient(float fraction)
Creates a simple 5-color gradient.
Utility picker that converts an input into an integer.
Reactive< Float, Boolean > m_coin
Interface implemented by pickers whose picking of objects can be altered by external information.
Miscellaneous pickers performing various functions.
static void main(String[] args)
Picker< Node< T > > duplicate(boolean with_state)
Creates a copy of the picker.
Generates a graph following the Barabási–Albert model.
Picker< Node< T > > m_nodePicker
Pickers that produce pseudo-random objects such as numbers.
List< Node< T > > getChildren()
Gets the children of this node.
Pickers for the generation of trees made of nodes with labels.
Node< T > pick()
Picks an object.
Object providing a few utility methods to simplify the examples in this project.
Renders a tree of labeled nodes as a Graphviz input file.
void connect(Node< T > n1, Node< T > n2)
Connects two nodes in a graph.
Picks an integer uniformly in an interval.
Generates a sequence of monotonically increasing numerical values.
int getMaxDegree()
Gets the maximum out degree in a set of nodes in the last graph generated.
void tell(U u)
Notifies a picker of some external information.
Simple implementation of a labeled nodel.