Class NormalisedIntGraphImplQuadratic

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addEdge​(int normalisedSource, int normalisedTarget, long weight)
      Adds an edge.
      NormalisedIntGraphImplQuadratic clone()  
      boolean containsEdge​(int normalisedSource, int normalisedTarget)
      Returns whether the graph contains an edge between source and target.
      java.lang.Iterable<java.lang.Long> getEdges()
      Gives an iterable that iterates over all edges that have a weight greater than 0; The edges that are returned are indices.
      java.lang.Iterable<java.lang.Long> getEdgesOf​(int normalisedNode)
      Return an iterable of edgeIndex containing all edges of which v is a source or a target.
      int getEdgeSourceIndex​(long edgeIndex)
      Returns the vertex the edgeIndex comes from.
      int getEdgeTargetIndex​(long edgeIndex)
      Returns the index of the vertex the edgeIndex points to.
      long getEdgeWeight​(int normalisedSource, int normalisedTarget)
      Returns the weight of an edge between source and target.
      long getEdgeWeight​(long edgeIndex)
      Returns the weight of an edge.
      EdgeIterable getIncomingEdgesOf​(int normalisedNode)
      Returns an array of edge index, containing all edges of which v is the target.
      EdgeIterable getOutgoingEdgesOf​(int normalisedNode)
      Returns an array of edge index, containing all edges of which v is the source.
      long getWeightOfHeaviestEdge()
      Returns the weight of the edge with the highest weight.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NormalisedIntGraphImplQuadratic

        public NormalisedIntGraphImplQuadratic()
      • NormalisedIntGraphImplQuadratic

        public NormalisedIntGraphImplQuadratic​(int initialSize)
    • Method Detail

      • addEdge

        public void addEdge​(int normalisedSource,
                            int normalisedTarget,
                            long weight)
        Description copied from interface: NormalisedIntGraph
        Adds an edge. If the weight becomes 0, the edge is removed.
        Specified by:
        addEdge in interface NormalisedIntGraph
      • getEdges

        public java.lang.Iterable<java.lang.Long> getEdges()
        Gives an iterable that iterates over all edges that have a weight greater than 0; The edges that are returned are indices.
        Specified by:
        getEdges in interface NormalisedIntGraph
        Returns:
      • containsEdge

        public boolean containsEdge​(int normalisedSource,
                                    int normalisedTarget)
        Returns whether the graph contains an edge between source and target.
        Specified by:
        containsEdge in interface NormalisedIntGraph
        Returns:
      • getEdgeWeight

        public long getEdgeWeight​(long edgeIndex)
        Returns the weight of an edge.
        Specified by:
        getEdgeWeight in interface NormalisedIntGraph
        Parameters:
        edgeIndex -
        Returns:
      • getEdgeWeight

        public long getEdgeWeight​(int normalisedSource,
                                  int normalisedTarget)
        Description copied from interface: NormalisedIntGraph
        Returns the weight of an edge between source and target.
        Specified by:
        getEdgeWeight in interface NormalisedIntGraph
        Returns:
      • getIncomingEdgesOf

        public EdgeIterable getIncomingEdgesOf​(int normalisedNode)
        Description copied from interface: NormalisedIntGraph
        Returns an array of edge index, containing all edges of which v is the target. Notice that the edge weight might be 0.
        Specified by:
        getIncomingEdgesOf in interface NormalisedIntGraph
        Returns:
      • getOutgoingEdgesOf

        public EdgeIterable getOutgoingEdgesOf​(int normalisedNode)
        Description copied from interface: NormalisedIntGraph
        Returns an array of edge index, containing all edges of which v is the source. Notice that the edge weight might be 0.
        Specified by:
        getOutgoingEdgesOf in interface NormalisedIntGraph
        Returns:
      • getEdgesOf

        public java.lang.Iterable<java.lang.Long> getEdgesOf​(int normalisedNode)
        Description copied from interface: NormalisedIntGraph
        Return an iterable of edgeIndex containing all edges of which v is a source or a target. Notice that the edge weight might be 0.
        Specified by:
        getEdgesOf in interface NormalisedIntGraph
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object