Class DifferentialWeightedTreeSet<N>
java.lang.Object
org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet<N>
- Type Parameters:
N
- The type of objects represented by each node in the tree
- All Implemented Interfaces:
IWeightedTreeSet<N,
Object, DifferentialWeightedTree<N>>
public class DifferentialWeightedTreeSet<@NonNull N>
extends Object
implements IWeightedTreeSet<N,Object,DifferentialWeightedTree<N>>
A treeset for differential weighted trees.
- Author:
- Geneviève Bastien
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addWeightedTree
(Object dstGroup, DifferentialWeightedTree<@NonNull N> tree) Add a weighted tree for an element in this set.static <@NonNull N>
DifferentialWeightedTreeSet<@NonNull N>create
(Collection<DifferentialWeightedTree<@NonNull N>> trees) Create a differential weighted tree set containing a unique default element and the trees in parameters.Get the elements under which are the weighted trees.Collection<@NonNull DifferentialWeightedTree<N>>
getTreesFor
(Object element) Get the weighted trees for a given elementMethods 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.IWeightedTreeSet
getExtraDataSets, getTreesForNamed
-
Constructor Details
-
DifferentialWeightedTreeSet
public DifferentialWeightedTreeSet()Default constructor. The elements and their trees should be added by callingaddWeightedTree(Object, DifferentialWeightedTree)
-
-
Method Details
-
create
public static <@NonNull N> DifferentialWeightedTreeSet<@NonNull N> create(Collection<DifferentialWeightedTree<@NonNull N>> trees) Create a differential weighted tree set containing a unique default element and the trees in parameters.- Type Parameters:
N
- The type of objects represented by each node in the tree- Parameters:
trees
- The differential weighted trees for the single element- Returns:
- The differential flame graph with a default element containing the trees in parameter
-
getElements
Description copied from interface:IWeightedTreeSet
Get the elements under which are the weighted trees. It can be a single constant element if this treeset does not have the concept of grouping the trees.- Specified by:
getElements
in interfaceIWeightedTreeSet<N,
Object, DifferentialWeightedTree<N>> - Returns:
- The elements used to group the trees
-
getTreesFor
Description copied from interface:IWeightedTreeSet
Get the weighted trees for a given element- Specified by:
getTreesFor
in interfaceIWeightedTreeSet<N,
Object, DifferentialWeightedTree<N>> - Parameters:
element
- The element for which to get the trees- Returns:
- A collection of weighted trees for the requested element
-
addWeightedTree
Add a weighted tree for an element in this set. If a tree for the same object already exists, their data will be merged.- Parameters:
dstGroup
- The group to which to add this treetree
- The weighted tree to add to this set. This tree may be modified and merged with others, so it should not be a tree that is part of another tree (for groupings or diff or other operations for instance)
-