Package ghidra.util.graph

# 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 Summary

  Constructors
  Constructor
  Description
  `WeightedDigraph()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Default constructor
  `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(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.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `add(Edge e)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Add an edge.
  `boolean`
  `add(Edge e, double weight)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Add an edge.
  `DirectedGraph`
  `copy()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  `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.
  `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.
  `DoubleAttribute<Edge>`
  `getEdgeWeights()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  Get the edge weights for this graph.
  `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.
  `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.
  `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.
  `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.
  `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.
  `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.
  `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.

  ### Methods inherited from class ghidra.util.graph.DirectedGraph

  `add, areRelatedAs, assignVerticesToStrongComponents, clear, complexityDepth, contains, contains, containsAsSubgraph, copyAll, copyEdge, copyEdgeAttributeValues, copyVertex, copyVertexAttributeValues, descendantsGraph, edgeAttributes, edgeIterator, edges, getAncestors, getChildren, getChildren, getComponentContaining, getComponents, getDescendants, getDescendants, getEdgeArray, getEdgeAttribute, getEdgeProperty, getEdges, getEdges, getEdgeWithKey, getEntryPoints, getIncomingEdges, getLevels, getNeighborhood, getNeighborhood, getOutgoingEdges, getParents, getParents, getReferent, getSinks, getSources, getVertexArray, getVertexAttribute, getVertexProperty, getVertexWithKey, getVertices, getVerticesHavingReferent, getVerticesInContainingComponent, incomingEdges, inducedSubgraph, inValence, join, loopDegree, numEdges, numLoops, numSinks, numSources, numVertices, outgoingEdges, outValence, remove, remove, selfEdges, setEdgeProperty, setVertexProperty, valence, vertexAttributes, vertexIterator, vertices, verticesUnreachableFromSources, verts2referentSet`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`