Class DifferentialWeightedTreeProvider<N>
java.lang.Object
org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider<N>
- Type Parameters:
N
- The type of objects represented by each node in the tree
- All Implemented Interfaces:
IWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>>
public class DifferentialWeightedTreeProvider<@NonNull N>
extends Object
implements IWeightedTreeProvider<N,Object,DifferentialWeightedTree<N>>
Weighted tree provider that provides a differential weighted tree. Since any
tree can be differentiated with other trees, this class is mostly a wrapper
around the original tree provider, only the elements and trees are specific
to this class.
- Author:
- Geneviève Bastien
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider
IWeightedTreeProvider.DataType, IWeightedTreeProvider.MetricType
-
Field Summary
Fields inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider
WEIGHT_TYPE
-
Constructor Summary
ConstructorDescriptionDifferentialWeightedTreeProvider
(IWeightedTreeProvider<@NonNull N, ?, WeightedTree<@NonNull N>> originalTree, Collection<DifferentialWeightedTree<@NonNull N>> trees) ConstructorDifferentialWeightedTreeProvider
(IWeightedTreeProvider<@NonNull N, ?, WeightedTree<@NonNull N>> originalTree, DifferentialWeightedTreeSet<@NonNull N> treeSet) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetAdditionalMetric
(DifferentialWeightedTree<@NonNull N> object, int metricIndex) Get an additional metric for a tree.Get a list of additional metrics that are provided by this tree.Weighted tree providers can provide a palette of styles for the data represented.getTitle()
A title for this tree provider.Get the complete tree set provided by this object.@NonNull IWeightedTreeProvider.MetricType
Get the metric type for the weight value.void
setHeatThresholds
(int minThreshold, int maxThreshold) Set the differential threshold for this provider, ie views will highlight the gradual heat of the differential value when the value is between min and max threshold values.toDisplayString
(DifferentialWeightedTree<@NonNull N> tree) Get a user-facing text to identify a tree object.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider
getExtraDataSets, getGroupDescriptor, getSelection, getStatistics
-
Constructor Details
-
DifferentialWeightedTreeProvider
public DifferentialWeightedTreeProvider(IWeightedTreeProvider<@NonNull N, ?, WeightedTree<@NonNull N>> originalTree, Collection<DifferentialWeightedTree<@NonNull N>> trees) Constructor- Parameters:
originalTree
- The original tree provider, used to get information for texts and metrics.trees
- The differential tree
-
DifferentialWeightedTreeProvider
public DifferentialWeightedTreeProvider(IWeightedTreeProvider<@NonNull N, ?, WeightedTree<@NonNull N>> originalTree, DifferentialWeightedTreeSet<@NonNull N> treeSet) Constructor- Parameters:
originalTree
- The original tree provider, used to get information for texts and metrics.treeSet
- The differential tree set
-
-
Method Details
-
setHeatThresholds
public void setHeatThresholds(int minThreshold, int maxThreshold) Set the differential threshold for this provider, ie views will highlight the gradual heat of the differential value when the value is between min and max threshold values. If the 2 values are identical, the default palette will be used.- Parameters:
minThreshold
- Minimal threshold (in %, typically between 0 and 100) of significance for the heat (absolute value). Any percentage below this value (whether positive or negative) will be considered as equal.maxThreshold
- Maximal threshold (in %, typically between 0 and 100) of significance for the heat (absolute value). Any percentage above this value (whether positive or negative) will be considered at maximum heat.
-
getTitle
Description copied from interface:IWeightedTreeProvider
A title for this tree provider. This title will be visible by users and should describe what this tree provider's data represent.- Specified by:
getTitle
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Returns:
- The title of this provider
-
getWeightType
Description copied from interface:IWeightedTreeProvider
Get the metric type for the weight value. The default metric is called "Weight" and is a number- Specified by:
getWeightType
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Returns:
- The metric type for the weight value.
-
toDisplayString
Description copied from interface:IWeightedTreeProvider
Get a user-facing text to identify a tree object. By default, it is the string representation of the object.- Specified by:
toDisplayString
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Parameters:
tree
- The tree whose value to display- Returns:
- A user-facing string to identify this node
-
getAdditionalMetrics
Description copied from interface:IWeightedTreeProvider
Get a list of additional metrics that are provided by this tree.- Specified by:
getAdditionalMetrics
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Returns:
- A list of metrics provided by the trees, in addition to the weight
-
getAdditionalMetric
Description copied from interface:IWeightedTreeProvider
Get an additional metric for a tree. The metric index corresponds to the position of the desired metric in the list of metric returned by theIWeightedTreeProvider.getAdditionalMetrics()
method and the return value should be of the proper data type- Specified by:
getAdditionalMetric
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Parameters:
object
- The tree object for which to get the metricmetricIndex
- The index in the list of the metric metric to get- Returns:
- The value of the metric for the tree in parameter
-
getTreeSet
Description copied from interface:IWeightedTreeProvider
Get the complete tree set provided by this object.- Specified by:
getTreeSet
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Returns:
- The complete weighted tree set
-
getPalette
Description copied from interface:IWeightedTreeProvider
Weighted tree providers can provide a palette of styles for the data represented. By default, it uses a default palette of a few qualitative colors that will use the hash code of objects to assign a style- Specified by:
getPalette
in interfaceIWeightedTreeProvider<N,
Object, DifferentialWeightedTree<N>> - Returns:
- The palette for this data provider
-