pub struct SubGrid {Show 15 fields
pub xs: Array1<f64>,
pub q2s: Array1<f64>,
pub kts: Array1<f64>,
pub xis: Array1<f64>,
pub deltas: Array1<f64>,
pub grid: GridData,
pub nucleons: Array1<f64>,
pub alphas: Array1<f64>,
pub nucleons_range: ParamRange,
pub alphas_range: ParamRange,
pub xi_range: ParamRange,
pub delta_range: ParamRange,
pub kt_range: ParamRange,
pub x_range: ParamRange,
pub q2_range: ParamRange,
}Expand description
Stores the PDF grid data for a single subgrid.
A subgrid represents a region of the phase space with a consistent
grid of x and Q2 values.
Fields§
§xs: Array1<f64>Array of x values (momentum fraction).
q2s: Array1<f64>Array of Q² values (energy scale squared).
kts: Array1<f64>Array of kT values (transverse momentum).
xis: Array1<f64>Array of xi values.
deltas: Array1<f64>Array of delta values.
grid: GridDataGrid data (either 6D or 7D for backward compatibility).
nucleons: Array1<f64>Array of nucleon number values.
alphas: Array1<f64>Array of alpha_s values.
nucleons_range: ParamRangeThe valid range for the nucleons parameter in this subgrid.
alphas_range: ParamRangeThe valid range for the AlphaS parameter in this subgrid.
xi_range: ParamRangeThe valid range for the xi parameter in this subgrid.
delta_range: ParamRangeThe valid range for the delta parameter in this subgrid.
kt_range: ParamRangeThe valid range for the kT parameter in this subgrid.
x_range: ParamRangeThe valid range for the x parameter in this subgrid.
q2_range: ParamRangeThe valid range for the q2 parameter in this subgrid.
Implementations§
Source§impl SubGrid
impl SubGrid
Sourcepub fn new(
nucleon_numbers: Vec<f64>,
alphas_values: Vec<f64>,
kt_subgrid: Vec<f64>,
x_subgrid: Vec<f64>,
q2_subgrid: Vec<f64>,
nflav: usize,
grid_data: Vec<f64>,
) -> Self
pub fn new( nucleon_numbers: Vec<f64>, alphas_values: Vec<f64>, kt_subgrid: Vec<f64>, x_subgrid: Vec<f64>, q2_subgrid: Vec<f64>, nflav: usize, grid_data: Vec<f64>, ) -> Self
Creates a new 6D SubGrid from raw data (for backward compatibility).
§Arguments
nucleon_numbers- A vector of nucleon numbers.alphas_values- A vector of alpha_s values.kt_subgrid- A vector ofkTvalues.x_subgrid- A vector ofxvalues.q2_subgrid- A vector ofq2values.nflav- The number of quark flavors.grid_data- A flat vector of grid data points.
§Panics
Panics if the grid data cannot be reshaped to the expected dimensions.
Sourcepub fn new_8d(
nucleon_numbers: Vec<f64>,
alphas_values: Vec<f64>,
xi_values: Vec<f64>,
delta_values: Vec<f64>,
kt_subgrid: Vec<f64>,
x_subgrid: Vec<f64>,
q2_subgrid: Vec<f64>,
nflav: usize,
grid_data: Vec<f64>,
) -> Self
pub fn new_8d( nucleon_numbers: Vec<f64>, alphas_values: Vec<f64>, xi_values: Vec<f64>, delta_values: Vec<f64>, kt_subgrid: Vec<f64>, x_subgrid: Vec<f64>, q2_subgrid: Vec<f64>, nflav: usize, grid_data: Vec<f64>, ) -> Self
Creates a new 8D SubGrid from raw data.
§Arguments
nucleon_numbers- A vector of nucleon numbers.alphas_values- A vector of alpha_s values.xi_values- A vector of xi values.delta_values- A vector of delta values.kt_subgrid- A vector ofkTvalues.x_subgrid- A vector ofxvalues.q2_subgrid- A vector ofq2values.nflav- The number of quark flavors.grid_data- A flat vector of grid data points.
§Panics
Panics if the grid data cannot be reshaped to the expected dimensions.
Sourcepub fn contains_point(&self, points: &[f64]) -> bool
pub fn contains_point(&self, points: &[f64]) -> bool
Sourcepub fn distance_to_point(&self, points: &[f64]) -> f64
pub fn distance_to_point(&self, points: &[f64]) -> f64
Calculates the squared distance from a point to the subgrid’s bounding box.
Sourcepub fn interpolation_config(&self) -> InterpolationConfig
pub fn interpolation_config(&self) -> InterpolationConfig
Gets the interpolation configuration for this subgrid.
Sourcepub fn ranges(&self) -> RangeParameters
pub fn ranges(&self) -> RangeParameters
Gets the parameter ranges for this subgrid.
Sourcepub fn grid_slice(&self, pid_index: usize) -> ArrayView2<'_, f64>
pub fn grid_slice(&self, pid_index: usize) -> ArrayView2<'_, f64>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SubGrid
impl<'de> Deserialize<'de> for SubGrid
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>,
Auto Trait Implementations§
impl Freeze for SubGrid
impl RefUnwindSafe for SubGrid
impl Send for SubGrid
impl Sync for SubGrid
impl Unpin for SubGrid
impl UnsafeUnpin for SubGrid
impl UnwindSafe for SubGrid
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more