All Packages Class Hierarchy This Package Previous Next Index
Class tw.edu.ncnu.im.cnclab.JGAP.BipartiteRandomizer
java.lang.Object
|
+----tw.edu.ncnu.im.cnclab.JGAP.GraphRandomizer
|
+----tw.edu.ncnu.im.cnclab.JGAP.BipartiteRandomizer
- public class BipartiteRandomizer
- extends GraphRandomizer
The BipartiteRandomizer class can use to randomize a bipartite.
Folowing parameters can be used to randomize the graph.
-
lverts : the number of the left vertices in the bipartite.
-
rverts : the number of the right vertices in the bipartite.
- Version:
- 0.4 Jul 8, 1999
- Author:
- Ding-Yi Chen
- See Also:
- Graph
-
BipartiteRandomizer(Dimension)
- Constructor of GraphRandomizer.
-
generate(int, int)
- Generate a randomized bipartite.
-
generate(int, int, double)
- Generate a randomized bipartite.
-
generate(int, int, double, double, double)
- Generate a randomized bipartite.
-
generate(int, int, double, double, double, boolean)
- Generate a randomized bipartite.
-
generateEdges(Graph, int, int, double, double, double)
- Randomly generate the edge.
-
generateVertices(Graph, int, int)
- Place the vertices.
BipartiteRandomizer
public BipartiteRandomizer(Dimension d)
- Constructor of GraphRandomizer.
- Parameters:
- d - the size of the canvas which bipartites be drawn on.
generate
public Graph generate(int lverts,
int rverts) throws TooManyVerticesException
- Generate a randomized bipartite.
- Parameters:
- lverts - the number of left vertices of the bipartite.
- rverts - the number of right vertices of the bipartite.
- Returns:
- the generated bipartite.
- Throws: TooManyVerticesException
- if
(lvert+rvert) greater than Graph.MAX_VERTICES
- See Also:
- MAX_VERTICES
generate
public Graph generate(int lverts,
int rverts,
double density) throws TooManyVerticesException
- Generate a randomized bipartite.
- Parameters:
- verts - the number of vertices of the bipartite.
- density - the probability of edge appear between vertices.
- Returns:
- the generated bipartite.
- Throws: TooManyVerticesException
- if
(lvert+rvert) greater than Graph.MAX_VERTICES
- See Also:
- MAX_VERTICES
generate
public Graph generate(int lverts,
int rverts,
double density,
double lowerBound,
double upperBound) throws TooManyVerticesException
- Generate a randomized bipartite.
- Parameters:
- lverts - the number of left vertices of the bipartite.
- rverts - the number of right vertices of the bipartite.
- density - the probability of edge appear between vertices.
- lowerBound - the lower bound of edge weight.
- upperBound - the upper bound of edge weight.
- directed - indicate whether the bipartite directed
- selfLooped - allows the self-loop.
- Returns:
- the generated bipartite.
- Throws: TooManyVerticesException
- if
(lvert+rvert) greater than Graph.MAX_VERTICES
- See Also:
- MAX_VERTICES
generate
public Graph generate(int lverts,
int rverts,
double density,
double lowerBound,
double upperBound,
boolean directed) throws TooManyVerticesException
- Generate a randomized bipartite.
- Parameters:
- lverts - the number of left vertices of the bipartite.
- rverts - the number of right vertices of the bipartite.
- density - the probability of edge appear between vertices.
- lowerBound - the lower bound of edge weight.
- upperBound - the upper bound of edge weight.
- directed - Indicate whether the bipartite directed
- Returns:
- the generated bipartite.
- Throws: TooManyVerticesException
- if
(lvert+rvert) greater than Graph.MAX_VERTICES
- See Also:
- MAX_VERTICES
generateVertices
protected void generateVertices(Graph bipartite,
int lverts,
int rverts)
- Place the vertices.
- Parameters:
- bipartite - the bipartite
- lverts - the number of left vertices of the bipartite.
- rverts - the number of right vertices of the bipartite.
generateEdges
protected void generateEdges(Graph bipartite,
int lverts,
int rverts,
double density,
double lowerBound,
double upperBound)
- Randomly generate the edge.
- Parameters:
- bipartite - the bipartite
- lverts - the number of left vertices of the bipartite.
- rverts - the number of right vertices of the bipartite.
- density - the probability of edge appear between vertices.
- lowerBound - the lower bound of edge weight.
- upperBound - the upper bound of edge weight.
- directed - indicate whether the bipartite directed
- selfLooped - allows the self-loop.
All Packages Class Hierarchy This Package Previous Next Index