9#ifndef ABLASTR_UTILS_TEXT_INTERVALSPARSER_H_
10#define ABLASTR_UTILS_TEXT_INTERVALSPARSER_H_
38 explicit SliceParser (
const std::string& instr,
bool require_stop=
false);
47 [[nodiscard]]
bool contains (
int n)
const;
81 [[nodiscard]]
int getStop ()
const;
92 int m_stop = std::numeric_limits<int>::max();
127 [[nodiscard]]
bool contains (
int n)
const;
int previousContains(int n) const
A method that returns the greatest integer strictly smaller than n such that contains(n) is true....
Definition IntervalsParser.cpp:134
bool contains(int n) const
A method that returns true if the input integer is contained in any of the slices contained by the In...
Definition IntervalsParser.cpp:117
bool isActivated() const
A method that returns true if any of the slices contained by the IntervalsParser has a strictly posit...
Definition IntervalsParser.cpp:157
IntervalsParser()=default
Default constructor of the IntervalsParser class.
std::string m_separator
Definition IntervalsParser.H:169
int localPeriod(int n) const
A method the local period (in timesteps) of the IntervalsParser at timestep n. The period is defined ...
Definition IntervalsParser.cpp:151
bool m_activated
Definition IntervalsParser.H:170
int nextContains(int n) const
A method that returns the smallest integer strictly greater than n such that contains(n) is true....
Definition IntervalsParser.cpp:124
int previousContainsInclusive(int n) const
A method that returns the greatest integer smaller than or equal to n such that contains(n) is true....
Definition IntervalsParser.cpp:144
std::vector< SliceParser > m_slices
Definition IntervalsParser.H:168
bool m_require_stop
Definition IntervalsParser.H:90
bool contains(int n) const
A method that returns true if the input integer is contained in the slice. (e.g. if the list is initi...
Definition IntervalsParser.cpp:61
int nextContains(int n) const
A method that returns the smallest integer strictly greater than n such that contains(n) is true....
Definition IntervalsParser.cpp:68
int getPeriod() const
A method that returns the slice period.
Definition IntervalsParser.cpp:87
int m_stop
Definition IntervalsParser.H:92
int numContained() const
A method that returns the number of integers contained by the slice.
Definition IntervalsParser.cpp:96
std::string m_separator
Definition IntervalsParser.H:94
int m_period
Definition IntervalsParser.H:93
int getStop() const
A method that returns the slice stop.
Definition IntervalsParser.cpp:93
int getStart() const
A method that returns the slice start.
Definition IntervalsParser.cpp:90
int m_start
Definition IntervalsParser.H:91
int previousContains(int n) const
A method that returns the greatest integer strictly smaller than n such that contains(n) is true....
Definition IntervalsParser.cpp:78
SliceParser(const std::string &instr, bool require_stop=false)
Constructor of the SliceParser class.
Definition IntervalsParser.cpp:23
Definition IntervalsParser.cpp:21