This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the form i:j:k, as defined in the SliceParser class. This class contains a vector of SliceParsers.
More...
#include <IntervalsParser.H>
This class is a parser for multiple slices of the form x,y,z,... where x, y and z are slices of the form i:j:k, as defined in the SliceParser class. This class contains a vector of SliceParsers.
◆ IntervalsParser() [1/2]
utils::parser::IntervalsParser::IntervalsParser |
( |
| ) |
|
|
default |
◆ IntervalsParser() [2/2]
utils::parser::IntervalsParser::IntervalsParser |
( |
const std::vector< std::string > & |
instr_vec | ) |
|
Constructor of the IntervalsParser class.
- Parameters
-
[in] | instr_vec | an input vector string, which when concatenated is of the form "x,y,z,...". This will call the constructor of SliceParser using x, y and z as input arguments. |
◆ contains()
bool utils::parser::IntervalsParser::contains |
( |
int |
n | ) |
const |
A method that returns true if the input integer is contained in any of the slices contained by the IntervalsParser.
- Parameters
-
◆ isActivated()
bool utils::parser::IntervalsParser::isActivated |
( |
| ) |
const |
A method that returns true if any of the slices contained by the IntervalsParser has a strictly positive period.
◆ localPeriod()
int utils::parser::IntervalsParser::localPeriod |
( |
int |
n | ) |
const |
A method the local period (in timesteps) of the IntervalsParser at timestep n. The period is defined by nextContains(n) - previousContainsInclusive(n)
- Parameters
-
◆ nextContains()
int utils::parser::IntervalsParser::nextContains |
( |
int |
n | ) |
const |
A method that returns the smallest integer strictly greater than n such that contains(n) is true. Returns std::numeric_limits<int>::max() if there is no such integer.
- Parameters
-
◆ previousContains()
int utils::parser::IntervalsParser::previousContains |
( |
int |
n | ) |
const |
A method that returns the greatest integer strictly smaller than n such that contains(n) is true. Returns 0 if there is no such integer.
- Parameters
-
◆ previousContainsInclusive()
int utils::parser::IntervalsParser::previousContainsInclusive |
( |
int |
n | ) |
const |
A method that returns the greatest integer smaller than or equal to n such that contains(n) is true. Returns 0 if there is no such integer.
- Parameters
-
◆ m_activated
bool utils::parser::IntervalsParser::m_activated = false |
|
private |
◆ m_separator
std::string utils::parser::IntervalsParser::m_separator = "," |
|
private |
◆ m_slices
std::vector<SliceParser> utils::parser::IntervalsParser::m_slices |
|
private |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/latest/Source/Utils/Parser/IntervalsParser.H
- /home/docs/checkouts/readthedocs.org/user_builds/warpx/checkouts/latest/Source/Utils/Parser/IntervalsParser.cpp