Class Histogram
Base histogram to be used by typed histogram generic derived classes. The histogram holds a dictionary of integer counts for each measurement keys (with number of keys correspondent to the number of dimensions in the histogram).
Inheritance
System.Object
Histogram
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)
Namespace: Azos.Instrumentation.Analytics
Assembly: Azos.dll
Syntax
public abstract class Histogram : IHistogram, IEnumerable<HistogramEntry>, IEnumerable
Constructors
Histogram(String, Int32, Int32)
Declaration
protected Histogram(string title, int dimCount, int approxCapacity)
Parameters
Type | Name | Description |
---|---|---|
System.String | title | |
System.Int32 | dimCount | |
System.Int32 | approxCapacity |
Fields
m_Data
Declaration
protected HistData m_Data
Field Value
Type | Description |
---|---|
HistData |
m_Title
Declaration
protected string m_Title
Field Value
Type | Description |
---|---|
System.String |
m_TotalSamples
Declaration
protected long m_TotalSamples
Field Value
Type | Description |
---|---|
System.Int64 |
Properties
DimensionCount
Number of dimensions in this histogram
Declaration
public abstract int DimensionCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Dimensions
Returns the dimension instances of this histogram
Declaration
public abstract IEnumerable<Dimension> Dimensions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Dimension> |
Item[HistogramKeys]
Return the count of samples for the given histogram keys
Declaration
public int this[HistogramKeys keys] { get; }
Parameters
Type | Name | Description |
---|---|---|
HistogramKeys | keys |
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Declaration
protected Dimension this[int dimIndex] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dimIndex |
Property Value
Type | Description |
---|---|
Dimension |
Title
Histogram title used for displaying purposes
Declaration
public virtual string Title { get; }
Property Value
Type | Description |
---|---|
System.String |
TotalSamples
Total number of samples in the histogram
Declaration
public long TotalSamples { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
Clear()
Reset histogram state
Declaration
public virtual void Clear()
GetDimention(Int32)
Return a dimension of a histogram identified by index
Declaration
public Dimension GetDimention(int dimension)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dimension |
Returns
Type | Description |
---|---|
Dimension |
GetEnumerator()
Declaration
public IEnumerator<HistogramEntry> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<HistogramEntry> |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
GetPartitionName(Int32, Int32)
Returns the name of a partition in a given histogram dimension
Declaration
public string GetPartitionName(int dimension, int partition)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dimension | Dimension index |
System.Int32 | partition | Partition index |
Returns
Type | Description |
---|---|
System.String |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
TryGet(HistogramKeys, out Int32)
Try to get the count of samples for the given histogram keys
Declaration
public bool TryGet(HistogramKeys keys, out int count)
Parameters
Type | Name | Description |
---|---|---|
HistogramKeys | keys | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Boolean |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable