TimeSeriesDataQueueT Class |
Namespace: FinAnalysis.Base
public class TimeSeriesDataQueue<T> : HistoryDataQueue<T>, IDataQueue<T>, IEnumerable<T>, IEnumerable where T : new()
The TimeSeriesDataQueueT type exposes the following members.
Name | Description | |
---|---|---|
TimeSeriesDataQueueT |
Initializes a new instance of the FinAnalysis.Base.TimeSeriesDataQueue
class that contains circle queue of Data and DateTime (optional). Default method of use is ManualControl.
Queue capacity will be dynamic. You can manage it manually Put\Remove Last or First ements as in Dequeue.
| |
TimeSeriesDataQueueT(Int32) |
Initializes a new instance of the FinAnalysis.Base.TimeSeriesDataQueue
class that contains circle queue of of Data and DateTime (optional). In this case methid of use will be AutoStatic,
or SingleElement if you specify capacity equal to one. Queue capacity will be
fixed and it will be enough for exact "capacity" elements.
| |
TimeSeriesDataQueueT(TimeSpan) |
Initializes a new instance of the FinAnalysis.Base.TimeSeriesDataQueue
class that contains circle queue of of Data and DateTime. In this case methid of use will be AutoDynamic,
Queue capacity will be dynamic and it will be enough for contain all elements on specified time period.
Using Put method with DateTime is mandatory in this case.
Note: You can give queue a hint, what initial arrays size it should use, by seting Capacity field.
|
Name | Description | |
---|---|---|
Capacity |
Set or Get queue capacity (number of elements it can store) or size of sliding window if it is AutoStatic queue.
Note: if for non time period auto queue, you specify capacity equal to one then queue switch to SingleElement mode.
Note: if for non time period auto queue, you specify capacity not equal to one then queue switch to AutoStatic mode.
| |
Count |
Get the number of elements stored in container.
| |
First |
Get first(oldest) data element stored in container.
Note: if there is not elements in queue it returns DefaltValue.
(Inherited from HistoryDataQueueT.) | |
FirstDateTime |
Get first(oldest) data element DateTime stored in container.
Note: if there is not elements in queue it returns DefaltDateTime.
(Inherited from HistoryDataQueueT.) | |
Initialized |
This flag is set if and only if queue has already initialized (you already add something to it).
Note: you don't have to change Period or Capacity if queue already initialized.
| |
ItemDateTime |
Return historically latest element with smaller or equal DateTime.
Note: do not try to use this method if you didn't specify DateTime to data elements.
| |
ItemInt32 |
Get data which was store "index" steps ago.
| |
Last |
Get last data element stored in container.
Note: if there is not elements in queue it returns DefaltValue.
(Inherited from HistoryDataQueueT.) | |
LastDateTime |
Get last data element DateTime stored in container.
Note: if there is no elements in the queue it returns DefaultDateTime.
(Inherited from HistoryDataQueueT.) | |
NeedDateTime |
This flag is set if and only if queue need DateTime to be specified for data elements, which you intend to add.
| |
Period |
Set or Get time period, how long container will save elements (For AutoDynamic queue).
Note: As soon as you specify Time Period queue switch to Auto Dynamic mode.
| |
Previous |
Get previous data element stored in container.
Note: if there is such not elements in queue it returns DefaltValue.
(Inherited from HistoryDataQueueT.) | |
Ready |
Ready flag is set if and only if queue contain something.
(Inherited from HistoryDataQueueT.) | |
Type |
Return type of queue:
SingleElement: Queue store only one single element. (Useful as default method for indicators history storing)
ManualControl: Support all typical operations specific to Dequeue. (Useful for some custom work).
AutoStatic: Store all elements in sliding window specified by number elements to store. Automatically drop element when it out of the window.
AutoDynamic: Store all elements in sliding window specified by time period. Automatically drop element when it out of the window.
|
Name | Description | |
---|---|---|
Clone |
Makes full copy of this instance.
(Inherited from HistoryDataQueueT.) | |
CopyTo(Object) |
Gets internal state from source object.
(Inherited from HistoryDataQueueT.) | |
CopyTo(Object, IL_Clone) |
Gets internal state from source object.
(Inherited from HistoryDataQueueT.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetEnumerator |
Returns an enumerator that iterates through a collection.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetIndexByTime |
Get offset index of element by element time.
If there no element with such time, we return latest element with time smaller than specified.
If we can't find valid index, we return -1.
(Inherited from HistoryDataQueueT.) | |
GetTimeByIndex |
Return time associated with specified point.
(Inherited from HistoryDataQueueT.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Put(T) |
Store new data element in queue. This method for static atomatic managed or single queue.
Do not call it for manually managed queue or dynamic automatic queue (ManualControl, AutoDynamic types).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
Put(T, DateTime) |
Store new data element in queue. This method for atomatic managed or single queue.
Do not call it for manually managed queue or dynamic automatic queue (ManualControl type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
PutFirst(T) |
Store new data element on first position in queue. This method for manual queue.
Do not call it for automatic managed queue or single element queue (SingleElement, AutoDynamic, AutoStatic type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
PutFirst(T, DateTime) |
Store new data element on first position in queue. This method for manual queue.
Do not call it for automatic managed queue or single element queue (SingleElement, AutoDynamic, AutoStatic type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
PutLast(T) |
Store new data element on last position in queue. This method for manual queue.
Do not call it for automatic managed queue or single element queue (SingleElement, AutoDynamic, AutoStatic type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
PutLast(T, DateTime) |
Store new data element on last position in queue. This method for manual queue.
Do not call it for automatic managed queue or single element queue (SingleElement, AutoDynamic, AutoStatic type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
RemoveFirst |
Remove data element from first position in queue. This method for manual queue.
Do not call it for automatic managed queue or single element queue (SingleElement, AutoDynamic, AutoStatic type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
RemoveLast |
Remove data element from last position in queue. This method for manual queue.
Do not call it for automatic managed queue or single element queue (SingleElement, AutoDynamic, AutoStatic type).
Note: Please do not use both with and without DateTime method for one queue instance.
| |
SetOnPopDelegate |
Set delegate that will be invoked every time a new element is dequeued.
(Inherited from HistoryDataQueueT.) | |
SetOnPushDelegate |
Set delegate that will be invoked every time a new element is enqueued.
(Inherited from HistoryDataQueueT.) | |
SetQueueListener |
Set listener to queue capacity. Queue will call OnPop method every time, when queue drop some element.
And OnPush method, when queue store element. Do not use listener with single element queue.
Queue support any number of listeners.
(Inherited from HistoryDataQueueT.) | |
ToArray |
Copies the elements of the TimeSeriesDataQueue to a new array.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |