DiagramHalfEdge
Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.
DiagramHalfEdge
class DiagramHalfEdgeA particle-line endpoint using the diagram’s native half-edge numbering.
Examples
Using the setup in the FeynmanDiagram class example:
endpoints = [(half.id, half.vertex, half.edge.particle_name) for half in diagram.half_edges]Attributes
| Name | Description |
|---|---|
edge |
Physics edge containing this half-edge. |
flow |
Underlying endpoint flow: source or sink. |
id |
Native half-edge ID, also used in symbolic hedge annotations. |
vertex |
Incident interaction vertex ID. |
edge
DiagramHalfEdge.edge: DiagramEdgePhysics edge containing this half-edge.
Examples
particles = [half.edge.particle_name for half in diagram.half_edges]flow
DiagramHalfEdge.flow: builtins.strUnderlying endpoint flow: source or sink.
Examples
incoming = [half.id for half in diagram.half_edges if half.flow == "sink"]id
DiagramHalfEdge.id: builtins.intNative half-edge ID, also used in symbolic hedge annotations.
Examples
ids = [half.id for half in diagram.half_edges]vertex
DiagramHalfEdge.vertex: builtins.intIncident interaction vertex ID.
Examples
incident = [half.vertex for half in diagram.half_edges]