Class SparseNumberedLabeledEdgeManager<T,​U>

    • Constructor Detail

      • SparseNumberedLabeledEdgeManager

        public SparseNumberedLabeledEdgeManager​(NumberedNodeManager<T> nodeManager,
                                                U defaultLabel)
    • Method Detail

      • getPredNodes

        public java.util.Iterator<T> getPredNodes​(T N,
                                                  U label)
        Description copied from interface: LabeledEdgeManager
        Return an Iterator over the immediate predecessor nodes of this Node in the Graph on edges with some label. This method never returns null.
        Specified by:
        getPredNodes in interface LabeledEdgeManager<T,​U>
        Returns:
        an Iterator over the immediate predecessor nodes of this Node.
      • getSuccNodes

        public java.util.Iterator<? extends T> getSuccNodes​(T N,
                                                            U label)
        Description copied from interface: LabeledEdgeManager
        Return an Iterator over the immediate successor nodes of this Node in the Graph on edges with some label.

        This method never returns null.

        Specified by:
        getSuccNodes in interface LabeledEdgeManager<T,​U>
        Returns:
        an Iterator over the immediate successor Nodes of this Node.
      • removeEdge

        public void removeEdge​(T src,
                               T dst,
                               U label)
                        throws java.lang.IllegalArgumentException
        Specified by:
        removeEdge in interface LabeledEdgeManager<T,​U>
        Throws:
        java.lang.IllegalArgumentException
      • removeIncomingEdges

        public void removeIncomingEdges​(T node)
                                 throws java.lang.IllegalArgumentException
        Specified by:
        removeIncomingEdges in interface EdgeManager<T>
        Throws:
        java.lang.IllegalArgumentException
      • removeOutgoingEdges

        public void removeOutgoingEdges​(T node)
                                 throws java.lang.IllegalArgumentException
        Specified by:
        removeOutgoingEdges in interface EdgeManager<T>
        Throws:
        java.lang.IllegalArgumentException
      • getPredLabels

        public java.util.Iterator<? extends U> getPredLabels​(T N)
        Specified by:
        getPredLabels in interface LabeledEdgeManager<T,​U>
        Returns:
        the labels on edges whose destination is N
      • getSuccLabels

        public java.util.Iterator<? extends U> getSuccLabels​(T N)
        Specified by:
        getSuccLabels in interface LabeledEdgeManager<T,​U>
        Returns:
        the labels on edges whose source is N
      • getEdgeLabels

        public java.util.Set<? extends U> getEdgeLabels​(T src,
                                                        T dst)
        Description copied from interface: LabeledEdgeManager
        Returns a set of all labeled edges between node src and node dst
        Specified by:
        getEdgeLabels in interface LabeledEdgeManager<T,​U>
        Parameters:
        src - source node of the edge
        dst - target node of the edge
        Returns:
        Set of edge labels
      • getPredNodes

        public java.util.Iterator<T> getPredNodes​(T N)
        Description copied from interface: EdgeManager
        Return an Iterator over the immediate predecessor nodes of n This method never returns null.
        Specified by:
        getPredNodes in interface EdgeManager<T>
        Returns:
        an Iterator over the immediate predecessor nodes of this Node.
      • getSuccNodeCount

        public int getSuccNodeCount​(T N)
        Description copied from interface: EdgeManager
        Return the number of immediate successor nodes of this Node in the Graph
        Specified by:
        getSuccNodeCount in interface EdgeManager<T>
        Returns:
        the number of immediate successor Nodes of this Node in the Graph.
      • getSuccNodes

        public java.util.Iterator<T> getSuccNodes​(T N)
        Description copied from interface: EdgeManager
        Return an Iterator over the immediate successor nodes of n

        This method never returns null.

        Specified by:
        getSuccNodes in interface EdgeManager<T>
        Returns:
        an Iterator over the immediate successor nodes of n
      • hasEdge

        public boolean hasEdge​(T src,
                               T dst)
        Specified by:
        hasEdge in interface EdgeManager<T>
      • removeEdge

        public void removeEdge​(T src,
                               T dst)
                        throws java.lang.UnsupportedOperationException
        Specified by:
        removeEdge in interface EdgeManager<T>
        Throws:
        java.lang.UnsupportedOperationException
      • getDefaultLabel

        public U getDefaultLabel()
        Description copied from interface: LabeledEdgeManager
        Sets the default object used as label for operations where no specific edge label is provided. This is due to compatibility with the EdgeManager interface
        Specified by:
        getDefaultLabel in interface LabeledEdgeManager<T,​U>