pub trait Variable:
DynClone
+ Send
+ Sync
+ Debug
+ Display
+ Serialize
+ Deserialize {
// Required method
fn value(&self, event: &Event) -> Float;
// Provided methods
fn value_on_local(&self, dataset: &Dataset) -> Vec<Float> ⓘ { ... }
fn value_on(&self, dataset: &Dataset) -> Vec<Float> ⓘ { ... }
fn eq(&self, val: Float) -> VariableExpression
where Self: Sized + 'static { ... }
fn lt(&self, val: Float) -> VariableExpression
where Self: Sized + 'static { ... }
fn gt(&self, val: Float) -> VariableExpression
where Self: Sized + 'static { ... }
fn ge(&self, val: Float) -> VariableExpression
where Self: Sized + 'static { ... }
fn le(&self, val: Float) -> VariableExpression
where Self: Sized + 'static { ... }
}
Expand description
Standard methods for extracting some value out of an Event
.
Required Methods§
Provided Methods§
Sourcefn value_on_local(&self, dataset: &Dataset) -> Vec<Float> ⓘ
fn value_on_local(&self, dataset: &Dataset) -> Vec<Float> ⓘ
This method distributes the Variable::value
method over each Event
in a
Dataset
(non-MPI version).
§Notes
This method is not intended to be called in analyses but rather in writing methods
that have mpi
-feature-gated versions. Most users should just call Variable::value_on
instead.
Sourcefn value_on(&self, dataset: &Dataset) -> Vec<Float> ⓘ
fn value_on(&self, dataset: &Dataset) -> Vec<Float> ⓘ
This method distributes the Variable::value
method over each Event
in a
Dataset
.
Sourcefn eq(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
fn eq(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
Create an VariableExpression
that evaluates to self == val
Sourcefn lt(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
fn lt(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
Create an VariableExpression
that evaluates to self < val
Sourcefn gt(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
fn gt(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
Create an VariableExpression
that evaluates to self > val
Sourcefn ge(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
fn ge(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
Create an VariableExpression
that evaluates to self >= val
Sourcefn le(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
fn le(&self, val: Float) -> VariableExpressionwhere
Self: Sized + 'static,
Create an VariableExpression
that evaluates to self <= val