Helper class for quickly collecting statistic samples (i.e. 64-bit floating-point numbers) and computing simple statistic values from them.
sealed class
|
StatisticSamples
|
extends
|
DequeBase<float64>
|
The number of elements in this collection.
public
override
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of elements. | |
implements
|
BagConstBase.Count
|
Returns the deviation of the collected samples.
public
property
|
Deviation
{
get
}
|
||
type
|
float64
|
||
value
|
The deviation. |
Returns a Gauss curve that resembles the distribution of the collected samples.
public
property
|
Gauss
{
get
}
|
||
type
|
Gauss
|
||
value
|
The Gauss curve. |
Returns the maximum value of the collected samples.
public
property
|
Maximum
{
get
}
|
||
type
|
float64
|
||
value
|
The maximum value. |
Returns the mean value of the collected samples.
public
property
|
Mean
{
get
}
|
||
type
|
float64
|
||
value
|
The mean value. |
Returns the minimum value of the collected samples.
public
property
|
Minimum
{
get
}
|
||
type
|
float64
|
||
value
|
The minimum value. |
Returns the variance of the collected samples.
public
property
|
Variance
{
get
}
|
||
type
|
float64
|
||
value
|
The variance. |
Creates a new instance of StatisticSamples.
public
constructor
|
StatisticSamples
()
|
Adds the given element to this collection.
public
method
|
Add
(T element)
|
||
type
|
bool
|
||
params
|
element
|
The element to add. | |
returns
|
true
if
the
collection
has
changed,
false
if
not. |
||
inherited
|
DequeBase.Add
|
Remarks:
Implementing
methods
shall
return
false
iff
the
element
has
already
been
collected,
i.e.
it
is
contained
in
the
collection.
If
in
doubt,
return
true
.
Adds a value.
public
method
|
Add
(float64 element,
int32 maxCount = Maths.MaxInt)
|
||
params
|
element
|
The value to add. | |
maxCount
|
[>0]
|
The maximum number of values to keep (including element). Defaults to MaxInt. |
Removes all elements from the queue.
public
override
method
|
Clear
()
|
||
overrides
|
DequeBase.Clear
|
Returns if this collection contains the given element.
[Pure]
|
||||
public
override
method
|
Contains
(T element)
|
|||
type
|
bool
|
|||
params
|
element
|
The element. | ||
returns
|
true
if
element
is
contained
in
this
collection,
false
if
not.
|
|||
inherited
|
VectorConstBase.Contains
|
Returns if this collection contains all given elements.
public
method
|
ContainsAll
(IEnumerable<T> elements)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements. |
returns
|
true
if
all
elements
are
contained
in
this
collection,
false
if
not.
|
||
inherited
|
BagConstBase.ContainsAll
|
Compares this object with the given one.
[Pure]
|
||||
public
method
|
Equals
(IVectorConst<T> other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
inherited
|
VectorConstBase.Equals
|
Returns the first enumerated value.
[Pure]
|
||||
public
override
method
|
First
()
|
|||
type
|
T
|
|||
returns
|
The first enumerated value. | |||
inherited
|
VectorConstBase.First
|
Exceptions:
Returns the element at the given list index.
[Pure]
|
||||
public
override
method
|
GetAt
(int32 index)
|
|||
type
|
float64
|
|||
params
|
index
|
[0..Count-1]
|
The list index. | |
returns
|
The element. | |||
implements
|
VectorConstBase.GetAt
|
public
override
method
|
GetEnumerator
()
|
||
type
|
IEnumerator<T>
|
||
inherited
|
DequeBase.GetEnumerator
|
Returns the list index of the given element.
[Pure]
|
||||
public
override
method
|
IndexOf
(float64 element)
|
|||
type
|
int32
|
|||
params
|
element
|
The element. | ||
returns
|
The
list
index
or
-1
if
the
element
is
not
contained
in
the
list. |
|||
implements
|
VectorConstBase.IndexOf
|
Returns the last enumerated value.
[Pure]
|
||||
public
override
method
|
Last
()
|
|||
type
|
T
|
|||
returns
|
The last enumerated value. | |||
inherited
|
VectorConstBase.Last
|
Exceptions:
Returns the first element in the queue without removing it.
public
override
method
|
PeekFirst
()
|
||
type
|
float64
|
||
returns
|
The first element. | ||
implements
|
DequeBase.PeekFirst
|
Returns the last element in the queue without removing it.
public
override
method
|
PeekLast
()
|
||
type
|
float64
|
||
returns
|
The last element. | ||
implements
|
DequeBase.PeekLast
|
Returns the first element in the queue and removes it.
public
override
method
|
PopFirst
()
|
||
type
|
float64
|
||
returns
|
The first element. | ||
implements
|
DequeBase.PopFirst
|
Returns the last element in the queue and removes it.
public
override
method
|
PopLast
()
|
||
type
|
float64
|
||
returns
|
The last element. | ||
implements
|
DequeBase.PopLast
|
Prepends the given element to the queue.
public
override
method
|
PushFirst
(float64 element)
|
||
params
|
element
|
The element. | |
implements
|
DequeBase.PushFirst
|
Appends the given element to the queue.
public
override
method
|
PushLast
(float64 element)
|
||
params
|
element
|
The element. | |
implements
|
DequeBase.PushLast
|
Returns the elements of this enumerable object as a fresh array.
[Pure]
|
||||
public
method
|
ToArray
()
|
|||
type
|
T[]
|
|||
returns
|
|
The array of elements. | ||
inherited
|
BagConstBase.ToArray
|
Returns the elements of this collection as an array.
public
override
method
|
ToArrayCopy
(T[] array,
int32 offset = 0)
|
||
type
|
T[]
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Offset
into
array.
Defaults
to
0 .
|
|
returns
|
|
The filled array. | |
inherited
|
VectorConstBase.ToArrayCopy
|
Remarks:
The elements in this collection will be copied into the given array, starting at the array index specified by offset.
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
public
virtual
method
|
ToArrayList
()
|
|||
type
|
IArrayVector<T>
|
|||
returns
|
|
The list of elements. | ||
inherited
|
BagConstBase.ToArrayList
|
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
public
override
method
|
ToList
()
|
|||
type
|
IVectorConst<T>
|
|||
returns
|
|
The list of elements. | ||
inherited
|
VectorConstBase.ToList
|