Click or drag to resize

TsTime Class

Class handling non-equidistant calendar time time series.
Inheritance Hierarchy
SystemObject
  DHI.Mike1D.Generic.TimeSeriesTsTime

Namespace:  DHI.Mike1D.Generic.TimeSeries
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public class TsTime : ITsTime

The TsTime type exposes the following members.

Constructors
  NameDescription
Public methodTsTime
Initializes a new instance of the TsTime class
Top
Properties
  NameDescription
Public propertyDateTimes
DateTimes in the time series. For a calendar time axis this is retrieved from the time series. For a relative time axis this is calculated relative to the time series StartTime that must be set before this is called.
Public propertyDt
Public propertyEndTime
End time of time series. For a calendar axis IsCalendarAxis this is retrieved from the time series. For a relative time axis this is the StartTime plus the time series span. The StartTime must be set before this returns anything usefull.
Public propertyNumberOfTimes
Returns the number of times/values in the time series
Public propertyRelativeTimes
Times in seconds from the start of the time series.
Public propertyStartTime
Start time of time series. For a calendar axis IsCalendarAxis this is retrieved from the time series. For a relative time axis this must be set before any call to any of the GetValue calls with a DateTime argument, as e.g. GetValue(DateTime). It is not required to be set if using the GetValue(Double) version.
Public propertyTimeSpan
Time span in seconds of data in file.
Public propertyTimeType
Type of time axis.
Top
Methods
  NameDescription
Public methodStatic memberCreateNonEqCalendarAxis
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetInterval(Double, Double)

Finds the interval in the time vector where the argument lays in between.

If argument is below the first value, 0 is returned. If argument is above last value, the length of the vector is returned.

The result is the interval number, one based, meaning that the arg fullfills:

(vector[res-1] < arg && arg <= vector[res])

Also the scale factor for interpolating is returned. For linear interpolation

arg = vector[res-1] + fraction*(vector[res]-vector[res-1])
or
arg = (1-fraction)*vector[res-1] + fraction*vector[res]

If arg exists in vector, the result is such that

arg = vector[res]
i.e., fraction is one (except when arg = vector[0], then res = 1 and fraction = 0).

Public methodGetInterval(Double, Double, Int32)
Same as GetInterval(Double, Double), apart from that the lastInterval is searched first. This is an optimized version when successive calls returns interval that are nearby.
Public methodGetTime
Returns the relative time at the given index
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsCalendarAxis
Returns true if the time axis is a calendar time axis. It returns false for an Undefined_Time and any of the relative time axis.
Public methodStatic memberIsCalendarAxis(TsTimeType)
Returns true if the time axis is a calendar time axis. It returns false for an Undefined_Time and any of the relative time axis.
Public methodIsEquidistantAxis
Returns true if the time axis is an equidistant time axis.
Public methodStatic memberIsEquidistantAxis(TsTimeType)
Returns true if the time axis is an equidistant time axis.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRelativeTime(DateTime)
Return the relative time value of the input time
Public methodRelativeTime(DateTime, DateTime)
Return the relative time value of the input time, having startTime as zero for the relative axis
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also