Skip to main content

Graph

Struct Graph 

Source
pub struct Graph {
    pub overall_factor: Atom,
    pub name: String,
    pub group_id: Option<GroupId>,
    pub is_group_master: bool,
    pub tree_edges: SuBitGraph,
    pub underlying: HedgeGraph<Edge, Vertex, HedgeData>,
    pub loop_momentum_basis: LoopMomentumBasis,
    pub param_builder: ParamBuilder,
    pub global_prefactor: GlobalPrefactor,
    pub surface_cache: SurfaceCache,
    pub initial_state_cut: OrientedCut,
    pub polarizations: Vec<(PolDef, Atom)>,
}

Fields§

§overall_factor: Atom§name: String§group_id: Option<GroupId>§is_group_master: bool§tree_edges: SuBitGraph§underlying: HedgeGraph<Edge, Vertex, HedgeData>§loop_momentum_basis: LoopMomentumBasis§param_builder: ParamBuilder§global_prefactor: GlobalPrefactor§surface_cache: SurfaceCache§initial_state_cut: OrientedCut

The cross section initial state cut Only relevant for cross sections, but stored here for the parsing

§polarizations: Vec<(PolDef, Atom)>

Implementations§

Source§

impl Graph

Source

pub fn cff<S: SubGraphLike + SubSetLike>( &mut self, contract_subgraph: &S, cutset: &CutSet, orientation_pattern: &OrientationPattern, ) -> Result<CutCFF>

Source§

impl Graph

Source

pub fn to_dot_graph_with_settings( &self, settings: &DotExportSettings, ) -> DotGraph

Source

pub fn to_split_dotgraph(&self) -> DotGraph

Source§

impl Graph

Source

pub fn dot_serialize(&self, settings: &DotExportSettings) -> String

Source

pub fn dot_serialize_fmt( &self, writer: &mut impl Write, settings: &DotExportSettings, ) -> Result<(), Error>

Source

pub fn from_dot(graph: DotGraph, model: &Model) -> Result<Self>

Source

pub fn from_file<P>(p: P, model: &Model) -> Result<Vec<Self>>
where P: AsRef<Path>,

Source

pub fn from_path<P>(p: P, model: &Model) -> Result<Vec<Self>>
where P: AsRef<Path>,

Source

pub fn from_string<Str: AsRef<str>>(s: Str, model: &Model) -> Result<Vec<Self>>

Source§

impl Graph

Source

pub fn debug_dot(&self) -> String

Source

pub fn debug_dot_with_settings(&self, settings: &DotExportSettings) -> String

Source

pub fn pretty_dot(&self) -> String

Source

pub fn get_edges_in_initial_state_cut(&self) -> Vec<EdgeIndex>

Source§

impl Graph

Source

pub fn generate_polarizations(&self) -> Atom

Source

pub fn generate_polarization_params(&self) -> Vec<Atom>

Methods from Deref<Target = HedgeGraph<Edge, Vertex, HedgeData>>§

pub fn check(&self) -> Result<(), HedgeGraphError>

pub fn concretize<'a, S>( &'a self, subgraph: &'a S, ) -> HedgeGraph<&'a E, &'a V, &'a H, <N as NodeStorageOps>::OpStorage<&'a V>>
where S: SubSetLike,

Creates a new HedgeGraph instance representing a “concretized” view of a given subgraph.

This method effectively extracts the specified subgraph into a new, independent graph. The new graph contains copies of the nodes and edges (and their data via references) that are part of the subgraph.

Node and edge data in the new graph are references (&'a V, &'a E) to the data in the original graph.

§Parameters
  • subgraph: A reference to a subgraph S within the current graph.
§Returns

A new HedgeGraph containing only the elements of the subgraph. The node storage type of the new graph is N::OpStorage<&'a V>.

pub fn inv(&self, hedge: Hedge) -> Hedge

Gives the involved hedge. Returns the opposite (or “twin”) half-edge of the given hedge.

  • If hedge is part of a paired edge, this returns its sibling half-edge.
  • If hedge is an identity (unpaired) half-edge, it returns itself.
§Parameters
  • hedge: The half-edge for which to find the opposite.
§Returns

The opposite Hedge.

pub fn is_connected<S>(&self, subgraph: &S) -> bool
where S: SubGraphLike,

Checks if the specified subgraph is connected.

A subgraph is connected if there is a path between any two half-edges (or nodes they are incident to) within that subgraph, using only edges also within the subgraph.

§Parameters
  • subgraph: The subgraph S to check for connectivity.
§Returns

