Class ImmutableSequentialGraph

    • Constructor Detail

      • ImmutableSequentialGraph

        public ImmutableSequentialGraph()
    • Method Detail

      • successorArray

        public int[] successorArray​(int x)
        Throws an UnsupportedOperationException.
        Overrides:
        successorArray in class ImmutableGraph
        Parameters:
        x - a node.
        Returns:
        an array whose first elements are the successors of the node; the array must not be modified by the caller.
      • outdegree

        public int outdegree​(int x)
        Throws an UnsupportedOperationException.
        Specified by:
        outdegree in class ImmutableGraph
        Parameters:
        x - a node.
        Returns:
        the outdegree of the given node.
      • randomAccess

        public boolean randomAccess()
        Returns false.
        Specified by:
        randomAccess in class ImmutableGraph
        Returns:
        false.
      • nodeIterator

        public NodeIterator nodeIterator​(int from)
        Description copied from class: ImmutableGraph
        Returns a node iterator for scanning the graph sequentially, starting from the given node.
        Overrides:
        nodeIterator in class ImmutableGraph
        Parameters:
        from - the node from which the iterator will iterate.
        Returns:
        a NodeIterator for accessing nodes and successors sequentially.
      • copy

        public ImmutableGraph copy()
        Throws an UnsupportedOperationException.
        Specified by:
        copy in interface it.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
        Specified by:
        copy in class ImmutableGraph
        Returns:
        a flyweight copy of this immutable graph.
        See Also:
        FlyweightPrototype