Skip to main content

LMBext

Trait LMBext 

Source
pub trait LMBext {
Show 17 methods // Required methods fn generate_loop_momentum_bases_of<S: SubGraphLike>( &self, subgraph: &S, ) -> TiVec<LmbIndex, LoopMomentumBasis> where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>; fn generate_loop_momentum_bases(&self) -> TiVec<LmbIndex, LoopMomentumBasis>; fn replacement_impl<'a, S: SubSetLike, I>( &self, rep: impl Fn(EdgeIndex, Atom, Atom) -> Replacement, subgraph: &S, lmb: &LoopMomentumBasis, loop_symbol: Symbol, ext_symbol: Symbol, loop_args: &'a [I], ext_args: &'a [I], filter_pair: fn(&HedgePair) -> bool, emr_id: bool, ) -> Vec<Replacement> where &'a I: Into<AtomOrView<'a>>; fn lmb_impl<S: SubGraphLike + SubSetOps + ModifySubSet<HedgePair> + ModifySubSet<Hedge>>( &self, subgraph: &S, tree: &S, externals: S, ) -> LmbResult<LoopMomentumBasis> where S::Base: ModifySubSet<Hedge> + SubGraphLike; fn lmb_of<S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> LoopMomentumBasis; fn lmb(&self) -> LoopMomentumBasis; fn shrunken_sub_lmb( &self, outer: &SuBitGraph, shrunken: &InternalSubGraph, externals: SuBitGraph, parent_lmb: Option<&LoopMomentumBasis>, ) -> LmbResult<LoopMomentumBasis>; fn shrunken_lmb_of( &self, outer: &SuBitGraph, shrunken: &InternalSubGraph, ) -> LoopMomentumBasis; fn compatible_sub_lmb<S: SubGraphLike>( &self, subgraph: &S, externals: S::Base, lmb: &LoopMomentumBasis, ) -> LoopMomentumBasis where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>; fn empty_lmb(&self) -> LoopMomentumBasis; fn dot_lmb_of<S: SubGraphLike>( &self, subgraph: &S, lmb: &LoopMomentumBasis, ) -> String; // Provided methods fn uv_wrapped_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], ) -> Vec<Replacement> where &'a I: Into<AtomOrView<'a>> { ... } fn uv_spatial_wrapped_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], ) -> Vec<Replacement> where &'a I: Into<AtomOrView<'a>> { ... } fn normal_emr_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], filter_pair: fn(&HedgePair) -> bool, ) -> Vec<Replacement> where &'a I: Into<AtomOrView<'a>> { ... } fn integrand_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], ) -> Vec<Replacement> where &'a I: Into<AtomOrView<'a>> { ... } fn try_compatible_sub_lmb<S: SubGraphLike>( &self, subgraph: &S, externals: S::Base, lmb: &LoopMomentumBasis, ) -> LmbResult<LoopMomentumBasis> where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge> { ... } fn cotree_lmb<S: SubGraphLike + SubSetOps + SubGraphOps + ModifySubSet<HedgePair> + ModifySubSet<Hedge>>( &self, subgraph: &S, cotree: &S, externals: S, ) -> LoopMomentumBasis where S::Base: ModifySubSet<Hedge> + SubGraphLike { ... }
}
Expand description

Helpers for constructing loop-momentum bases and turning them into Symbolica replacement rules.

The replacement methods decompose an edge momentum into its loop-dependent and external-flow parts using a LoopMomentumBasis. The basis-building methods pick those signatures from spanning forests of a graph or subgraph.

Required Methods§

Source

fn generate_loop_momentum_bases_of<S: SubGraphLike>( &self, subgraph: &S, ) -> TiVec<LmbIndex, LoopMomentumBasis>
where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Enumerate all loop-momentum bases induced by spanning forests of subgraph.

Each spanning forest covering the same nodes as subgraph produces one basis. Empty subgraphs return an empty list.

Source

fn generate_loop_momentum_bases(&self) -> TiVec<LmbIndex, LoopMomentumBasis>

Enumerate all loop-momentum bases for the full graph.

Source