true if the subgraph is connected, false otherwise. Returns true for an empty subgraph.

§Panics

Panics if the traversal (used internally) fails, which can happen if the starting node for traversal is not part of the subgraph.

pub fn cut_branches(&self, subgraph: &mut HedgeNode)

Modifies a [HedgeNode] subgraph by removing “branches” or “tendrils”.

A branch is typically a path of edges within the subgraph that ultimately connects to the rest of the subgraph at only one point (one node with degree > 1 within the branch, relative to other branch edges). This operation iteratively removes edges that are part of such terminal paths until no more such branches exist.

It first removes purely external edges from the subgraph’s internal part, then iteratively prunes edges that form degree-1 connections within the subgraph’s context. Finally, it fixes the hairs of the HedgeNode to be consistent.

§Parameters
  • subgraph: A mutable reference to the HedgeNode to be pruned.

pub fn internal_crown<S>(&self, subgraph: &S) -> <S as SubSetLike>::Base
where S: SubSetLike, <S as SubSetLike>::Base: ModifySubSet<HedgePair>,

Calculates the “internal crown” of a given subgraph.

The internal crown consists of all half-edges within the subgraph that are either unpaired (dangling/external) or part of a “split” edge (i.e., their opposite half-edge is not in the subgraph). These are effectively the boundary half-edges of the subgraph from its own perspective.

§Parameters
  • subgraph: The subgraph S for which to find the internal crown.
§Returns

A new subgraph of type S::Base containing the internal crown half-edges. S::Base must implement ModifySubgraph<HedgePair>.

pub fn full_crown<S>(&self, subgraph: &S) -> <S as SubSetLike>::Base
where S: SubSetLike, <S as SubSetLike>::Base: ModifySubSet<Hedge>,

Calculates the “full crown” of a given subgraph.

The full crown consists of all half-edges that are incident to any node touched by the subgraph, provided that these half-edges are either unpaired (identity) or their opposite half-edge is not included in the subgraph.

This is different from internal_crown as it considers all incident edges to nodes in the subgraph’s footprint, not just edges within the subgraph itself. It might include edges not present in the initial subgraph.

§Parameters
  • subgraph: The subgraph S for which to find the full crown.
§Returns

A new subgraph of type S::Base containing the full crown half-edges. S::Base must implement ModifySubgraph<Hedge>.

pub fn add_crown<S>(&self, subgraph: &mut S)
where S: ModifySubSet<Hedge> + SubSetLike,

Add all half-edges that are incident to any node touched by the subgraph, provided that these half-edges are either unpaired (identity) or their opposite half-edge is not included in the subgraph.

pub fn external_filter<S>(&self) -> S
where S: ModifySubSet<Hedge> + SubSetLike,

Creates a SuBitGraph representing a subgraph containing all external (identity/dangling) half-edges in the entire graph.

§Returns

A SuBitGraph where bits corresponding to external half-edges are set to true.

pub fn full_filter(&self) -> SubSet<Hedge>

Creates a SuBitGraph representing a subgraph containing all half-edges in the graph.

§Returns

A SuBitGraph of length self.n_hedges() with all bits set to true.

pub fn full(&self) -> FullOrEmpty

Returns a [FullOrEmpty] subgraph representing the entire graph (all hedges included).

pub fn empty(&self) -> FullOrEmpty

Returns a [FullOrEmpty] subgraph representing an empty graph (no hedges included).

pub fn clean_subgraph(&self, filter: SubSet<Hedge>) -> InternalSubGraph

Creates an [InternalSubGraph] from a SuBitGraph filter, ensuring it has no “hairs”.

This uses a “pessimistic” approach: an edge is included only if both its half-edges are set in the input filter. Dangling edges are removed.

§Parameters
  • filter: A SuBitGraph representing the desired set of half-edges.
§Returns

A new InternalSubGraph.

pub fn full_node(&self) -> HedgeNode

Returns a [HedgeNode] that represents the entire graph. The internal_graph of this HedgeNode will include all internal edges, and its hairs will include all external (dangling) edges of the graph.

pub fn full_graph(&self) -> InternalSubGraph

Returns an [InternalSubGraph] that includes all fully internal edges of the graph. External (dangling) edges are excluded.

pub fn empty_subgraph<S>(&self) -> S
where S: SubSetLike,

Creates an empty subgraph of a specific type S.

§Type Parameters
  • S: The type of subgraph to create, must implement SubGraph.
§Returns

A new, empty subgraph of type S, sized for this graph.

pub fn from_filter<S>(&self, filter: impl FnMut(&E) -> bool) -> S
where S: BaseSubgraph, <S as SubSetLike>::Base: SubSetOps,

