[−][src]Struct pineappl::lumi::LumiEntry
This structure represens an entry of a luminosity function. Each entry consists of a tuple, which contains, in the following order, the PDG id of the first incoming parton, then the PDG id of the second parton, and finally a numerical factor that will multiply the result for this specific combination.
Implementations
impl LumiEntry
[src]
#[must_use]pub fn new(entry: Vec<(i32, i32, f64)>) -> Self
[src]
Constructor for LumiEntry
. Note that entry
must be non-empty, otherwise this function
panics.
Examples
Ordering of the arguments doesn't matter:
use pineappl::lumi::LumiEntry; let entry1 = LumiEntry::new(vec![(2, 2, 1.0), (4, 4, 1.0)]); let entry2 = LumiEntry::new(vec![(4, 4, 1.0), (2, 2, 1.0)]); // checks that the ordering doesn't matter assert_eq!(entry1, entry2);
Panics
Creating an entry with content panics:
ⓘThis example panics
use pineappl::lumi::LumiEntry; let _ = LumiEntry::new(vec![]);
#[must_use]pub fn equal_after_sort(lhs: &[Self], rhs: &[Self]) -> bool
[src]
Compares two vectors of LumiEntry
for equality after sorting them.
#[must_use]pub fn entry(&self) -> &[(i32, i32, f64)]
[src]
Returns a tuple representation of this entry.
Examples
use pineappl::lumi_entry; use pineappl::lumi::LumiEntry; let entry = lumi_entry![4, 4, 1.0; 2, 2, 1.0]; assert_eq!(entry.entry(), [(2, 2, 1.0), (4, 4, 1.0)]);
Trait Implementations
impl Clone for LumiEntry
[src]
impl Debug for LumiEntry
[src]
impl<'de> Deserialize<'de> for LumiEntry
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<LumiEntry> for LumiEntry
[src]
impl PartialOrd<LumiEntry> for LumiEntry
[src]
fn partial_cmp(&self, other: &LumiEntry) -> Option<Ordering>
[src]
fn lt(&self, other: &LumiEntry) -> bool
[src]
fn le(&self, other: &LumiEntry) -> bool
[src]
fn gt(&self, other: &LumiEntry) -> bool
[src]
fn ge(&self, other: &LumiEntry) -> bool
[src]
impl Serialize for LumiEntry
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for LumiEntry
[src]
Auto Trait Implementations
impl RefUnwindSafe for LumiEntry
impl Send for LumiEntry
impl Sync for LumiEntry
impl Unpin for LumiEntry
impl UnwindSafe for LumiEntry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,