Documentation of 'edu.uci.ics.jung.graph.OrderedSparseMultigraph' Java class
OrderedSparseMultigraph
edu.uci.ics.jung.graph

Class OrderedSparseMultigraph<V,E>

  • All Implemented Interfaces:
    Graph<V,E>, Hypergraph<V,E>, MultiGraph<V,E>, java.io.Serializable
    Direct Known Subclasses:
    SortedSparseMultigraph


    public class OrderedSparseMultigraph<V,E>
    extends SparseMultigraph<V,E>
    implements MultiGraph<V,E>
    An implementation of Graph that orders its vertex and edge collections according to insertion time, is suitable for sparse graphs, and permits directed, undirected, and parallel edges.
    See Also:
    Serialized Form
    • Constructor Detail

      • OrderedSparseMultigraph

        public OrderedSparseMultigraph()
        Creates a new instance.
    • Method Detail

      • getFactory

        public static <V,E> com.google.common.base.Supplier<Graph<V,E>> getFactory()
        Type Parameters:
        V - the vertex type for the graph Supplier
        E - the edge type for the graph Supplier
        Returns:
        a Supplier that creates an instance of this graph type.
      • addVertex

        public boolean addVertex(V vertex)
        Description copied from interface: Hypergraph
        Adds vertex to this graph. Fails if vertex is null or already in the graph.
        Specified by:
        addVertex in interface Hypergraph<V,E>
        Overrides:
        addVertex in class SparseMultigraph<V,E>
        Parameters:
        vertex - the vertex to add
        Returns:
        true if the add is successful, and false otherwise
      • getPredecessors

        public java.util.Collection<V> getPredecessors(V vertex)
        Description copied from interface: Graph
        Returns a Collection view of the predecessors of vertex in this graph. A predecessor of vertex is defined as a vertex v which is connected to vertex by an edge e, where e is an outgoing edge of v and an incoming edge of vertex.
        Specified by:
        getPredecessors in interface Graph<V,E>
        Specified by:
        getPredecessors in interface Hypergraph<V,E>
        Overrides:
        getPredecessors in class SparseMultigraph<V,E>
        Parameters:
        vertex - the vertex whose predecessors are to be returned
        Returns:
        a Collection view of the predecessors of vertex in this graph
      • getSuccessors

        public java.util.Collection<V> getSuccessors(V vertex)
        Description copied from interface: Graph
        Returns a Collection view of the successors of vertex in this graph. A successor of vertex is defined as a vertex v which is connected to vertex by an edge e, where e is an incoming edge of v and an outgoing edge of vertex.
        Specified by:
        getSuccessors in interface Graph<V,E>
        Specified by:
        getSuccessors in interface Hypergraph<V,E>
        Overrides:
        getSuccessors in class SparseMultigraph<V,E>
        Parameters:
        vertex - the vertex whose predecessors are to be returned
        Returns:
        a Collection view of the successors of vertex in this graph
      • getNeighbors

        public java.util.Collection<V> getNeighbors(V vertex)
        Description copied from interface: Hypergraph
        Returns the collection of vertices which are connected to vertex via any edges in this graph. If vertex is connected to itself with a self-loop, then it will be included in the collection returned.
        Specified by:
        getNeighbors in interface Hypergraph<V,E>
        Overrides:
        getNeighbors in class SparseMultigraph<V,E>
        Parameters:
        vertex - the vertex whose neighbors are to be returned
        Returns:
        the collection of vertices which are connected to vertex, or null if vertex is not present
      • getIncidentEdges

        public java.util.Collection<E> getIncidentEdges(V vertex)
        Description copied from interface: Hypergraph
        Returns the collection of edges in this graph which are connected to vertex.
        Specified by:
        getIncidentEdges in interface Hypergraph<V,E>
        Overrides:
        getIncidentEdges in class SparseMultigraph<V,E>
        Parameters:
        vertex - the vertex whose incident edges are to be returned
        Returns:
        the collection of edges which are connected to vertex, or null if vertex is not present

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.