Creates a subgraph of type S by filtering edges based on their data.

§Type Parameters
  • S: The type of subgraph to create, must implement BaseSubgraph.
§Parameters
  • filter: A closure that takes edge data &E and returns true if the edge should be included in the subgraph.
§Returns

A new subgraph of type S.

pub fn nesting_node_from_subgraph( &self, internal_graph: InternalSubGraph, ) -> HedgeNode

Creates a [HedgeNode] from a given [InternalSubGraph].

The internal_graph of the new HedgeNode is the one provided. The hairs of the HedgeNode are calculated as all half-edges incident to the internal_graph that are not part of the internal_graph itself.

§Parameters
  • internal_graph: The InternalSubGraph to form the core of the HedgeNode.
§Panics

Panics if the provided internal_graph is not valid for this graph (e.g., if it refers to hedges outside the graph’s bounds or is not truly internal).

pub fn remove_internal_hedges(&self, subgraph: &SubSet<Hedge>) -> SubSet<Hedge>

pub fn count_internal_edges<S>(&self, subgraph: &S) -> usize
where S: SubSetLike,

Counts the number of full internal edges within the given subgraph.

An edge is considered internal if both its half-edges are included in the subgraph. This method avoids double-counting by only counting an edge once.

§Parameters
  • subgraph: The subgraph S in which to count internal edges.
§Returns

The number of full internal edges.

pub fn n_hedges(&self) -> usize

Returns the total number of half-edges in the graph.

pub fn n_edges(&self) -> usize

pub fn n_nodes(&self) -> usize

Returns the total number of nodes in the graph.

pub fn n_externals(&self) -> usize

Returns the number of external (dangling/identity) half-edges in the graph.

pub fn n_internals(&self) -> usize

Returns the number of internal (paired) half-edges in the graph. Note that this counts half-edges, so a single full internal edge contributes 2 to this count.

pub fn number_of_nodes_in_subgraph<S>(&self, subgraph: &S) -> usize
where S: SubSetLike,

Counts the number of distinct nodes that are incident to at least one half-edge in the given subgraph.

§Parameters
  • subgraph: The subgraph S to consider.
§Returns

The number of unique nodes touched by the subgraph.

pub fn node_degrees_in_subgraph( &self, subgraph: &InternalSubGraph, ) -> AHashMap<NodeIndex, usize>

Calculates the degree of each node within the context of a given InternalSubGraph.

The degree of a node in this context is the number of half-edges from the subgraph that are incident to that node.

§Parameters
  • subgraph: The InternalSubGraph to calculate node degrees from.
§Returns

An AHashMap mapping each NodeIndex (for nodes involved in the subgraph) to its degree within that subgraph.

pub fn owned_neighbors<S>(&self, subgraph: &S, pos: Hedge) -> SubSet<Hedge>
where S: SubGraphLike,

including pos

pub fn connected_neighbors<S>( &self, subgraph: &S, pos: Hedge, ) -> Option<SubSet<Hedge>>
where S: SubGraphLike,

pub fn get_edge_data(&self, edge: Hedge) -> &E

pub fn hedge_pair(&self, hedge: Hedge) -> HedgePair

pub fn get_edge_data_full(&self, hedge: Hedge) -> EdgeData<&E>

pub fn flow(&self, hedge: Hedge) -> Flow

Gives the underlying orientation of this half-edge.

pub fn superficial_hedge_orientation(&self, hedge: Hedge) -> Option<Flow>

pub fn underlying_hedge_orientation(&self, hedge: Hedge) -> Flow

pub fn neighbors(&self, hedge: Hedge) -> <N as NodeStorage>::NeighborsIter<'_>

pub fn iter_crown(&self, id: NodeIndex) -> <N as NodeStorage>::NeighborsIter<'_>

pub fn iter_crown_in<'a, S>( &'a self, subgraph: &'a S, id: NodeIndex, ) -> impl Iterator<Item = Hedge> + 'a
where S: SubSetLike,

pub fn id_from_crown<'a>( &'a self, neighbors: <N as NodeStorage>::NeighborsIter<'a>, ) -> Option<NodeIndex>

pub fn involved_node_crown( &self, hedge: Hedge, ) -> Option<<N as NodeStorage>::NeighborsIter<'_>>

pub fn involved_node_id(&self, hedge: Hedge) -> Option<NodeIndex>

pub fn node_id(&self, hedge: Hedge) -> NodeIndex

pub fn is_self_loop(&self, hedge: Hedge) -> bool

