SeqView¶
-
template<class T>
class SeqView : public tsa::BaseView¶ Time view: container for time series.
Setters
-
inline double SetScale(double scale)¶
-
inline double SetStart(double start)¶
-
inline double SetSampling(double sampling)¶
-
inline void Fill(numericType v)¶
-
inline void FillPoint(unsigned int i, unsigned int j, numericType v)¶
-
inline void SetData(FrVect *frv)¶
-
inline void SetDataF(FrVect *frv, double offset)¶
Operations
-
inline SeqView &operator=(const SeqView &from)¶
Assignement operator
- Parameters:
from – The instance to be assigned from
- Returns:
a reference to a new object
-
inline void Clear()¶
Clear the data in the view, which are all initialized to zero.
-
inline void MoveFrame(int n)¶
-
inline void Write(int fd)¶
-
inline void Read(int fd)¶
Data access
-
inline numericType &operator()(unsigned int f)¶
Get a value in the first channel at a given index. It is equivalent to AsVector
- Parameters:
f – the index
- Returns:
the data value
-
inline numericType get(double x)¶
Get a value in the first channel at a given value of the time or frequency
- Parameters:
f – the time/frequency value
- Returns:
the data value
-
inline numericType get(unsigned int c, double x)¶
Get a value in a channel at a given value of the time or frequency
- Parameters:
c – the channel
f – the time/frequency value
- Returns:
the data value
-
inline numericType &operator()(unsigned int channel, unsigned int f)¶
Get a value in a given channel at a given index. It is equivalent to AsVector
- Parameters:
channel – the channel number
f – the index
- Returns:
the data value
-
inline numericType &asVector(unsigned int channel, unsigned int f)¶
Get a value in a given channel at a given index. It is equivalent to operator()
- Parameters:
channel – the channel number
f – the index
- Returns:
the data value
-
template<class MA>
inline 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
- Parameters:
i – the row index
j – the column index
f – the index
- Returns:
the data value
Getters
-
inline boost::numeric::ublas::matrix<numericType> *GetData()¶
-
inline double GetScale()¶
Get the scale of the sequence
- Returns:
scale of the sequence
-
inline double GetStart()¶
Get the start of the sequence
- Returns:
start of the sequence
-
inline double GetSampling()¶
Get the sampling of the sequence
- Returns:
the sampling of the sequence
-
inline unsigned int GetSize()¶
Get the number of data in the time series
- Returns:
the number of data in the time series
-
inline unsigned int GetChannels()¶
Get the number of channels in the view
- Returns:
the number of channels
-
inline double GetX(unsigned int k)¶
Get the label (x value) of a particular value in the sequence
- Parameters:
k – the index in the sequence
- Returns:
the label that correspond to a given index in the sequence
-
inline numericType &GetY(unsigned int channel, unsigned int f)¶
-
inline double GetEnd()¶
Get the end label of the sequence
- Returns:
end label of the sequence
-
inline double GetSlice()¶
Get the length of the sequence (in x unit)
- Returns:
the length of the sequence in x unit
-
inline int GetIndex(double x)¶
Get the index which correspond to a given x value. No check is done for the size of the index
- Parameters:
x – the x value
- Returns:
start of the sequence
Public Functions
-
inline SeqView()¶
Constructor.
-
inline SeqView(double aStart, double aSampling, unsigned int ChannelSize, const std::string &aName = std::string(), unsigned int ColumnDim = 1)¶
Constructor.
- Parameters:
aStart – start of the sequence
aSampling – sampling the sequence
ChannelSize – the number of data in each channel
aName – a name for the data
ColumnDim – the dimension of the column structure
-
inline SeqView(const SeqView &from)¶
Copy constructor
- Parameters:
from – The instance that must be copied
-
inline ~SeqView()¶
Destructor
-
inline double SetScale(double scale)¶