public class GraphBuilder<T>
Builder for graphs, directed and undirected
public GraphBuilder(net.maizegenetics.util.Graph.GraphType type)
Generic constructor
type - The type of graph to constructpublic GraphBuilder<T> addNode(T n)
Adds a single node
n - A nodepublic GraphBuilder<T> addEdge(T u, T v)
Adds an edge to the graph with weight 1.
u - The first node in the edgev - The second node in the edgepublic GraphBuilder<T> addEdge(T u, T v, double wt)
Adds an edge to the graph
u - The first node in the edgev - The second node in the edgewt - The weight of the edge