pub fn is_dangling(&self, hedge: Hedge) -> bool

pub fn nodes<S>(&self, subgraph: &S) -> Vec<NodeIndex>
where S: SubSetLike,

Collect all nodes in the subgraph (all nodes that the hedges are connected to)

pub fn edges<S>(&self, subgraph: &S) -> Vec<EdgeIndex>
where S: SubSetLike,

Collect all edges in the subgraph (This is without double counting, i.e. if two half-edges are part of the same edge, only one EdgeIndex will be collected)

pub fn paired_edges<S>(&self, subgraph: &S) -> Vec<EdgeIndex>
where S: SubSetLike,

Collect all edges in the subgraph (This is without double counting, i.e. if two half-edges are part of the same edge, only one EdgeIndex will be collected)

pub fn map_data_ref<'a, E2, V2, H2>( &'a self, node_map: impl FnMut(&'a HedgeGraph<E, V, H, N>, <N as NodeStorage>::NeighborsIter<'a>, &'a V) -> V2, edge_map: impl FnMut(&'a HedgeGraph<E, V, H, N>, EdgeIndex, HedgePair, EdgeData<&'a E>) -> EdgeData<E2>, hedge_map: impl FnMut(Hedge, &'a H) -> H2, ) -> HedgeGraph<E2, V2, H2, <N as NodeStorageOps>::OpStorage<V2>>

pub fn to_ref( &self, ) -> HedgeGraph<&E, &V, &H, <N as NodeStorageOps>::OpStorage<&V>>

pub fn map_data_ref_result<'a, E2, V2, H2, Er>( &'a self, node_map: impl FnMut(&'a HedgeGraph<E, V, H, N>, <N as NodeStorage>::NeighborsIter<'a>, &'a V) -> Result<V2, Er>, edge_map: impl FnMut(&'a HedgeGraph<E, V, H, N>, EdgeIndex, HedgePair, EdgeData<&'a E>) -> Result<EdgeData<E2>, Er>, hedge_map: impl FnMut((Hedge, &'a H)) -> Result<H2, Er>, ) -> Result<HedgeGraph<E2, V2, H2, <N as NodeStorageOps>::OpStorage<V2>>, Er>

pub fn just_structure( &self, ) -> HedgeGraph<(), (), (), <N as NodeStorageOps>::OpStorage<()>>

pub fn map_nodes_ref<'a, V2>( &'a self, f: impl FnMut(&'a HedgeGraph<E, V, H, N>, <N as NodeStorage>::NeighborsIter<'a>, &'a V) -> V2, ) -> HedgeGraph<&'a E, V2, &'a H, <N as NodeStorageOps>::OpStorage<V2>>

pub fn new_smart_hedgevec<T>( &self, f: &impl Fn(HedgePair, EdgeData<&E>) -> EdgeData<T>, ) -> SmartEdgeVec<T>

pub fn new_edgevec<T>( &self, f: impl FnMut(&E, EdgeIndex, &HedgePair) -> T, ) -> EdgeVec<T>

pub fn new_nodevec<'a, T>( &'a self, f: impl FnMut(NodeIndex, <N as NodeStorage>::NeighborsIter<'a>, &'a V) -> T, ) -> NodeVec<T>

pub fn new_hedgevec<T>(&self, f: impl FnMut(Hedge, &H) -> T) -> HedgeVec<T>

pub fn new_edgevec_from_iter<T, I>( &self, iter: I, ) -> Result<EdgeVec<T>, HedgeGraphError>
where I: IntoIterator<Item = T>,

pub fn non_cut_edges(&self) -> AHashSet<SubSet<Hedge>>

all sets of full edges that do not disconnect the graph/ increase its connected components

pub fn non_bridges(&self) -> SubSet<Hedge>

pub fn non_bridges_of<S>(&self, subgraph: &S) -> SubSet<Hedge>
where S: SubSetLike<Base = SubSet<Hedge>> + SubGraphLike,

pub fn bridges_of<S>(&self, subgraph: &S) -> SubSet<Hedge>
where S: SubSetLike<Base = SubSet<Hedge>> + SubGraphLike,

pub fn bridges(&self) -> SubSet<Hedge>

pub fn combine_to_single_hedgenode(&self, source: &[NodeIndex]) -> HedgeNode

pub fn all_cuts_from_ids( &self, source: &[NodeIndex], target: &[NodeIndex], ) -> Vec<(SubSet<Hedge>, OrientedCut, SubSet<Hedge>)>
where N: NodeStorageOps,

pub fn tadpoles(&self, externals: &[NodeIndex]) -> Vec<SubSet<Hedge>>

