Struct rustitude_core::amplitude::Amplitude
source · pub struct Amplitude<F: Field> {
pub name: String,
pub node: Box<dyn Node<F>>,
pub active: bool,
pub parameters: Vec<String>,
pub cache_position: usize,
pub parameter_index_start: usize,
}Expand description
Fields§
§name: StringA name which uniquely identifies an Amplitude within a sum and group.
node: Box<dyn Node<F>>A Node which contains all of the operations needed to compute a [ComplexField] from an
Event in a Dataset, a Vec<Field> of parameter values, and possibly some
precomputed values.
active: boolIndicates whether the amplitude should be included in calculations or skipped.
parameters: Vec<String>Contains the parameter names associated with this amplitude.
cache_position: usizeIndicates the reserved position in the cache for shortcutting computation with a precomputed cache.
parameter_index_start: usizeIndicates the position in the final parameter vector that coincides with the starting index
for parameters in this Amplitude
Implementations§
source§impl<F: Field> Amplitude<F>
impl<F: Field> Amplitude<F>
sourcepub fn register(
&mut self,
cache_position: usize,
parameter_index_start: usize,
dataset: &Dataset<F>,
) -> Result<(), RustitudeError>
pub fn register( &mut self, cache_position: usize, parameter_index_start: usize, dataset: &Dataset<F>, ) -> Result<(), RustitudeError>
Set the Amplitude::cache_position and Amplitude::parameter_index_start and runs
Amplitude::precalculate over the given Dataset.
§Errors
This function will raise a RustitudeError if the precalculation step fails.
Trait Implementations§
source§impl<F: Field> AmpLike<F> for Amplitude<F>
impl<F: Field> AmpLike<F> for Amplitude<F>
source§fn walk_mut(&mut self) -> Vec<&mut Self>
fn walk_mut(&mut self) -> Vec<&mut Self>
AmpLike::walk, but returns mutable references rather than
clones.source§fn real(&self) -> Real<F>where
Self: Sized + 'static,
fn real(&self) -> Real<F>where
Self: Sized + 'static,
Amplitude or Amplitude-like struct.source§fn imag(&self) -> Imag<F>where
Self: Sized + 'static,
fn imag(&self) -> Imag<F>where
Self: Sized + 'static,
Amplitude or Amplitude-like struct.source§impl<F: Field> AsTree for Amplitude<F>
impl<F: Field> AsTree for Amplitude<F>
source§fn _get_tree(&self, _bits: &mut Vec<bool>) -> String
fn _get_tree(&self, _bits: &mut Vec<bool>) -> String
AsTree-implementor starting with a particular indentation structure
defined by bits. A true bit will print a vertical line, while a false bit
will not.source§fn get_tree(&self) -> String
fn get_tree(&self) -> String
source§fn _get_indent(&self, bits: Vec<bool>) -> String
fn _get_indent(&self, bits: Vec<bool>) -> String
AsTree::get_tree. A true bit will yield a vertical line, while a
false bit will not.source§fn _get_intermediate(&self) -> String
fn _get_intermediate(&self) -> String
AsTree::get_tree.source§fn _get_end(&self) -> String
fn _get_end(&self) -> String
AsTree::get_tree.source§impl<F: Field> Node<F> for Amplitude<F>
impl<F: Field> Node<F> for Amplitude<F>
source§fn precalculate(&mut self, dataset: &Dataset<F>) -> Result<(), RustitudeError>
fn precalculate(&mut self, dataset: &Dataset<F>) -> Result<(), RustitudeError>
source§fn calculate(
&self,
parameters: &[F],
event: &Event<F>,
) -> Result<Complex<F>, RustitudeError>
fn calculate( &self, parameters: &[F], event: &Event<F>, ) -> Result<Complex<F>, RustitudeError>
ComplexField]. Read moresource§fn parameters(&self) -> Vec<String>
fn parameters(&self) -> Vec<String>
source§fn named(self, name: &str) -> Amplitude<F>where
Self: Sized + 'static,
fn named(self, name: &str) -> Amplitude<F>where
Self: Sized + 'static,
Nodes into Amplitudes. This method has a
shorter name than Node::into_amplitude, which it calls.source§fn is_python_node(&self) -> bool
fn is_python_node(&self) -> bool
Auto Trait Implementations§
impl<F> Freeze for Amplitude<F>
impl<F> !RefUnwindSafe for Amplitude<F>
impl<F> Send for Amplitude<F>
impl<F> Sync for Amplitude<F>
impl<F> Unpin for Amplitude<F>
impl<F> !UnwindSafe for Amplitude<F>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.