9 #ifndef WARPX_UTILS_PARSER_INTERVALSPARSER_H_
10 #define WARPX_UTILS_PARSER_INTERVALSPARSER_H_
36 SliceParser (
const std::string& instr,
bool isBTD=
false);
45 [[nodiscard]]
bool contains (
int n)
const;
79 [[nodiscard]]
int getStop ()
const;
90 int m_stop = std::numeric_limits<int>::max();
125 [[nodiscard]]
bool contains (
int n)
const;
This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the f...
Definition: IntervalsParser.H:177
BTDIntervalsParser()=default
Default constructor of the BTDIntervalsParser class.
static constexpr char m_separator
Definition: IntervalsParser.H:221
bool isActivated() const
A method that returns true if any of the slices contained by the IntervalsParser has a strictly posit...
Definition: IntervalsParser.cpp:275
int GetFinalIteration() const
Return the final BTD iteration.
Definition: IntervalsParser.cpp:269
std::vector< SliceParser > m_slices
Definition: IntervalsParser.H:219
int GetBTDIteration(int i_buffer) const
Return the iteration number stored at index i_buffer.
Definition: IntervalsParser.cpp:263
int NumSnapshots() const
Return the total number of unique labframe snapshots.
Definition: IntervalsParser.cpp:257
std::vector< int > m_slice_starting_i_buffer
Definition: IntervalsParser.H:220
std::vector< int > m_btd_iterations
Definition: IntervalsParser.H:218
bool m_activated
Definition: IntervalsParser.H:222
This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the f...
Definition: IntervalsParser.H:103
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:117
std::vector< SliceParser > m_slices
Definition: IntervalsParser.H:166
std::string m_separator
Definition: IntervalsParser.H:167
bool m_activated
Definition: IntervalsParser.H:168
IntervalsParser()=default
Default constructor of the IntervalsParser class.
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:137
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:145
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:127
bool isActivated() const
A method that returns true if any of the slices contained by the IntervalsParser has a strictly posit...
Definition: IntervalsParser.cpp:151
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:110
This class is a parser for slices of the form i:j:k where i, j and k are integers representing respec...
Definition: IntervalsParser.H:24
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:60
int getStop() const
A method that returns the slice stop.
Definition: IntervalsParser.cpp:85
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:70
int m_period
Definition: IntervalsParser.H:91
int numContained() const
A method that returns the number of integers contained by the slice.
Definition: IntervalsParser.cpp:88
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:53
int m_start
Definition: IntervalsParser.H:89
bool m_isBTD
Definition: IntervalsParser.H:88
int m_stop
Definition: IntervalsParser.H:90
int getPeriod() const
A method that returns the slice period.
Definition: IntervalsParser.cpp:79
std::string m_separator
Definition: IntervalsParser.H:92
SliceParser(const std::string &instr, bool isBTD=false)
Constructor of the SliceParser class.
Definition: IntervalsParser.cpp:19
int getStart() const
A method that returns the slice start.
Definition: IntervalsParser.cpp:82
Definition: IntervalsParser.H:17