pub fn all_bonds<R>(&self, size: &R) -> Vec<SubSet<Hedge>>
where R: RangeBounds<usize>,

pub fn a_bond( &self, cond: &impl Fn(&SubSet<Hedge>) -> bool, ) -> Option<SubSet<Hedge>>

pub fn all_bonds_of<S, R>(&self, subgraph: &S, size: &R) -> Vec<SubSet<Hedge>>
where S: SubGraphLike<Base = SubSet<Hedge>>, R: RangeBounds<usize>,

pub fn a_bond_of<S>( &self, subgraph: &S, cond: &impl Fn(&SubSet<Hedge>) -> bool, ) -> Option<SubSet<Hedge>>
where S: SubGraphLike<Base = SubSet<Hedge>>,

pub fn all_cuts( &self, source: HedgeNode, target: HedgeNode, ) -> Vec<(SubSet<Hedge>, OrientedCut, SubSet<Hedge>)>
where N: NodeStorageOps,

pub fn all_s_t_cuts_impl<S>( &self, subgraph: &S, s_connectivity: usize, s: HedgeNode, t: &HedgeNode, t_connectivity: usize, regions: &mut AHashSet<HedgeNode>, )
where S: SubSetLike<Base = SubSet<Hedge>>,

pub fn all_spanning_forests_of<S>( &self, subgraph: &S, ) -> Vec<<S as SubSetLike>::Base>
where S: SubGraphLike, <N as NodeStorageOps>::OpStorage<&'a V>: for<'a> Clone, <S as SubSetLike>::Base: SubSetLike<Base = <S as SubSetLike>::Base> + SubSetOps + Clone + ModifySubSet<HedgePair> + ModifySubSet<Hedge>,

Gives all subgraphs corresponding to all the spanning trees of the graph.

See Winter, Pawel, “An Algorithm for the Enumeration of Spanning Trees,” BIT Numerical Mathematics 26, no. 1 (1986): 44–62, https://doi.org/10.1007/BF01939361.

pub fn cyclotomatic_number<S>(&self, subgraph: &S) -> usize
where S: SubGraphLike,

pub fn cycle_basis(&self) -> (Vec<Cycle>, SubSet<Hedge>)

pub fn cycle_basis_of<S>(&self, subgraph: &S) -> (Vec<Cycle>, SubSet<Hedge>)
where S: SubSetLike<Base = SubSet<Hedge>> + SubGraphLike,

pub fn order_basis(&self, basis: &[HedgeNode]) -> Vec<Vec<InternalSubGraph>>

pub fn all_cycles(&self) -> Vec<Cycle>

pub fn all_cycle_sym_diffs( &self, ) -> Result<Vec<InternalSubGraph>, TryFromIntError>

pub fn all_cycle_unions(&self) -> AHashSet<InternalSubGraph>

pub fn paton_count_loops( &self, subgraph: &InternalSubGraph, start: &NodeIndex, ) -> Result<usize, HedgeGraphError>

pub fn all_spinneys_with_basis( &self, basis: &[&InternalSubGraph], ) -> AHashSet<HedgeNode>

pub fn all_spinneys_rec( &self, spinneys: &mut AHashSet<HedgeNode>, cycle_sums: Vec<HedgeNode>, )

pub fn all_spinneys( &self, ) -> AHashMap<InternalSubGraph, Vec<(InternalSubGraph, Option<InternalSubGraph>)>>

pub fn all_spinneys_alt(&self) -> AHashSet<InternalSubGraph>

pub fn count_connected_components<S>(&self, subgraph: &S) -> usize
where S: SubGraphLike,

pub fn connected_components<S>(&self, subgraph: &S) -> Vec<SubSet<Hedge>>
where S: SubGraphLike,

pub fn iter_hedges(&self) -> impl Iterator<Item = (Hedge, &H)>

pub fn iter_nodes( &self, ) -> impl Iterator<Item = (NodeIndex, <N as NodeStorage>::NeighborsIter<'_>, &V)>

Iterate over all nodes, returns an iterator that yields

pub fn iter_node_ids(&self) -> impl Iterator<Item = NodeIndex>

pub fn iter_edge_ids_of<'a, S>( &'a self, subgraph: &'a S, ) -> EdgeIter<'a, E, V, H, S, N, <S as SubSetLike>::BaseIter<'a>>
where S: SubSetLike,

pub fn iter_edges_of<'a, S>( &'a self, subgraph: &'a S, ) -> impl Iterator<Item = (HedgePair, EdgeIndex, EdgeData<&'a E>)> + 'a
where S: SubSetLike,

