Class Histogram<TData1, TData2, TData3>
Three-dimensional histogram for storing number of samples for given
dimension keys
Inheritance
System.Object
Histogram<TData1, TData2, TData3>
Implements
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
public class Histogram<TData1, TData2, TData3> : Histogram, IHistogram, IEnumerable<HistogramEntry>, IEnumerable
Type Parameters
Name |
Description |
TData1 |
|
TData2 |
|
TData3 |
|
Constructors
Histogram(String, Dimension<TData1>, Dimension<TData2>, Dimension<TData3>)
Constructs a histogram from a given array of dimensions
Declaration
public Histogram(string title, Dimension<TData1> dimension1, Dimension<TData2> dimension2, Dimension<TData3> dimension3)
Parameters
Type |
Name |
Description |
System.String |
title |
Histogram title used for displaying result
|
Dimension<TData1> |
dimension1 |
Dimension of the 1st histogram dimension
|
Dimension<TData2> |
dimension2 |
Dimension of the 2nd histogram dimension
|
Dimension<TData3> |
dimension3 |
Dimension of the 3nd histogram dimension
|
Fields
m_Dimension1
Declaration
protected Dimension<TData1> m_Dimension1
Field Value
m_Dimension2
Declaration
protected Dimension<TData2> m_Dimension2
Field Value
m_Dimension3
Declaration
protected Dimension<TData3> m_Dimension3
Field Value
Properties
DimensionCount
Number of dimensions in this histogram
Declaration
public override int DimensionCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Dimensions
Declaration
public override IEnumerable<Dimension> Dimensions { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<Dimension> |
|
Overrides
Item[Int32, Int32, Int32]
Return the sample count associated with given histogram keys
Declaration
public int this[int k1, int k2, int k3] { get; }
Parameters
Type |
Name |
Description |
System.Int32 |
k1 |
|
System.Int32 |
k2 |
|
System.Int32 |
k3 |
|
Property Value
Type |
Description |
System.Int32 |
|
Methods
Keys(TData1, TData2, TData3)
Convert values to HistogramKeys struct
Declaration
public HistogramKeys Keys(TData1 value1, TData2 value2, TData3 value3)
Parameters
Type |
Name |
Description |
TData1 |
value1 |
|
TData2 |
value2 |
|
TData3 |
value3 |
|
Returns
Sample(TData1, TData2, TData3)
Increment histogram statistics for a given triplet of dimension values
Declaration
public virtual void Sample(TData1 value1, TData2 value2, TData3 value3)
Parameters
Type |
Name |
Description |
TData1 |
value1 |
|
TData2 |
value2 |
|
TData3 |
value3 |
|
TryGet(Int32, Int32, Int32, out Int32)
Try to get the sample count associated with the given histogram keys.
If the keys are not present in the histogram dictionary return false
Declaration
public bool TryGet(int k1, int k2, int k3, out int count)
Parameters
Type |
Name |
Description |
System.Int32 |
k1 |
|
System.Int32 |
k2 |
|
System.Int32 |
k3 |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.Boolean |
|
Value(TData1, TData2, TData3)
Returns number of samples collected for a given key.
The key is obtained by mapping the given values into the dimensions' partitions.
Return value of 0 indicates that key is not present in the histogram
Declaration
public int Value(TData1 value1, TData2 value2, TData3 value3)
Parameters
Type |
Name |
Description |
TData1 |
value1 |
|
TData2 |
value2 |
|
TData3 |
value3 |
|
Returns
Type |
Description |
System.Int32 |
|
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Extension Methods