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>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given weight to the given object, which will typically be a node identifier.void
Adds the given weight to the edge identified by its source identifier, target identifier, and its own identifier.int
Returns the current weight of the given object, which will typically be a node identifier.int
Returns the current weight of the edge identified by its source identifier, target identifier, and its own identifier.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
DirectedGraphElementWeights
public DirectedGraphElementWeights()
-
-
Method Details
-
add
Add the given weight to the given object, which will typically be a node identifier.- Parameters:
nodeId
- The node identifierweight
- The weight to add
-
get
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 identifierdefaultWeight
- The default weight- Returns:
- The weight of the node with the given identifier
-
add
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 identifiertargetId
- The target node identifieredgeId
- The edge identifierweight
- The weight to add
-
get
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 identifiertargetId
- The target node identifieredgeId
- The edge identifierdefaultWeight
- The default weight- Returns:
- The weight of the edge identified by its source identifier, target identifier, and its own identifier
-