pub fn iter_edges( &self, ) -> impl Iterator<Item = (HedgePair, EdgeIndex, EdgeData<&E>)>

pub fn iter_nodes_of<'a, S>( &'a self, subgraph: &'a S, ) -> impl Iterator<Item = (NodeIndex, <N as NodeStorage>::NeighborsIter<'a>, &'a V)>
where S: SubSetLike, <N as NodeStorage>::NeighborsIter<'a>: Clone,

pub fn dot_impl_fmt<S, Str1>( &self, writer: &mut impl Write, subgraph: &S, graph_info: Str1, hedge_attr: &impl Fn(&H) -> Option<String>, edge_attr: &impl Fn(&E) -> Option<String>, node_attr: &impl Fn(&V) -> Option<String>, ) -> Result<(), Error>
where S: SubGraphLike, Str1: AsRef<str>,

pub fn dot_impl_io<S, Str1>( &self, writer: &mut impl Write, subgraph: &S, graph_info: Str1, hedge_attr: &impl Fn(&H) -> Option<String>, edge_attr: &impl Fn(&E) -> Option<String>, node_attr: &impl Fn(&V) -> Option<String>, ) -> Result<(), Error>
where S: SubGraphLike, Str1: AsRef<str>,

pub fn dot_impl<S, Str1>( &self, subgraph: &S, graph_info: Str1, hedge_attr: &impl Fn(&H) -> Option<String>, edge_attr: &impl Fn(&E) -> Option<String>, node_attr: &impl Fn(&V) -> Option<String>, ) -> String
where S: SubGraphLike, Str1: AsRef<str>,

pub fn dot<S>(&self, node_as_graph: &S) -> String
where S: SubGraphLike,

pub fn dot_display<S>(&self, node_as_graph: &S) -> String
where S: SubGraphLike, E: Display, V: Display, H: Display,

pub fn dot_label<S>(&self, node_as_graph: &S) -> String
where S: SubGraphLike, E: Display, V: Display,

pub fn base_dot(&self) -> String

pub fn topo_sort_kahn_of<S>( &self, subgraph: &S, ) -> Result<Vec<NodeIndex>, TopoError>
where S: SubSetLike,

pub fn topo_sort_kahn(&self) -> Result<Vec<NodeIndex>, TopoError>

pub fn is_reachable(&self, source: NodeIndex, target: NodeIndex) -> bool

Checks if there is a path from source to target in the graph.

Uses breadth-first search to determine reachability. This method only follows source half-edges (outgoing edges) to traverse the directed graph structure.

§Arguments
  • source - The source node
  • target - The target node
§Returns

true if there is a directed path from source to target, false otherwise.

§Half-Edge Traversal

The algorithm only follows half-edges with Flow::Source to ensure it respects the directed nature of edges in the graph.

pub fn dot_serialize_of<S>( &self, subgraph: &S, global: impl Into<GlobalData>, hedge_map: &impl Fn(&H) -> DotHedgeData, edge_map: &impl Fn(&E) -> DotEdgeData, node_map: &impl Fn(&V) -> DotVertexData, ) -> String
where S: SubGraphLike,

pub fn dot_serialize_io( &self, writer: &mut impl Write, global: impl Into<GlobalData>, hedge_map: &impl Fn(&H) -> DotHedgeData, edge_map: &impl Fn(&E) -> DotEdgeData, node_map: &impl Fn(&V) -> DotVertexData, ) -> Result<(), Error>

pub fn dot_serialize_fmt( &self, writer: &mut impl Write, global: impl Into<GlobalData>, hedge_map: &impl Fn(&H) -> DotHedgeData, edge_map: &impl Fn(&E) -> DotEdgeData, node_map: &impl Fn(&V) -> DotVertexData, ) -> Result<(), Error>

Trait Implementations§

Source§

impl AsRef<HedgeGraph<Edge, Vertex, HedgeData>> for Graph

Source§

fn as_ref(&self) -> &HedgeGraph<Edge, Vertex, HedgeData>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Graph

Source§

fn clone(&self) -> Graph

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<__Context> Decode<__Context> for Graph
where __Context: GammaLoopContext,

Source§

