pub enum SubgridEnum {
    LagrangeSubgridV1(LagrangeSubgridV1),
    NtupleSubgridV1(NtupleSubgridV1),
    LagrangeSparseSubgridV1(LagrangeSparseSubgridV1),
    LagrangeSubgridV2(LagrangeSubgridV2),
    ImportOnlySubgridV1(ImportOnlySubgridV1),
    EmptySubgridV1(EmptySubgridV1),
    ImportOnlySubgridV2(ImportOnlySubgridV2),
}
Expand description

Enum which lists all possible Subgrid variants possible.

Variants§

§

LagrangeSubgridV1(LagrangeSubgridV1)

Lagrange-interpolation subgrid.

§

NtupleSubgridV1(NtupleSubgridV1)

N-tuple subgrid.

§

LagrangeSparseSubgridV1(LagrangeSparseSubgridV1)

Lagrange-interpolation subgrid.

§

LagrangeSubgridV2(LagrangeSubgridV2)

Lagrange-interpolation subgrid with possibly different x1 and x2 bins.

§

ImportOnlySubgridV1(ImportOnlySubgridV1)

Import-only sparse subgrid with possibly different x1 and x2 bins.

§

EmptySubgridV1(EmptySubgridV1)

Empty subgrid.

§

ImportOnlySubgridV2(ImportOnlySubgridV2)

Same as ImportOnlySubgridV1, but with support for different renormalization and factorization scales choices.

Trait Implementations§

source§

impl Clone for SubgridEnum

source§

fn clone(&self) -> SubgridEnum

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'de> Deserialize<'de> for SubgridEnum

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<&SubgridEnum> for Array3<f64>

source§

fn from(subgrid: &SubgridEnum) -> Self

Converts to this type from the input type.
source§

impl From<&SubgridEnum> for ImportOnlySubgridV2

source§

fn from(subgrid: &SubgridEnum) -> Self

Converts to this type from the input type.
source§

impl From<EmptySubgridV1> for SubgridEnum

source§

fn from(v: EmptySubgridV1) -> SubgridEnum

Converts to this type from the input type.
source§

impl From<ImportOnlySubgridV1> for SubgridEnum

source§

fn from(v: ImportOnlySubgridV1) -> SubgridEnum

Converts to this type from the input type.
source§

impl From<ImportOnlySubgridV2> for SubgridEnum

source§

fn from(v: ImportOnlySubgridV2) -> SubgridEnum

Converts to this type from the input type.
source§

impl From<LagrangeSparseSubgridV1> for SubgridEnum

source§

fn from(v: LagrangeSparseSubgridV1) -> SubgridEnum

Converts to this type from the input type.
source§

impl From<LagrangeSubgridV1> for SubgridEnum

source§

fn from(v: LagrangeSubgridV1) -> SubgridEnum

Converts to this type from the input type.
source§

impl From<LagrangeSubgridV2> for SubgridEnum

source§

fn from(v: LagrangeSubgridV2) -> SubgridEnum

Converts to this type from the input type.
source§

impl From<NtupleSubgridV1> for SubgridEnum

source§

fn from(v: NtupleSubgridV1) -> SubgridEnum

Converts to this type from the input type.
source§

impl Serialize for SubgridEnum

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Subgrid for SubgridEnum

source§

fn mu2_grid(&self) -> Cow<'_, [Mu2]>

Return a slice of Mu2 values corresponding to the (squared) renormalization and factorization values of the grid. If the subgrid does not use a grid, this method should return an empty slice.

source§

fn x1_grid(&self) -> Cow<'_, [f64]>

Return a slice of values of x1. If the subgrid does not use a grid, this method should return an empty slice.

source§

fn x2_grid(&self) -> Cow<'_, [f64]>

Return a slice of values of x2. If the subgrid does not use a grid, this method should return an empty slice.

source§

fn convolute( &self, __enum_dispatch_arg_0: &[f64], __enum_dispatch_arg_1: &[f64], __enum_dispatch_arg_2: &[Mu2], __enum_dispatch_arg_3: &mut dyn FnMut(usize, usize, usize) -> f64 ) -> f64

Convolute the subgrid with a luminosity function, which takes indices as arguments that correspond to the entries given in the slices x1, x2 and mu2.

source§

fn fill(&mut self, __enum_dispatch_arg_0: &Ntuple<f64>)

Fills the subgrid with weight for the parton momentum fractions x1 and x2, and the scale q2. Filling is currently only support where both renormalization and factorization scale have the same value.

source§

fn is_empty(&self) -> bool

Returns true if fill was never called for this grid.

source§

fn merge( &mut self, __enum_dispatch_arg_0: &mut SubgridEnum, __enum_dispatch_arg_1: bool )

Merges other into this subgrid.

source§

fn scale(&mut self, __enum_dispatch_arg_0: f64)

Scale the subgrid by factor.

source§

fn symmetrize(&mut self)

Assumes that the initial states for this grid are the same and uses this to optimize the grid by getting rid of almost half of the entries.

source§

fn clone_empty(&self) -> SubgridEnum

Returns an empty copy of the current subgrid.

source§

fn indexed_iter(&self) -> SubgridIndexedIter<'_>

Return an iterator over all non-zero elements of the subgrid.

source§

fn stats(&self) -> Stats

Return statistics for this subgrid.

source§

fn static_scale(&self) -> Option<Mu2>

Return the static (single) scale, if this subgrid has one.

source§

impl TryInto<EmptySubgridV1> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<EmptySubgridV1, <Self as TryInto<EmptySubgridV1>>::Error>

Performs the conversion.
source§

impl TryInto<ImportOnlySubgridV1> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImportOnlySubgridV1, <Self as TryInto<ImportOnlySubgridV1>>::Error>

Performs the conversion.
source§

impl TryInto<ImportOnlySubgridV2> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ImportOnlySubgridV2, <Self as TryInto<ImportOnlySubgridV2>>::Error>

Performs the conversion.
source§

impl TryInto<LagrangeSparseSubgridV1> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<LagrangeSparseSubgridV1, <Self as TryInto<LagrangeSparseSubgridV1>>::Error>

Performs the conversion.
source§

impl TryInto<LagrangeSubgridV1> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<LagrangeSubgridV1, <Self as TryInto<LagrangeSubgridV1>>::Error>

Performs the conversion.
source§

impl TryInto<LagrangeSubgridV2> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<LagrangeSubgridV2, <Self as TryInto<LagrangeSubgridV2>>::Error>

Performs the conversion.
source§

impl TryInto<NtupleSubgridV1> for SubgridEnum

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<NtupleSubgridV1, <Self as TryInto<NtupleSubgridV1>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,