fn replacement_impl<'a, S: SubSetLike, I>( &self, rep: impl Fn(EdgeIndex, Atom, Atom) -> Replacement, subgraph: &S, lmb: &LoopMomentumBasis, loop_symbol: Symbol, ext_symbol: Symbol, loop_args: &'a [I], ext_args: &'a [I], filter_pair: fn(&HedgePair) -> bool, emr_id: bool, ) -> Vec<Replacement>
where &'a I: Into<AtomOrView<'a>>,

Core implementation shared by the public replacement constructors.

For each edge of subgraph whose [HedgePair] passes filter_pair, this computes the loop-dependent and external-flow atoms from lmb and passes them to rep.

rep is the final replacement builder: it receives the original edge id, the loop-dependent atom, and the external-flow atom, and returns the Replacement inserted into the result vector.

loop_symbol and ext_symbol select the function symbol used for the generated loop and external terms, while loop_args and ext_args are appended to those function calls. When emr_id is true, the generated loop/external indices are the concrete edge ids stored in the basis; otherwise they are the compact loop/external basis positions.

Source

fn lmb_impl<S: SubGraphLike + SubSetOps + ModifySubSet<HedgePair> + ModifySubSet<Hedge>>( &self, subgraph: &S, tree: &S, externals: S, ) -> LmbResult<LoopMomentumBasis>
where S::Base: ModifySubSet<Hedge> + SubGraphLike,

Build a loop-momentum basis for subgraph using tree as the spanning forest guide and externals as the external-flow carriers.

tree must cover the same nodes as subgraph. externals must only contain nodes from subgraph; it chooses which external edges are treated as true external flows and which one in each connected component becomes the dependent external.

Source

fn lmb_of<S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> LoopMomentumBasis

Construct one canonical loop-momentum basis for subgraph.

This uses subgraph itself as the forest guide and the full crown of the subgraph as its external carriers.

Source

fn lmb(&self) -> LoopMomentumBasis

Construct the canonical loop-momentum basis for the full graph.

Source

fn shrunken_sub_lmb( &self, outer: &SuBitGraph, shrunken: &InternalSubGraph, externals: SuBitGraph, parent_lmb: Option<&LoopMomentumBasis>, ) -> LmbResult<LoopMomentumBasis>

Build the LMB for outer - shrunken while each connected component of shrunken acts as a contracted passage node. When supplied, the parent LMB selects a compatible subset of its loop carriers on the contracted topology instead of independently choosing a canonical basis.

Source

fn shrunken_lmb_of( &self, outer: &SuBitGraph, shrunken: &InternalSubGraph, ) -> LoopMomentumBasis

Construct the canonical shrunken-subgraph LMB using the full crown of outer as external-flow carriers.

Source

fn compatible_sub_lmb<S: SubGraphLike>( &self, subgraph: &S, externals: S::Base, lmb: &LoopMomentumBasis, ) -> LoopMomentumBasis
where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Construct a basis for subgraph that reuses loop edges from lmb whenever the induced cut still spans the same connected components.

This is used when descending into a subgraph while keeping its loop variables compatible with a parent basis.

Source

fn empty_lmb(&self) -> LoopMomentumBasis

Return the empty basis with no loop or external generators.

Source

fn dot_lmb_of<S: SubGraphLike>( &self, subgraph: &S, lmb: &LoopMomentumBasis, ) -> String

Render a DOT graph whose edge labels show the explicit momentum carried by each edge according to lmb.

Provided Methods§

Source

fn uv_wrapped_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], ) -> Vec<Replacement>
where &'a I: Into<AtomOrView<'a>>,

Replace EMRmom(edge, ..) by a UV-recursion-friendly decomposition.

The loop-dependent part stays wrapped in EMRmom(...), but its index is rewritten from the concrete edge id to the loop-basis edge selected by lmb. The external-flow contribution is added explicitly.

Source

fn uv_spatial_wrapped_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], ) -> Vec<Replacement>
where &'a I: Into<AtomOrView<'a>>,

Spatial-vector variant of Self::uv_wrapped_replacement.

This uses Q3 for both the matched pattern and the wrapped loop contribution, preserving the represented or indexed Minkowski structure on every routed basis vector. Explicit components use Q(edge,cind(i)).

Source

fn normal_emr_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], filter_pair: fn(&HedgePair) -> bool, ) -> Vec<Replacement>
where &'a I: Into<AtomOrView<'a>>,

