TimeValueBuffer Class

A buffer of values, storing a buffer of values together with their time, and interpolate values based on a datetime within the buffer time span

Definition

Namespace: DHI.Mike1D.Generic.Collections
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class TimeValueBuffer
Inheritance
Object    TimeValueBuffer

Constructors

TimeValueBuffer Default constructor
TimeValueBuffer(Int32) Default constructor, created with the number of buffers in bufferCount

Properties

Buffers All buffer values
DateTimes DateTimes stored in buffer
Extrapolation Allow extrapolation, use nearest value.
TimeBuffer Bool indicating if to buffer in time (true, default), or just containing one time interval (false).
Times Times stored in buffer

Methods

Add(DateTime) Add to buffer. This adds the time, values must be added as well to ALL buffers
Add(FifoQueueDouble, Double) Add value to buffer
Add(Int32, Double) Add value to buffer
AddBuffer Add one more buffer to the list of buffers.
CleanupBefore Dequeue all values older than date, i.e. keep the first one older than date, such that we can do interpolation.
Clear Clear the buffer
EndTime End time of buffer
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetBuffer Get the buffer values for buffer at the provided index.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValue(FifoQueueDouble) Get value for the buffer for the time specified by Interp(DateTime)
GetValue(Int32) Get value for the buffer at index bufferIndex for the time specified by Interp(DateTime)
Interp Setup interpolation for values for the specified time. This must be called before any of the GetValue(FifoQueueDouble) methods are called.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ResetBuffers Reset the buffer, clear values.
StartTime Start time of buffer
ToStringReturns a string that represents the current object.
(Inherited from Object)
UpdateLast(DateTime) Update the last time-value in the buffer
UpdateLast(Int32, Double) Update the last time-value in the buffer

Fields

_buffers 
_dateTimes 
_timeOfLastUpdate Time of last update of interpolation values, i.e. last call to Interp(DateTime) - buffering for performance
_timeUpdateFraction Fraction within interval where interpolation takes place
_timeUpdateInterval Interval in time where interpolation takes place

See Also