SeqView¶
-
template<class
T>
classSeqView: public tsa::BaseView¶ Time view: container for time series.
Operations
-
SeqView &
operator=(const SeqView &from)¶ Assignement operator
- Return
a reference to a new object
- Parameters
from: The instance to be assigned from
-
void
Clear()¶ Clear the data in the view, which are all initialized to zero.
Data access
-
numericType &
operator()(unsigned int f)¶ Get a value in the first channel at a given index. It is equivalent to AsVector
- Return
the data value
- Parameters
f: the index
-
numericType
get(double x)¶ Get a value in the first channel at a given value of the time or frequency
- Return
the data value
- Parameters
f: the time/frequency value
-
numericType
get(unsigned int c, double x)¶ Get a value in a channel at a given value of the time or frequency
- Return
the data value
- Parameters
c: the channelf: the time/frequency value
-
numericType &
operator()(unsigned int channel, unsigned int f)¶ Get a value in a given channel at a given index. It is equivalent to AsVector
- Return
the data value
- Parameters
channel: the channel numberf: the index
-
numericType &
asVector(unsigned int channel, unsigned int f)¶ Get a value in a given channel at a given index. It is equivalent to operator()
- Return
the data value
- Parameters
channel: the channel numberf: the index
-
template<class
MA>
numericType &asMatrix(unsigned int i, unsigned int j, unsigned int f)¶ Get a value in a given channel at a given index. Channels are organized accordingly with the matrix shape MA
- Return
the data value
- Parameters
i: the row indexj: the column indexf: the index
Getters
-
double
GetScale()¶ Get the scale of the sequence
- Return
scale of the sequence
-
double
GetStart()¶ Get the start of the sequence
- Return
start of the sequence
-
double
GetSampling()¶ Get the sampling of the sequence
- Return
the sampling of the sequence
-
unsigned int
GetSize()¶ Get the number of data in the time series
- Return
the number of data in the time series
-
unsigned int
GetChannels()¶ Get the number of channels in the view
- Return
the number of channels
-
double
GetX(unsigned int k)¶ Get the label (x value) of a particular value in the sequence
- Return
the label that correspond to a given index in the sequence
- Parameters
k: the index in the sequence
-
double
GetEnd()¶ Get the end label of the sequence
- Return
end label of the sequence
-
double
GetSlice()¶ Get the length of the sequence (in x unit)
- Return
the length of the sequence in x unit
-
int
GetIndex(double x)¶ Get the index which correspond to a given x value. No check is done for the size of the index
- Return
start of the sequence
- Parameters
x: the x value
Public Functions
-
SeqView()¶ Constructor.
-
SeqView(double aStart, double aSampling, unsigned int ChannelSize, const std::string &aName = std::string(), unsigned int ColumnDim = 1)¶ Constructor.
- Parameters
aStart: start of the sequenceaSampling: sampling the sequenceChannelSize: the number of data in each channelaName: a name for the dataColumnDim: the dimension of the column structure
-
~SeqView()¶ Destructor
-
SeqView &