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

public class DifferentialWeightedTree<@NonNull T> extends WeightedTree<@NonNull 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 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 to
      initialWeight - The initial weight of this tree
      diffWeight - 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 be Double.NaN if the value did not exist before
      Returns:
      The differential value
    • getOriginalTree

      public WeightedTree<@NonNull T> getOriginalTree()
      Get the base tree from which this differential weighted tree was computed
      Returns:
      The original base tree