fn decode<D: Decoder<Context = __Context>>( decoder: &mut D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl Deref for Graph

Source§

type Target = HedgeGraph<Edge, Vertex, HedgeData>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Encode for Graph

Source§

fn encode<__E: Encoder>(&self, encoder: &mut __E) -> Result<(), EncodeError>

Encode a given type.
Source§

impl FeynmanGraph for Graph

Source§

fn get_cff_inverse_energy_product(&self) -> Atom

This includes the factor 2 for each edge, inversion already performed

Source§

fn num_virtual_edges(&self, subgraph: SuBitGraph) -> usize

Source§

fn is_incoming_to(&self, edge: EdgeIndex, vertex: NodeIndex) -> bool

Source§

fn add_signs_to_edges(&self, node_id: NodeIndex) -> Vec<isize>

Source§

fn get_loop_number(&self) -> usize

Source§

fn get_real_mass_vector<T: FloatLike>(&self, model: &Model) -> EdgeVec<F<T>>

Source§

fn get_external_masses<T: FloatLike>( &self, model: &Model, ) -> TiVec<ExternalIndex, F<T>>

Source§

fn get_energy_cache<T: FloatLike>( &self, model: &Model, loop_moms: &LoopMomenta<F<T>>, external_moms: &ExternalFourMomenta<F<T>>, lmb: &LoopMomentumBasis, ) -> EdgeVec<F<T>>

Source§

fn get_emr_vec_cache<T: FloatLike>( &self, loop_moms: &LoopMomenta<F<T>>, external_moms: &ExternalFourMomenta<F<T>>, lmb: &LoopMomentumBasis, ) -> Vec<F<T>>

Source§

fn get_esurface_canonization( &self, lmb: &LoopMomentumBasis, ) -> Option<ShiftRewrite>

Source§

fn external_in_or_out_signature(&self) -> ExternalSignature

Source§

fn get_external_partcles(&self) -> Vec<ArcParticle>

Source§

fn get_external_signature(&self) -> SignatureLike<ExternalIndex>

Source§

fn get_energy_atoms(&self) -> Vec<Atom>

Source§

fn expected_scale(&self, e_cm: F<f64>, model: &Model) -> F<f64>

Source§

fn no_dummy(&self) -> SuBitGraph

Source§

fn dummy_list(&self) -> Vec<EdgeIndex>

Source§

fn all_st_cuts_for_cs( &self, source_nodes: HedgeNode, target_nodes: HedgeNode, initial_state_tree: &SuBitGraph, ) -> Vec<(SuBitGraph, OrientedCut, SuBitGraph)>

Source§

impl From<&Graph> for DotGraph

Source§

fn from(value: &Graph) -> Self

Converts to this type from the input type.
Source§

impl GeneratePolarizations for Graph

Source§

fn generate_polarizations_of<S: SubSetLike>(&self, subgraph: &S) -> Atom

Returns the polarizations of the given subgraph. One polarization per half-edge. If you only want those that are dangling first get the crown of the subgraph.
Source§

fn generate_polarization_parameters_of<S: SubSetLike>( &self, subgraph: &S, ) -> Vec<Atom>

Source§

impl IntoGraph<Graph> for String

Source§

fn into_graph(self, model: &Model) -> Result<Graph>

Source§

impl IntoGraph<Graph> for &str

Source§

fn into_graph(self, model: &Model) -> Result<Graph>

Source§

impl LMBext for Graph

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.
Source§

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

Enumerate all loop-momentum bases for the full graph.
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, ) -> LmbResult<LoopMomentumBasis>

Build the LMB for outer - shrunken while each connected component of shrunken acts as a contracted passage node.
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 empty_lmb(&self) -> LoopMomentumBasis

Return the empty basis with no loop or external generators.
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. Read more
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. Read more
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. Read more
Source§

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

Construct one canonical loop-momentum basis for subgraph. Read more
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. Read more
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 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. Read more
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. Read more
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. Read more
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(...). Read more
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. Read more
Source§

impl LMBext for &Graph

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.
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, ) -> LmbResult<LoopMomentumBasis>

Build the LMB for outer - shrunken while each connected component of shrunken acts as a contracted passage node.
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 empty_lmb(&self) -> LoopMomentumBasis

Return the empty basis with no loop or external generators.
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. Read more
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. Read more
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. Read more
Source§

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

Construct one canonical loop-momentum basis for subgraph. Read more
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. Read more
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 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. Read more
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. Read more
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. Read more
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(...). Read more
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. Read more
Source§

impl LMBwithEdges<SubSet<Hedge>> for Graph

Source§

fn lmb_with_loop_edges( &self, lmb_edges: &SuBitGraph, ) -> LmbResult<LoopMomentumBasis>

Source§

impl LMBwithEdges<[&EdgeIndex]> for Graph

Source§

fn lmb_with_loop_edges( &self, lmb_edges: &[&EdgeIndex], ) -> LmbResult<LoopMomentumBasis>

