Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Public Types | Public Member Functions | List of all members
ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc > Class Template Reference

Class for time series data. More...

#include <cheetah/data/TimeSeries.h>

Inheritance diagram for ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >:
Inheritance graph
Collaboration diagram for ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >:
Collaboration graph

Public Types

typedef Alloc Allocator
 
- Public Types inherited from ska::cheetah::data::Series< Arch, ValueType, Alloc >
typedef DeviceMemoryType::Iterator Iterator
 
typedef DeviceMemoryType::ConstIterator ConstIterator
 
typedef Alloc Allocator
 
typedef Arch Architecture
 
typedef ValueType ValueType
 

Public Member Functions

 TimeSeries (Allocator const &alloc=Allocator())
 Construct a regularly sampled time series. More...
 
 TimeSeries (std::size_t size, Allocator const &alloc=Allocator())
 Construct a regularly sampled time series. More...
 
template<typename OtherArch , typename OtherAlloc >
 TimeSeries (TimeSeries< OtherArch, ValueType, OtherAlloc > const &copy, Alloc const &allocator=Allocator())
 Construct a regularly sampled time series copying data from device memory.
 
 TimeSeries (TimeType const &dt, std::size_t size=0, Allocator const &alloc=Allocator())
 Construct a time series with a sampling interval. More...
 
TimeType const & sampling_interval () const
 Retrive the sampling interval. More...
 
void sampling_interval (TimeType const &dt)
 Set the sampling interval. More...
 
- Public Member Functions inherited from ska::cheetah::data::Series< Arch, ValueType, Alloc >
 Series (Allocator const &)
 
 Series (std::size_t size, Allocator const &)
 
 Series (Series const &copy)
 
 Series (Series &&copy_to_move)
 
 Series (Series< OtherArch, ValueType, OtherAlloc > const &copy, Alloc const &allocator)
 copies Series data to the device
 
 Series (Series< OtherArch, ValueType, OtherAlloc > const &copy)
 
ConstIterator begin () const
 Iterators to device memory. More...
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator end () const
 
ConstIterator cbegin () const
 
ConstIterator cend () const
 
std::size_t size () const
 the size of the series
 
void resize (std::size_t size)
 resize the data
 

Detailed Description

template<typename Arch, typename ValueType, typename Alloc = typename DefaultAllocator<Arch,ValueType>::type>
class ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >

Class for time series data.

Template Parameters
ArchThe architecture on which the time series will be stored
ValueTypeThe underlying value type of the time series
AllocThe allocator type of the time series

Definition at line 47 of file TimeSeries.h.

Constructor & Destructor Documentation

◆ TimeSeries() [1/3]

template<typename Arch , typename ValueType , typename Alloc >
ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >::TimeSeries ( Allocator const &  alloc = Allocator())
explicit

Construct a regularly sampled time series.

The time series is initialised to have zero size and a default sampling interval of 1 second is set.

Definition at line 38 of file TimeSeries.cpp.

39  : TimeSeries(0, alloc)
40 {
41 }
TimeSeries(Allocator const &alloc=Allocator())
Construct a regularly sampled time series.
Definition: TimeSeries.cpp:38

◆ TimeSeries() [2/3]

template<typename Arch , typename ValueType , typename Alloc >
ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >::TimeSeries ( std::size_t  size,
Allocator const &  alloc = Allocator() 
)
explicit

Construct a regularly sampled time series.

The time series is initialised to have the specified size and a default sampling interval of 1 second is set.

Definition at line 31 of file TimeSeries.cpp.

32  : BaseT(size, alloc)
33  , _sampling_interval(1.0 * second)
34 {
35 }
std::size_t size() const
the size of the series
Definition: Series.cpp:109

◆ TimeSeries() [3/3]

template<typename Arch , typename ValueType , typename Alloc >
ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >::TimeSeries ( TimeType const &  dt,
std::size_t  size = 0,
Allocator const &  alloc = Allocator() 
)

Construct a time series with a sampling interval.

The time series is initialised to have zero size

Parameters
dtThe sampling interval of the time series.

Definition at line 52 of file TimeSeries.cpp.

53  : BaseT(size, alloc)
54  , _sampling_interval(dt)
55 {
56 }
std::size_t size() const
the size of the series
Definition: Series.cpp:109

Member Function Documentation

◆ sampling_interval() [1/2]

template<typename Arch , typename ValueType , typename Alloc >
TimeType const & ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >::sampling_interval ( ) const

Retrive the sampling interval.

Returns
The sampling interval of the time series

Definition at line 64 of file TimeSeries.cpp.

65 {
66  return _sampling_interval;
67 }

◆ sampling_interval() [2/2]

template<typename Arch , typename ValueType , typename Alloc >
void ska::cheetah::data::TimeSeries< Arch, ValueType, Alloc >::sampling_interval ( TimeType const &  dt)

Set the sampling interval.

Parameters
dtThe new sampling interval

Definition at line 70 of file TimeSeries.cpp.

71 {
72  _sampling_interval = dt;
73 }

The documentation for this class was generated from the following files: