44 template<
typename U,
typename V>
60 typename ValType::iterator
begin() {
return this->value.begin(); };
61 typename ValType::iterator
end() {
return this->value.end(); };
62 auto cbegin()
const {
return this->value.cbegin(); };
63 auto cend()
const {
return this->value.cend(); };
64 typename TimeType::iterator
tbegin() {
return this->time.begin(); };
65 typename TimeType::iterator
tend() {
return this->time.end(); };
66 auto ctbegin()
const {
return this->time.cbegin(); };
67 auto ctend()
const {
return this->time.cend(); };
77 template<
typename ET=EntryType>
80 std::vector<ET>
dest(this->value.size());
89 template<
typename R=T>
92 using RetType = Array<R,Dynamic,1>;
94 RetType
dest(this->value.size());
102 template <
typename C>
104 using NewType = Array<C, Dynamic, 1>;
143 template<
typename T2>
149 template<
typename T2>
155 template<
typename T2>
161 template<
typename T2>
178 size_t max_len = std::min(m, this->value.size());
181 size_t max_width = std::min(m,
size_t(this->value.at(
i).size()));
184 auto t = this->time.at(
i)(Eigen::seqN(0,
max_width));
202template <>
struct fmt::formatter<
Brush::Data::TimeSeriesi>: formatter<string_view> {
204 template <
typename FormatContext>
207 return formatter<string_view>::format(
x.print(),
ctx);
211template <>
struct fmt::formatter<
Brush::Data::TimeSeriesb>: formatter<string_view> {
213 template <
typename FormatContext>
216 return formatter<string_view>::format(
x.print(),
ctx);
220template <>
struct fmt::formatter<
Brush::Data::TimeSeriesf>: formatter<string_view> {
222 template <
typename FormatContext>
225 return formatter<string_view>::format(
x.print(),
ctx);
void bind_engine(py::module &m, string name)
namespace containing Data structures used in Brush
Scalar median(const T &v)
calculate median
std::vector< T > slice(const vector< T > &v, const U &idx)
< nsga2 selection operator for getting the front
ostream & operator<<(ostream &os, DataType n)
Stores time series data and implements operators over it.
std::string print() const
ValType::iterator begin()
auto cols(int i=0) const -> size_t
auto during(const TimeSeries< T2 > &t2) const
static const size_t NumDimensions
TimeType::iterator tend()
auto after(const TimeSeries< T2 > &t2) const
auto rows() const -> size_t
auto reduce(const auto &op) const
TimeSeries(const TimeType &t, const ValType &v)
TimeType::iterator tbegin()
Eigen::Array< T, Dynamic, 1 > EntryType
auto transform(std::function< ET(EntryType)> op) const
std::vector< Eigen::ArrayXi > TimeType
auto size() const -> size_t
auto before(const TimeSeries< T2 > &t2) const
std::vector< EntryType > ValType
TimeSeries operator()(const U &idx, const V &idx2=Eigen::all) const
return a slice of the data using indices idx