Source§

impl LMBwithEdges<[EdgeIndex]> for Graph

Source§

fn lmb_with_loop_edges( &self, lmb_edges: &[EdgeIndex], ) -> LmbResult<LoopMomentumBasis>

Source§

impl LogMessage for Graph

Source§

fn log_display(&self) -> String

§

fn log_file(&self) -> String

Source§

impl ParamBuilderGraph for Graph

Source§

fn iter_edge_ids(&self) -> impl Iterator<Item = EdgeIndex> + '_

Source§

fn get_external_energy_atoms(&self) -> Vec<Atom>

Source§

fn get_ose_replacements(&self) -> Vec<Replacement>

Source§

fn explicit_ose_atom(&self, edge: EdgeIndex) -> Atom

Source§

fn loop_mom_params(&self, lmb: &LoopMomentumBasis) -> Vec<Atom>

Source§

fn external_spatial_params(&self) -> Vec<Atom>

Source§

impl SplitPolarizations for Graph

Source§

fn polarizations(&self) -> Vec<Atom>

Source§

impl UltravioletGraph for Graph

Source§

fn dummy_less_full_crown<S: SubGraphLike>(&self, subgraph: &S) -> S::Base
where S::Base: ModifySubSet<Hedge>,

Source§

fn denominator<S: SubGraphLike, T: Fn(&Edge) -> isize>( &self, subgraph: &S, edge_powers: T, ) -> Atom

Source§

fn numerator<S: SubGraphLike + SubSetOps>( &self, subgraph: &S, without: &S, ) -> Numerator<AppliedFeynmanRule>

Get the numerator of the graph. If multiply_prefactor is true, the numerator is multiplied by the global prefactor. (just num not projector)
Source§

fn compute_dod<S: SubGraphLike<Base = SuBitGraph> + SubSetOps>( &self, subgraph: &S, ) -> i32

Source§

fn local_dod<S: SubGraphLike>(&self, subgraph: &S) -> i32

Source§

fn n_loops<S: SubGraphLike, E, V, H>(&self, subgraph: &S) -> usize
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn boundary_pdg_set<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> BTreeSet<isize>
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn internal_pdg_set<E: UVE, V, H, S: SubGraphLike>( &self, subgraph: &S, ) -> BTreeSet<isize>
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn has_massive_boundary_external<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> bool
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn ct_identifier<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> CTIdentifier
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn approximation_scheme<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, settings: &UVgenerationSettings, dod: i32, ) -> ApproximationType
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn classify_spinney<E: UVE, V, H>( &self, spinney: InternalSubGraph, settings: &UVgenerationSettings, lmb: &LoopMomentumBasis, ) -> Option<Spinney>
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn classified_spinneys<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, settings: &UVgenerationSettings, lmb: &LoopMomentumBasis, ) -> Vec<Spinney>
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn all_cycle_unions<E, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> AHashSet<InternalSubGraph>
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn all_limits<E, V, H, S: SubGraphLike>( &self, subgraph: &S, expr: &Atom, expansion: Symbol, lmb: &LoopMomentumBasis, ) -> Vec<(SubSet<LoopIndex>, Series<AtomField>)>
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn wood<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> Wood
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn wood_with_settings<E: UVE, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, settings: &UVgenerationSettings, lmb: &LoopMomentumBasis, ) -> Wood
where Self: AsRef<HedgeGraph<E, V, H>>,

Source§

fn spinneys<E, V, H, S: SubGraphLike<Base = SuBitGraph>>( &self, subgraph: &S, ) -> AHashSet<InternalSubGraph>
where Self: AsRef<HedgeGraph<E, V, H>>,

Auto Trait Implementations§

§

impl Freeze for Graph

§

impl RefUnwindSafe for Graph

§

impl Send for Graph

§

impl Sync for Graph

§

impl Unpin for Graph

§

impl UnsafeUnpin for Graph

§

impl UnwindSafe for Graph

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AtomComponentOptimizable<()> for T

Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either [OwoColorize::fg] or a color-specific method, such as [OwoColorize::green], Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either [OwoColorize::bg] or a color-specific method, such as [OwoColorize::on_yellow], Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows 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) -> R
where R: 'a,

Mutably borrows 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
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryFromUpgrade<T> for U
where T: TrySmallestUpgrade<U, LCM = U>, U: Clone,

§

fn try_from_upgrade(value: &T) -> Option<U>

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T, U> TryIntoUpgrade<U> for T
where U: TryFromUpgrade<T>,

§

fn try_into_upgrade(&self) -> Option<U>

Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.