Class DifferentialWeightedTree<T>
java.lang.Object
org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree<@NonNull T>
org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree<T>
- Type Parameters:
T
- The type of object this tree uses
- All Implemented Interfaces:
Comparable<WeightedTree<T>>
A class that represents a differential weighted tree. The weight is the base
weight of one of the differentiated tree[set] and a differencial value is
used to represent how it differs with the weight value of another tree.
- Author:
- Geneviève Bastien
-
Constructor Summary
ConstructorDescriptionDifferentialWeightedTree
(WeightedTree<@NonNull T> originalTree, @NonNull T object, long initialWeight, double diffWeight) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the differential value for this object.WeightedTree<@NonNull T>
Get the base tree from which this differential weighted tree was computedMethods inherited from class org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree
addChild, addToWeight, compareTo, copyOf, getChildren, getExtraDataTrees, getMaxDepth, getObject, getStatistics, getWeight, merge, toString
-
Constructor Details
-
DifferentialWeightedTree
public DifferentialWeightedTree(WeightedTree<@NonNull T> originalTree, @NonNull T object, long initialWeight, double diffWeight) Constructor- Parameters:
originalTree
- The base tree from which this differential tree was computed. Used for additional metrics and texts.object
- The object this tree is linked toinitialWeight
- The initial weight of this treediffWeight
- The differential weight with the base
-
-
Method Details
-
getDifference
public double getDifference()Get the differential value for this object. This value is the relative difference between the value of a first tree and the second tree compared. A positive value means the object's value is superior than the previous value. Conversely a negative difference means the second value is inferior to the initial value. 0 means there was no difference. It can also beDouble.NaN
if the value did not exist before- Returns:
- The differential value
-
getOriginalTree
Get the base tree from which this differential weighted tree was computed- Returns:
- The original base tree
-