pub struct PyMetaData { /* private fields */ }Expand description
Grid metadata.
Implementations§
Source§impl PyMetaData
impl PyMetaData
Sourcepub fn new(
set_desc: String,
set_index: u32,
num_members: u32,
x_min: f64,
x_max: f64,
q_min: f64,
q_max: f64,
xsi_min: f64,
xsi_max: f64,
delta_min: f64,
delta_max: f64,
flavors: Vec<i32>,
format: String,
alphas_q_values: Vec<f64>,
alphas_vals: Vec<f64>,
polarised: bool,
set_type: PySetType,
interpolator_type: PyInterpolatorType,
error_type: String,
hadron_pid: i32,
phys_params: PyPhysicsParameters,
) -> Self
pub fn new( set_desc: String, set_index: u32, num_members: u32, x_min: f64, x_max: f64, q_min: f64, q_max: f64, xsi_min: f64, xsi_max: f64, delta_min: f64, delta_max: f64, flavors: Vec<i32>, format: String, alphas_q_values: Vec<f64>, alphas_vals: Vec<f64>, polarised: bool, set_type: PySetType, interpolator_type: PyInterpolatorType, error_type: String, hadron_pid: i32, phys_params: PyPhysicsParameters, ) -> Self
Constructor for PyMetaData.
Sourcepub fn has_key(&self, key: &str) -> bool
pub fn has_key(&self, key: &str) -> bool
Return True if the given LHAPDF-canonical key is present in the metadata.
Sourcepub fn get_entry(&self, key: &str) -> PyResult<String>
pub fn get_entry(&self, key: &str) -> PyResult<String>
Return the string value for an LHAPDF-canonical metadata key.
§Errors
Raises KeyError if the key is not present.
Sourcepub fn keys(&self) -> Vec<String>
pub fn keys(&self) -> Vec<String>
Return a sorted list of all available LHAPDF-canonical metadata keys.
Sourcepub const fn number_sets(&self) -> u32
pub const fn number_sets(&self) -> u32
The number of sets in the grid.
Sourcepub const fn alphas_q(&self) -> &Vec<f64>
pub const fn alphas_q(&self) -> &Vec<f64>
The values of q for the running of the strong coupling constant.
Sourcepub const fn alphas_values(&self) -> &Vec<f64>
pub const fn alphas_values(&self) -> &Vec<f64>
The values of the running of the strong coupling constant.
Sourcepub const fn is_polarised(&self) -> bool
pub const fn is_polarised(&self) -> bool
Whether the grid is polarised.
Sourcepub fn interpolator_type(&self) -> PyInterpolatorType
pub fn interpolator_type(&self) -> PyInterpolatorType
The interpolation method used for the grid.
Sourcepub const fn error_type(&self) -> &String
pub const fn error_type(&self) -> &String
The type of error.
Sourcepub const fn hadron_pid(&self) -> i32
pub const fn hadron_pid(&self) -> i32
The hadron PID.
Trait Implementations§
Source§impl Clone for PyMetaData
impl Clone for PyMetaData
Source§fn clone(&self) -> PyMetaData
fn clone(&self) -> PyMetaData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PyMetaData
impl Debug for PyMetaData
impl DerefToPyAny for PyMetaData
Source§impl<'a, 'py> FromPyObject<'a, 'py> for PyMetaDatawhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for PyMetaDatawhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for PyMetaData
impl<'py> IntoPyObject<'py> for PyMetaData
Source§type Target = PyMetaData
type Target = PyMetaData
Source§type Output = Bound<'py, <PyMetaData as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyMetaData as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for PyMetaData
impl PyClass for PyMetaData
Source§impl PyClassImpl for PyMetaData
impl PyClassImpl for PyMetaData
Source§const MODULE: Option<&str> = ::core::option::Option::None
const MODULE: Option<&str> = ::core::option::Option::None
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Grid metadata.
const RAW_DOC: &'static CStr = /// Grid metadata.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<PyMetaData as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<PyMetaData>
type Layout = <<PyMetaData as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<PyMetaData>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
Source§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for PyMetaData
impl PyClassNewTextSignature for PyMetaData
const TEXT_SIGNATURE: &'static str = "(set_desc, set_index, num_members, x_min, x_max, q_min, q_max, xsi_min, xsi_max, delta_min, delta_max, flavors, format, alphas_q_values=..., alphas_vals=..., polarised=False, set_type=..., interpolator_type=..., error_type=..., hadron_pid=2212, phys_params=...)"
Source§impl PyMethods<PyMetaData> for PyClassImplCollector<PyMetaData>
impl PyMethods<PyMetaData> for PyClassImplCollector<PyMetaData>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PyMetaData
impl PyTypeInfo for PyMetaData
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
Auto Trait Implementations§
impl Freeze for PyMetaData
impl RefUnwindSafe for PyMetaData
impl Send for PyMetaData
impl Sync for PyMetaData
impl Unpin for PyMetaData
impl UnsafeUnpin for PyMetaData
impl UnwindSafe for PyMetaData
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> ErasedDestructor for Twhere
T: 'static,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
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<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.