pub enum Instruction {
Show 19 variants
Rename {
input: Vec<String>,
output: Vec<String>,
},
Copy {
input: Vec<String>,
output: Vec<String>,
},
Scale {
input: Vec<String>,
demean: bool,
rescale: bool,
replace_na: Option<f64>,
},
Threshold {
input: Vec<String>,
threshold: f64,
above: bool,
binarize: bool,
signed: bool,
},
And {
input: Vec<String>,
output: Option<Vec<String>>,
},
Or {
input: Vec<String>,
output: Option<Vec<String>>,
},
Not {
input: Vec<String>,
output: Option<Vec<String>>,
},
Product {
input: Vec<String>,
output: Option<String>,
},
Sum {
input: Vec<String>,
weights: Vec<f64>,
output: Option<String>,
},
Power {
input: Vec<String>,
value: f64,
output: Option<Vec<String>>,
},
Factor {
input: Vec<String>,
},
Filter {
input: Vec<String>,
query: String,
},
Replace {
input: Vec<String>,
replace: HashMap<String, String>,
output: Option<Vec<String>>,
},
Select {
input: Vec<String>,
},
Delete {
input: Vec<String>,
},
Group {
input: Vec<String>,
output: String,
},
Resample {
input: Vec<String>,
sampling_rate: f64,
},
ToDense {
input: Vec<String>,
sampling_rate: Option<f64>,
},
Convolve {
input: Vec<String>,
model: String,
},
}Expand description
A single transformation instruction from the pybids-transforms-v1 spec.
Each variant corresponds to a named transformation that can be applied
to variables in a VariableCollection. Transformations modify variable
data in place (rename, scale, threshold) or create new variables (factor,
copy, split).
Variants§
Rename
Copy
Scale
Threshold
And
Or
Not
Product
Sum
Power
Factor
Filter
Replace
Select
Delete
Group
Resample
ToDense
Convolve
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl<'de> Deserialize<'de> for Instruction
impl<'de> Deserialize<'de> for Instruction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more