Class IntGraphImplQuadratic

  • All Implemented Interfaces:
    java.lang.Cloneable, IntGraph

    public class IntGraphImplQuadratic
    extends java.lang.Object
    implements IntGraph
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addEdge​(int source, int target, long weight)
      Adds an edge.
      void addNode​(int node)
      Adds a node to the graph.
      IntGraphImplQuadratic clone()  
      boolean containsEdge​(int source, int target)
      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 larger than 0; The edges that are returned are indices.
      java.lang.Iterable<java.lang.Long> getEdgesOf​(int node)
      Return an iterable of edgeIndex containing all edges of which v is a source or a target.
      int getEdgeSource​(long edgeIndex)
      Returns the node the edgeIndex comes from.
      int getEdgeSourceIndex​(long edgeIndex)  
      int getEdgeTarget​(long edgeIndex)
      Returns the node the edgeIndex points to.
      int getEdgeTargetIndex​(long edgeIndex)
      Returns the index of the node the edgeIndex points to.
      long getEdgeWeight​(int source, int target)
      Returns the weight of an edge between source and target.
      long getEdgeWeight​(long edgeIndex)
      Returns the weight of an edge.
      org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getIncomingEdgesOf​(int node)
      Returns an array of edge index, containing all edges of which v is the target.
      org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getIncomingEdgesOfIndex​(int index)  
      int getNodeOfIndex​(int index)
      The graph keeps an index of nodes.
      int[] getNodes()  
      int getNumberOfNodes()  
      org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getOutgoingEdgesOf​(int node)
      Returns an array of edge index, containing all edges of which v is the source.
      org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getOutgoingEdgesOfIndex​(int index)  
      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

      • IntGraphImplQuadratic

        public IntGraphImplQuadratic()
      • IntGraphImplQuadratic

        public IntGraphImplQuadratic​(int initialSize)
    • Method Detail

      • addEdge

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

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

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

        public int getEdgeSource​(long edgeIndex)
        Description copied from interface: IntGraph
        Returns the node the edgeIndex comes from.
        Specified by:
        getEdgeSource in interface IntGraph
        Returns:
      • getEdgeTarget

        public int getEdgeTarget​(long edgeIndex)
        Description copied from interface: IntGraph
        Returns the node the edgeIndex points to.
        Specified by:
        getEdgeTarget in interface IntGraph
        Returns:
      • getEdgeTargetIndex

        public int getEdgeTargetIndex​(long edgeIndex)
        Description copied from interface: IntGraph
        Returns the index of the node the edgeIndex points to.
        Specified by:
        getEdgeTargetIndex in interface IntGraph
        Returns:
      • getEdgeWeight

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

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

        public org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getIncomingEdgesOf​(int node)
        Description copied from interface: IntGraph
        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 IntGraph
        Returns:
      • getIncomingEdgesOfIndex

        public org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getIncomingEdgesOfIndex​(int index)
        Specified by:
        getIncomingEdgesOfIndex in interface IntGraph
      • getOutgoingEdgesOf

        public org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getOutgoingEdgesOf​(int node)
        Description copied from interface: IntGraph
        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 IntGraph
        Returns:
      • getOutgoingEdgesOfIndex

        public org.processmining.plugins.InductiveMiner.graphs.EdgeIterable getOutgoingEdgesOfIndex​(int index)
        Specified by:
        getOutgoingEdgesOfIndex in interface IntGraph
      • getEdgesOf

        public java.lang.Iterable<java.lang.Long> getEdgesOf​(int node)
        Description copied from interface: IntGraph
        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 IntGraph
        Returns:
      • getWeightOfHeaviestEdge

        public long getWeightOfHeaviestEdge()
        Returns the weight of the edge with the highest weight.
        Specified by:
        getWeightOfHeaviestEdge in interface IntGraph
        Returns:
      • addNode

        public void addNode​(int node)
        Description copied from interface: IntGraph
        Adds a node to the graph. Has no effect if the node was already present.
        Specified by:
        addNode in interface IntGraph
      • getNodes

        public int[] getNodes()
        Specified by:
        getNodes in interface IntGraph
        Returns:
        an array of the vertices in the graph.
      • getNodeOfIndex

        public int getNodeOfIndex​(int index)
        Description copied from interface: IntGraph
        The graph keeps an index of nodes. With this function, you can look up these indices.
        Specified by:
        getNodeOfIndex in interface IntGraph
        Returns:
      • toString

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