Class DirectedGraphElementWeights

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<Object,Integer>
org.processmining.models.graphbased.directed.DirectedGraphElementWeights
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Integer>

public class DirectedGraphElementWeights extends HashMap<Object,Integer>
See Also:
  • Constructor Details

    • DirectedGraphElementWeights

      public DirectedGraphElementWeights()
  • Method Details

    • add

      public void add(Object nodeId, int weight)
      Add the given weight to the given object, which will typically be a node identifier.
      Parameters:
      nodeId - The node identifier
      weight - The weight to add
    • get

      public int get(Object nodeId, int defaultWeight)
      Returns the current weight of the given object, which will typically be a node identifier. Returns the given default weight if no current weight is found.
      Parameters:
      nodeId - The node identifier
      defaultWeight - The default weight
      Returns:
      The weight of the node with the given identifier
    • add

      public void add(Object sourceId, Object targetId, Object edgeId, int weight)
      Adds the given weight to the edge identified by its source identifier, target identifier, and its own identifier. Note that the combination of these three should be unique.
      Parameters:
      sourceId - The source node identifier
      targetId - The target node identifier
      edgeId - The edge identifier
      weight - The weight to add
    • get

      public int get(Object sourceId, Object targetId, Object edgeId, int defaultWeight)
      Returns the current weight of the edge identified by its source identifier, target identifier, and its own identifier. Returns the default weight if no current weight is found.
      Parameters:
      sourceId - The source node identifier
      targetId - The target node identifier
      edgeId - The edge identifier
      defaultWeight - The default weight
      Returns:
      The weight of the edge identified by its source identifier, target identifier, and its own identifier