Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.graph.impl
Class BipartiteEdge

    java.lang.Object
      edu.uci.ics.jung.utils.UserDataDelegate
          edu.uci.ics.jung.graph.impl.AbstractElement
              edu.uci.ics.jung.graph.impl.AbstractArchetypeEdge
                  edu.uci.ics.jung.graph.impl.AbstractSparseEdge
                      edu.uci.ics.jung.graph.impl.UndirectedSparseEdge
                          edu.uci.ics.jung.graph.impl.BipartiteEdge

All Implemented Interfaces:
  ArchetypeEdge, Cloneable, Edge, Element, UndirectedEdge, UserDataContainer

Direct Known Subclasses:
  BipartiteGraphCollapser.CollapsedBipartiteEdge

public class BipartiteEdge
extends UndirectedSparseEdge

A simple extension of the UndirectedSparseEdge, except with careful bounds checking. The constructor throws a FatalException if its vertices are not in two classes of a BipartiteGraph. (In fact, the Vertices must come in the order CLASSA, CLASSB).

Author:
  danyelf

Nested Class Summary

Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer
`UserDataContainer.CopyAction`

Field Summary

Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseEdge
`mFrom, mTo`

Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractElement
`id, m_Graph`

Fields inherited from class edu.uci.ics.jung.utils.UserDataDelegate
`factory, udc_delegate`

Constructor Summary
`BipartiteEdge(BipartiteVertex a, BipartiteVertex b)` The BipartiteEdge constructor.

Method Summary
`ArchetypeEdge` | `copy(ArchetypeGraph newGraph)` Creates a copy of this edge in graph `g`.

Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseEdge
`getEndpoints, getIncidentVertices, getOpposite, isIncident, numVertices, toString`

Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeEdge
`equals, getEqualEdge, getEquivalentEdge, getIncidentElements`

Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractElement
`addGraph_internal, getGraph, hashCode, initialize, removeGraph_internal`

Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate
`addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface edu.uci.ics.jung.graph.Edge
`getEndpoints, getOpposite`

Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeEdge
`getEqualEdge, getEquivalentEdge, getIncidentVertices, isIncident, numVertices`

Methods inherited from interface edu.uci.ics.jung.graph.Element
`getGraph, getIncidentElements`

Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer
`addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum`

Constructor Detail

### BipartiteEdge

    public BipartiteEdge(BipartiteVertex a,
                         BipartiteVertex b)

  The BipartiteEdge constructor.

Parameters:
  `a` - a Vertex from a BipartiteGraph in CLASSA
  `b` - a Vertex from the same BipartiteGraph in CLASSB

Method Detail

### copy

    public ArchetypeEdge copy(ArchetypeGraph newGraph)

  Description copied from interface: `ArchetypeEdge`
  Creates a copy of this edge in graph `g`. The edge created will be equivalent to this edge: given `e = this.copy(g)`, then `this.getEquivalentEdge(g) == e`, and `this.equals(e) == true`.

  Given the set of vertices S that are incident to this edge, the copied edge will be made incident to the set of vertices S' in `g` that are equivalent to S. S must be copied into `g` before this edge can be copied into `g`. If there is no such set of vertices in `g`, this method throws `IllegalArgumentException`.

  Thus, for example, given the following code:

            Graph g1 = new Graph();
            Vertex v1 = g1.addVertex(new DirectedSparseVertex());
            Vertex v2 = g1.addVertex(new DirectedSparseVertex());
            ...
            Edge e = g1.addEdge(new DirectedSparseEdge(v1, v2));
            Vertex v3 = v1.getEquivalentVertex(g2);
            Vertex v4 = v2.getEquivalentVertex(g2);

  then `e.copy(g2)` will create a directed edge connecting `v3` to `v4` in `g2`.

  Specified by:
    `copy` in interface `ArchetypeEdge`
  Overrides:
    `copy` in class `AbstractSparseEdge`
  See Also:
    `ArchetypeEdge.copy(edu.uci.ics.jung.graph.ArchetypeGraph)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD