Interface NormalisedIntGraph

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addEdge​(int normalisedSource, int normalisedTarget, long weight)
      Adds an edge.
      NormalisedIntGraph 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; 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.
      java.lang.Iterable<java.lang.Long> getIncomingEdgesOf​(int normalisedNode)
      Returns an array of edge index, containing all edges of which v is the target.
      java.lang.Iterable<java.lang.Long> 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.
    • Method Detail

      • addEdge

        void addEdge​(int normalisedSource,
                     int normalisedTarget,
                     long weight)
        Adds an edge. If the weight becomes 0, the edge is removed.
        Parameters:
        normalisedSource -
        normalisedTarget -
        weight -
      • getEdges

        java.lang.Iterable<java.lang.Long> getEdges()
        Gives an iterable that iterates over all edges; The edges that are returned are indices. Notice that the edge weight might NOT be 0.
        Returns:
      • containsEdge

        boolean containsEdge​(int normalisedSource,
                             int normalisedTarget)
        Returns whether the graph contains an edge between source and target.
        Returns:
      • getEdgeSourceIndex

        int getEdgeSourceIndex​(long edgeIndex)
        Returns the vertex the edgeIndex comes from.
        Parameters:
        edgeIndex -
        Returns:
      • getEdgeTargetIndex

        int getEdgeTargetIndex​(long edgeIndex)
        Returns the index of the vertex the edgeIndex points to.
        Parameters:
        edgeIndex -
        Returns:
      • getEdgeWeight

        long getEdgeWeight​(int normalisedSource,
                           int normalisedTarget)
        Returns the weight of an edge between source and target.
        Parameters:
        normalisedSource -
        normalisedTarget -
        Returns:
      • getIncomingEdgesOf

        java.lang.Iterable<java.lang.Long> getIncomingEdgesOf​(int normalisedNode)
        Returns an array of edge index, containing all edges of which v is the target. Notice that the edge weight might be 0.
        Parameters:
        normalisedNode -
        Returns:
      • getOutgoingEdgesOf

        java.lang.Iterable<java.lang.Long> getOutgoingEdgesOf​(int normalisedNode)
        Returns an array of edge index, containing all edges of which v is the source. Notice that the edge weight might be 0.
        Parameters:
        normalisedNode -
        Returns:
      • getEdgesOf

        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. Notice that the edge weight might be 0.
        Parameters:
        normalisedNode -
        Returns:
      • getWeightOfHeaviestEdge

        long getWeightOfHeaviestEdge()
        Returns the weight of the edge with the highest weight.
        Returns:
      • getEdgeWeight

        long getEdgeWeight​(long edgeIndex)
        Returns the weight of an edge.
        Parameters:
        edgeIndex -
        Returns: