pub struct GenerationOptions { /* private fields */ }Implementations§
Source§impl GenerationOptions
impl GenerationOptions
pub fn with_loop_count( self, minimum: usize, maximum: usize, ) -> Result<Self, ProcessError>
pub fn symmetrize_initial(self, enabled: bool) -> Self
pub fn symmetrize_final(self, enabled: bool) -> Self
pub fn symmetrize_left_right(self, enabled: bool) -> Self
Sourcepub fn symmetrize_external_fermions(self, enabled: bool) -> Self
pub fn symmetrize_external_fermions(self, enabled: bool) -> Self
Include amplitude fermions and ghosts (anticommuting legs) in enabled external-state symmetry classes.
This is disabled by default. Cross-section symmetry is unchanged by this amplitude-specific policy switch.
pub fn loop_count(&self) -> RangeInclusive<usize>
pub fn symmetrizes_initial(&self) -> bool
pub fn symmetrizes_final(&self) -> bool
pub fn symmetrizes_left_right(&self) -> bool
Sourcepub fn grouping(&self) -> &NumeratorGrouping
pub fn grouping(&self) -> &NumeratorGrouping
The requested numerator grouping.
use feynkit_generator::{GenerationOptions, NumeratorGrouping};
let options = GenerationOptions::default().numerator_grouping(NumeratorGrouping::None);
assert!(matches!(options.grouping(), NumeratorGrouping::None));pub fn symmetrizes_external_fermions(&self) -> bool
Source§impl GenerationOptions
impl GenerationOptions
Sourcepub fn threads(self, threads: usize) -> Self
pub fn threads(self, threads: usize) -> Self
Set the generation thread count. One runs serially on the calling thread, including numerator preparation and grouping, without creating a Rayon pool.
pub fn max_vertices(self, max_vertices: usize) -> Self
pub fn allow_self_loops(self, allow: bool) -> Self
pub fn allow_zero_flow_edges(self, allow: bool) -> Self
pub fn with_graph_filter(self, filter: GenerationFilter) -> Self
pub fn with_cut_amplitude_filter(self, filter: GenerationFilter) -> Self
pub fn with_scoped_filter( self, scope: FilterScope, filter: GenerationFilter, ) -> Self
pub fn filters(&self, scope: FilterScope) -> &[GenerationFilter]
Sourcepub fn may_filter_covariant_partners(&self) -> bool
pub fn may_filter_covariant_partners(&self) -> bool
Whether selection can remove diagrams within a complete covariant sector. Complete loop and coupling orders preserve the partner sum; selecting particular diagrams or restricting their particle content need not.
pub fn numerator_grouping(self, grouping: NumeratorGrouping) -> Self
Sourcepub fn filter_zero_color(self, enabled: bool) -> Self
pub fn filter_zero_color(self, enabled: bool) -> Self
Remove diagrams whose numerators vanish under color algebra. Disabled by default; unproved zeros are retained.
pub fn graph_prefix(self, prefix: impl Into<String>) -> Self
Sourcepub fn select_diagrams<I, S>(self, names: I) -> Self
pub fn select_diagrams<I, S>(self, names: I) -> Self
Retain only diagrams with one of the finalized deterministic names.
Sourcepub fn select_diagram_ids<I>(self, ids: I) -> Selfwhere
I: IntoIterator<Item = DiagramId>,
pub fn select_diagram_ids<I>(self, ids: I) -> Selfwhere
I: IntoIterator<Item = DiagramId>,
Retain only diagrams with one of the stable content-derived IDs.
Sourcepub fn veto_diagrams<I, S>(self, names: I) -> Self
pub fn veto_diagrams<I, S>(self, names: I) -> Self
Remove diagrams with one of the finalized deterministic names.
Sourcepub fn veto_diagram_ids<I>(self, ids: I) -> Selfwhere
I: IntoIterator<Item = DiagramId>,
pub fn veto_diagram_ids<I>(self, ids: I) -> Selfwhere
I: IntoIterator<Item = DiagramId>,
Remove diagrams with one of the stable content-derived IDs.
Sourcepub fn with_loop_momentum_basis<I>(self, diagram: DiagramId, edges: I) -> Selfwhere
I: IntoIterator<Item = EdgeId>,
pub fn with_loop_momentum_basis<I>(self, diagram: DiagramId, edges: I) -> Selfwhere
I: IntoIterator<Item = EdgeId>,
Select the ordered independent edges for one finalized diagram.
Numerator grouping compares diagrams in their default routing, so the basis applies to the diagram when it is a group master. Generation fails when grouping merges the diagram into another master. A target that matches no generated diagram is an error. Ordinary graph filters can still remove a diagram before it becomes a representative.
Sourcepub fn with_named_loop_momentum_basis<I>(
self,
diagram: impl Into<String>,
edges: I,
) -> Selfwhere
I: IntoIterator<Item = EdgeId>,
pub fn with_named_loop_momentum_basis<I>(
self,
diagram: impl Into<String>,
edges: I,
) -> Selfwhere
I: IntoIterator<Item = EdgeId>,
Select a routing using the display name convenience key.
The grouping rule of Self::with_loop_momentum_basis applies.
Sourcepub fn forced_cuts<I, C>(self, cuts: I) -> Self
pub fn forced_cuts<I, C>(self, cuts: I) -> Self
Retain only the listed physical cut-edge sets before diagram grouping.
Sourcepub fn numerator_prefactor(self, prefactor: Atom) -> Self
pub fn numerator_prefactor(self, prefactor: Atom) -> Self
Multiply every generated numerator by an application-independent factor.
Sourcepub fn projector(self, projector: Atom) -> Self
pub fn projector(self, projector: Atom) -> Self
Override the automatically generated external-state projector.
Passing 1 explicitly disables automatic external-state contractions.
Leaving the option unset generates each external wavefunction and, for
cross sections, sums paired initial colors without averaging. Unsewn
amplitude color ports stay open. A supplied projector replaces this
complete automatic projector.
Wavefunction, momentum and represented index owners refer to process
external-leg labels; local tensor slots use the native one-based UFO frame.
pub fn cancellation_token(self, token: CancellationToken) -> Self
Sourcepub fn cancellation_check(
self,
check: impl Fn() -> bool + Send + Sync + 'static,
) -> Self
pub fn cancellation_check( self, check: impl Fn() -> bool + Send + Sync + 'static, ) -> Self
Poll an application-owned cancellation source during every generation stage.
pub fn progress( self, callback: impl Fn(GenerationProgress) -> GenerationControl + Send + Sync + 'static, ) -> Self
Sourcepub fn filter(
self,
callback: impl Fn(&Graph<NodeColor, EdgeColor>, usize) -> bool + Send + Sync + 'static,
) -> Self
pub fn filter( self, callback: impl Fn(&Graph<NodeColor, EdgeColor>, usize) -> bool + Send + Sync + 'static, ) -> Self
Prune partial topologies during enumeration. The first completed_vertices
nodes have all their incident edges assigned; the rest may still grow.
For amplitudes, enumeration already identifies graphs related by a permutation of interchangeable external legs (initial-, final- and left/right symmetrization), and the callback sees one labelling of each orbit. It must then give the same answer for every labelling that such a permutation relates; otherwise the retained set depends on the labelling that enumeration happens to present. Cross sections enumerate with exact external labels and identify permuted or exchanged sides only later, during grouping, so the callback sees every labelling there.
Trait Implementations§
Source§impl<'de, __Context> BorrowDecode<'de, __Context> for GenerationOptions
impl<'de, __Context> BorrowDecode<'de, __Context> for GenerationOptions
Source§fn borrow_decode<D: BorrowDecoder<'de, Context = __Context>>(
decoder: &mut D,
) -> Result<Self, DecodeError>
fn borrow_decode<D: BorrowDecoder<'de, Context = __Context>>( decoder: &mut D, ) -> Result<Self, DecodeError>
Source§impl Clone for GenerationOptions
impl Clone for GenerationOptions
Source§fn clone(&self) -> GenerationOptions
fn clone(&self) -> GenerationOptions
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 GenerationOptions
impl Debug for GenerationOptions
Source§impl<Context> Decode<Context> for GenerationOptions
impl<Context> Decode<Context> for GenerationOptions
Source§impl Default for GenerationOptions
impl Default for GenerationOptions
Source§impl<'de> Deserialize<'de> for GenerationOptions
impl<'de> Deserialize<'de> for GenerationOptions
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 Encode for GenerationOptions
impl Encode for GenerationOptions
impl Eq for GenerationOptions
Source§impl PartialEq for GenerationOptions
impl PartialEq for GenerationOptions
Auto Trait Implementations§
impl !RefUnwindSafe for GenerationOptions
impl !UnwindSafe for GenerationOptions
impl Freeze for GenerationOptions
impl Send for GenerationOptions
impl Sync for GenerationOptions
impl Unpin for GenerationOptions
impl UnsafeUnpin for GenerationOptions
Blanket Implementations§
§impl<T> AtomComponentOptimizable<()> for T
impl<T> AtomComponentOptimizable<()> for T
fn optimize_atom_components(self) -> T
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§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).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.