|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.transformation.KPartiteFolder
Field Summary | |
static java.lang.String |
FOLDED_DATA
Used in fold() as a user data key to the data attached to
the edges in the folded graph. |
Constructor Summary | |
KPartiteFolder(boolean parallel)
Creates an instance of this Folder. |
Method Summary | |
Graph |
fold(KPartiteGraph g,
org.apache.commons.collections.Predicate p)
Converts g into a unipartite graph whose vertex set is the
vertices whose partition is specified by p . |
void |
setParallel(boolean parallel)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FOLDED_DATA
fold()
as a user data key to the data attached to
the edges in the folded graph.
Constructor Detail |
public KPartiteFolder(boolean parallel)
Method Detail |
public void setParallel(boolean parallel)
public Graph fold(KPartiteGraph g, org.apache.commons.collections.Predicate p)
Converts g
into a unipartite graph whose vertex set is the
vertices whose partition is specified by p
. For vertices
a
and b
in this partition, the resultant
graph will include the edge (a,b)
if the original graph
contains edges (a,c)
and (c,b)
for at least
one vertex c
.
If parallel
is true, then each such connecting vertex
c
will be represented by a single edge in the resultant
graph, and the resultant graph may therefore contain parallel edges.
Otherwise, each edge (a,b)
in the resultant graph will be
annotated with the set of vertices c
that connected
a
to b
in the original graph, and the
graph's edge requirements will be set to refuse parallel edges.
In either case, if there is an edge from (a) to (b), and a distinct edge from (b) to (a), then a self
If g
is neither strictly directed nor strictly undirected,
or allows parallel edges, this method throws
IllegalArgumentException
.
g
- the graph to convertp
- the predicate which specifies the partition to fold into
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |