pub enum LevelSpec {
Values(Vec<String>),
Range {
min: f64,
max: f64,
step: Option<f64>,
},
All,
}Expand description
Levels of a factor, as a spec writes them.
Variants§
Values(Vec<String>)
Values in the text form that parse_value accepts, or ticks for an action.
A plan trims the spaces around each value before it reads it.
Range
Every value from min to max inclusive, step apart.
A whole-number factor takes a step of 1 when step is None. An F32 parameter needs a step, except in a
sampled design. A sampled design draws from the whole range.
Fields
All
Every value of a Bool or Choice parameter.
Implementations§
Source§impl LevelSpec
impl LevelSpec
Sourcepub fn parse(text: &str) -> Result<Self, LevelSpecError>
pub fn parse(text: &str) -> Result<Self, LevelSpecError>
Reads levels as --vary writes them: all, a range min:max:step or min:max, or a list v1,v2,....
Spaces around the text, a listed value or a part of a range are ignored. The model checks the levels when the sweep is planned.
§Errors
Returns LevelSpecError for a range with other than two or three parts, or a part that is not a number.