public class SpanToolkit extends Object
Combinable
and
Combiner
) to form the largest time span where the combined value is still deemed to be
over some threshold. Threshold can be either a defined limit or a calculated density.
Currently, it's up to the caller of this toolkit to call the methods with a subset of items that have only one item iterable, which means that events should not overlap in time.
Constructor and Description |
---|
SpanToolkit() |
Modifier and Type | Method and Description |
---|---|
static SpanSquare |
getMaxCountCluster(IItemCollection items,
IAttribute<IQuantity> countAttribute,
IAttribute<IQuantity> timestampAttribute)
Calculates the largest count cluster.
|
static SpanSquare |
getMaxDurationCluster(IItemCollection items)
Calculates the largest duration cluster.
|
static SpanLimit |
getMaxSpanLimit(IItemCollection items,
IAttribute<IQuantity> valueAttribute,
IAttribute<IQuantity> endTimeAttribute,
double limit)
Calculates the longest span where the combined value still is above the limit.
|
public static SpanSquare getMaxCountCluster(IItemCollection items, IAttribute<IQuantity> countAttribute, IAttribute<IQuantity> timestampAttribute)
items
- the item collectioncountAttribute
- the attribute to get count value from, is assumed to be an accumulative value, for
example exception statisticstimestampAttribute
- the attribute to get a time stamp frompublic static SpanSquare getMaxDurationCluster(IItemCollection items)
items
- the item collectionpublic static SpanLimit getMaxSpanLimit(IItemCollection items, IAttribute<IQuantity> valueAttribute, IAttribute<IQuantity> endTimeAttribute, double limit)
items
- the item collectionvalueAttribute
- the value attributeendTimeAttribute
- the end time attributelimit
- the min limitCopyright © 2019. All rights reserved.