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.

Version:
0.4 Jul 8, 1999
Author:
Ding-Yi Chen
See Also:
Graph

Constructor Index

 o BipartiteRandomizer(Dimension)
Constructor of GraphRandomizer.

Method Index

 o generate(int, int)
Generate a randomized bipartite.
 o generate(int, int, double)
Generate a randomized bipartite.
 o generate(int, int, double, double, double)
Generate a randomized bipartite.
 o generate(int, int, double, double, double, boolean)
Generate a randomized bipartite.
 o generateEdges(Graph, int, int, double, double, double)
Randomly generate the edge.
 o generateVertices(Graph, int, int)
Place the vertices.

Constructors

 o BipartiteRandomizer
 public BipartiteRandomizer(Dimension d)
Constructor of GraphRandomizer.

Parameters:
d - the size of the canvas which bipartites be drawn on.

Methods

 o 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
 o 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
 o 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
 o 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
 o 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.
 o 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