Class WeightedDigraph

java.lang.Object
ghidra.util.graph.DirectedGraph
ghidra.util.graph.WeightedDigraph
Direct Known Subclasses:
SimpleWeightedDigraph

@Deprecated(forRemoval=true, since="10.2") public class WeightedDigraph extends DirectedGraph
Deprecated, for removal: This API element is subject to removal in a future version.
DirectedGraph with edge weights. Weights are assumed to be 0.0 by default.
  • Constructor Details

    • WeightedDigraph

      public WeightedDigraph(int vertexCapacity, int edgeCapacity)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create weighted directed graph with default edge weight of 0.0 and room for vertexCapicity vertices and edgeCapacity edges.
    • WeightedDigraph

      public WeightedDigraph(int vertexCapacity, int edgeCapacity, double defaultEdgeWeight)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a weighted directed graph. Use the defaultEdgeWeight for any edges whose weights have not been set.
    • WeightedDigraph

      public WeightedDigraph()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default constructor
  • Method Details

    • inDegree

      public double inDegree(Vertex v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the weighted in-degree of this vertex. The in-degree is the sum of weights of all enges entering this vertex.
      Overrides:
      inDegree in class DirectedGraph
    • outDegree

      public double outDegree(Vertex v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the weighted out-degree of this vertex. The out-degree is the sum of weights of all enges entering this vertex.
      Overrides:
      outDegree in class DirectedGraph
    • selfDegree

      public double selfDegree(Vertex v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the weighted self-degree of this vertex. The self-degree is the sum of weights of all loops at this vertex.
    • degree

      public double degree(Vertex v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the weighted degree of this vertex. The degree is the sum of weights of all edges entering and leaving this vertex.
      Overrides:
      degree in class DirectedGraph
    • getWeight

      public double getWeight(Edge e)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the weight of the specified edge.
    • setWeight

      public boolean setWeight(Edge e, double value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the weight of the specified edge.
    • getDefaultEdgeWeight

      public double getDefaultEdgeWeight()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the defaultEdgeWeight of this graph specified at creation time.
    • add

      public boolean add(Edge e)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add an edge. If successful (i.e. that edge does not already appear in the graph), set the weight to the default value
      Overrides:
      add in class DirectedGraph
      Returns:
      true if edge added succesfuly.
    • add

      public boolean add(Edge e, double weight)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Add an edge. If successful (i.e. that edge does not appear in the graph), then set the weight to the specified value.
      Returns:
      true if edge added succesfuly.
    • getEdgeWeights

      public DoubleAttribute<Edge> getEdgeWeights()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the edge weights for this graph.
    • copy

      public DirectedGraph copy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      copy in class DirectedGraph
      Returns:
      A directed graph with the same vertices, edges, and attributes.
    • intersectionWith

      public void intersectionWith(DirectedGraph otherGraph)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates intersection of graphs in place by adding all vertices and edges of other graph to this graph. This method used to return a different graph as the intersection but now does not.
      Overrides:
      intersectionWith in class DirectedGraph
    • unionWith

      public void unionWith(DirectedGraph otherGraph)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates union of graphs in place by adding all vertices and edges of other graph to this graph. This method used to return a different graph as the union but now does not.
      Overrides:
      unionWith in class DirectedGraph