Replace EMRmom(edge, ..) by the explicit loop-plus-external momentum carried by that edge.

filter_pair can restrict which edge kinds are rewritten, for example to skip split or unpaired half-edge pairs in contexts that only want full propagators.

Source

fn integrand_replacement<'a, S: SubSetLike, I>( &self, subgraph: &S, lmb: &LoopMomentumBasis, rep_args: &'a [I], ) -> Vec<Replacement>
where &'a I: Into<AtomOrView<'a>>,

Replace EMRmom(edge, ..) by the integrand momentum variables K(...) + P(...), i.e. GS.loop_mom(...) + GS.external_mom(...).

Unlike the UV-wrapped replacements, the generated terms are expressed in the loop/external variable families used in the integrand rather than in EMRmom.

Source

fn try_compatible_sub_lmb<S: SubGraphLike>( &self, subgraph: &S, externals: S::Base, lmb: &LoopMomentumBasis, ) -> LmbResult<LoopMomentumBasis>
where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Fallible form of Self::compatible_sub_lmb for callers that must handle an unavailable parent-compatible basis without panicking. The default preserves compatibility with external trait implementations that only implement the original infallible method.

Source

fn cotree_lmb<S: SubGraphLike + SubSetOps + SubGraphOps + ModifySubSet<HedgePair> + ModifySubSet<Hedge>>( &self, subgraph: &S, cotree: &S, externals: S, ) -> LoopMomentumBasis
where S::Base: ModifySubSet<Hedge> + SubGraphLike,

Construct a basis from a chosen cotree of subgraph.

The cotree is converted into the corresponding tree by subtracting it from subgraph, then forwarded to Self::lmb_impl.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<E, V, H> LMBext for HedgeGraph<E, V, H>

Source§

fn lmb_impl<S: SubGraphLike + SubSetOps + ModifySubSet<HedgePair> + ModifySubSet<Hedge>>( &self, subgraph: &S, forest_guide: &S, externals: S, ) -> LmbResult<LoopMomentumBasis>
where S::Base: ModifySubSet<Hedge> + SubGraphLike,

The true externals (that will flow through the graph (i.e. not dummy)) are those that are both in the subgraph and in the externals

Source§

fn empty_lmb(&self) -> LoopMomentumBasis

Source§

fn lmb(&self) -> LoopMomentumBasis

Source§

fn shrunken_sub_lmb( &self, outer: &SuBitGraph, shrunken: &InternalSubGraph, externals: SuBitGraph, parent_lmb: Option<&LoopMomentumBasis>, ) -> LmbResult<LoopMomentumBasis>

Source§

fn shrunken_lmb_of( &self, outer: &SuBitGraph, shrunken: &InternalSubGraph, ) -> LoopMomentumBasis

Source§

fn dot_lmb_of<S: SubGraphLike>( &self, subgraph: &S, lmb: &LoopMomentumBasis, ) -> String

Source§

fn lmb_of<S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> LoopMomentumBasis

Source§

fn compatible_sub_lmb<S: SubGraphLike>( &self, subgraph: &S, externals: S::Base, lmb: &LoopMomentumBasis, ) -> LoopMomentumBasis
where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Source§

fn try_compatible_sub_lmb<S: SubGraphLike>( &self, subgraph: &S, externals: S::Base, lmb: &LoopMomentumBasis, ) -> LmbResult<LoopMomentumBasis>
where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Source§

fn generate_loop_momentum_bases_of<S: SubGraphLike>( &self, subgraph: &S, ) -> TiVec<LmbIndex, LoopMomentumBasis>
where S::Base: SubGraphLike<Base = S::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Source§

fn generate_loop_momentum_bases(&self) -> TiVec<LmbIndex, LoopMomentumBasis>

Source§

fn replacement_impl<'a, S: SubSetLike, I>( &self, rep: impl Fn(EdgeIndex, Atom, Atom) -> Replacement, subgraph: &S, lmb: &LoopMomentumBasis, loop_symbol: Symbol, ext_symbol: Symbol, loop_args: &'a [I], ext_args: &'a [I], filter_pair: fn(&HedgePair) -> bool, emr_id: bool, ) -> Vec<Replacement>
where &'a I: Into<AtomOrView<'a>>,

Implementors§