pub struct PyMandelstam(pub Mandelstam);Expand description
Mandelstam variables s, t, and u
By convention, the metric is chosen to be :math:(+---) and the variables are defined as follows
(ignoring factors of :math:c):
.. math:: s = (p_1 + p_2)^2 = (p_3 + p_4)^2
.. math:: t = (p_1 - p_3)^2 = (p_4 - p_2)^2
.. math:: u = (p_1 - p_4)^2 = (p_3 - p_2)^2
§Parameters
p1: list of int
The indices of particles to combine to create :math:p_1 in the diagram
p2: list of int
The indices of particles to combine to create :math:p_2 in the diagram
p3: list of int
The indices of particles to combine to create :math:p_3 in the diagram
p4: list of int
The indices of particles to combine to create :math:p_4 in the diagram
channel: {‘s’, ‘t’, ‘u’, ‘S’, ‘T’, ‘U’}
The Mandelstam channel to calculate
§Raises
Exception
If more than one particle list is empty
ValueError
If channel is not one of the valid options
§Notes
At most one of the input particles may be omitted by using an empty list. This will cause the calculation to use whichever equality listed above does not contain that particle.
By default, the first equality is used if no particle lists are empty.
Tuple Fields§
§0: MandelstamTrait Implementations§
Source§impl Clone for PyMandelstam
impl Clone for PyMandelstam
Source§fn clone(&self) -> PyMandelstam
fn clone(&self) -> PyMandelstam
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for PyMandelstam
impl<'de> Deserialize<'de> for PyMandelstam
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>,
Source§impl<'py> IntoPyObject<'py> for PyMandelstam
impl<'py> IntoPyObject<'py> for PyMandelstam
Source§type Target = PyMandelstam
type Target = PyMandelstam
Source§type Output = Bound<'py, <PyMandelstam as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyMandelstam 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 PyMandelstam
impl PyClass for PyMandelstam
Source§impl PyClassImpl for PyMandelstam
impl PyClassImpl for PyMandelstam
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 = /// Mandelstam variables s, t, and u
///
/// By convention, the metric is chosen to be :math:`(+---)` and the variables are defined as follows
/// (ignoring factors of :math:`c`):
///
/// .. math:: s = (p_1 + p_2)^2 = (p_3 + p_4)^2
///
/// .. math:: t = (p_1 - p_3)^2 = (p_4 - p_2)^2
///
/// .. math:: u = (p_1 - p_4)^2 = (p_3 - p_2)^2
///
/// Parameters
/// ----------
/// p1: list of int
/// The indices of particles to combine to create :math:`p_1` in the diagram
/// p2: list of int
/// The indices of particles to combine to create :math:`p_2` in the diagram
/// p3: list of int
/// The indices of particles to combine to create :math:`p_3` in the diagram
/// p4: list of int
/// The indices of particles to combine to create :math:`p_4` in the diagram
/// channel: {'s', 't', 'u', 'S', 'T', 'U'}
/// The Mandelstam channel to calculate
///
/// Raises
/// ------
/// Exception
/// If more than one particle list is empty
/// ValueError
/// If `channel` is not one of the valid options
///
/// Notes
/// -----
/// At most one of the input particles may be omitted by using an empty list. This will cause
/// the calculation to use whichever equality listed above does not contain that particle.
///
/// By default, the first equality is used if no particle lists are empty.
///
const RAW_DOC: &'static CStr = /// Mandelstam variables s, t, and u /// /// By convention, the metric is chosen to be :math:`(+---)` and the variables are defined as follows /// (ignoring factors of :math:`c`): /// /// .. math:: s = (p_1 + p_2)^2 = (p_3 + p_4)^2 /// /// .. math:: t = (p_1 - p_3)^2 = (p_4 - p_2)^2 /// /// .. math:: u = (p_1 - p_4)^2 = (p_3 - p_2)^2 /// /// Parameters /// ---------- /// p1: list of int /// The indices of particles to combine to create :math:`p_1` in the diagram /// p2: list of int /// The indices of particles to combine to create :math:`p_2` in the diagram /// p3: list of int /// The indices of particles to combine to create :math:`p_3` in the diagram /// p4: list of int /// The indices of particles to combine to create :math:`p_4` in the diagram /// channel: {'s', 't', 'u', 'S', 'T', 'U'} /// The Mandelstam channel to calculate /// /// Raises /// ------ /// Exception /// If more than one particle list is empty /// ValueError /// If `channel` is not one of the valid options /// /// Notes /// ----- /// At most one of the input particles may be omitted by using an empty list. This will cause /// the calculation to use whichever equality listed above does not contain that particle. /// /// By default, the first equality is used if no particle lists are empty. ///
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<PyMandelstam>
type ThreadChecker = SendablePyClass<PyMandelstam>
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>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for PyMandelstam
impl PyClassNewTextSignature for PyMandelstam
const TEXT_SIGNATURE: &'static str = "(p1, p2, p3, p4, channel)"
Source§impl PyClass__eq__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyClass__eq__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
Source§impl PyClass__ge__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyClass__ge__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
Source§impl PyClass__gt__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyClass__gt__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
Source§impl PyClass__le__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyClass__le__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
Source§impl PyClass__lt__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyClass__lt__SlotFragment<PyMandelstam> for PyClassImplCollector<PyMandelstam>
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder PyMandelstam
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder PyMandelstam
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut PyMandelstam
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut PyMandelstam
Source§impl PyMethods<PyMandelstam> for PyClassImplCollector<PyMandelstam>
impl PyMethods<PyMandelstam> for PyClassImplCollector<PyMandelstam>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PyMandelstam
impl PyTypeInfo for PyMandelstam
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>
Source§impl Serialize for PyMandelstam
impl Serialize for PyMandelstam
impl DerefToPyAny for PyMandelstam
Auto Trait Implementations§
impl Freeze for PyMandelstam
impl RefUnwindSafe for PyMandelstam
impl Send for PyMandelstam
impl Sync for PyMandelstam
impl Unpin for PyMandelstam
impl UnwindSafe for PyMandelstam
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§impl<T> FromPyObject<'_> for T
impl<T> FromPyObject<'_> for T
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'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§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
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.