feynml.interface.formcalc.feynmangraph.FeynmanGraph

class feynml.interface.formcalc.feynmangraph.FeynmanGraph(order: int, type: str, type_i: int, rules: List[feynml.interface.formcalc.rule.Rule])[source]

Bases: object

__init__(order: int, type: str, type_i: int, rules: List[Rule]) None

Methods

__init__(order, type, type_i, rules)

from_str(graph)

Example

n()

Example

re()

Attributes

order

type

type_i

rules

classmethod from_str(graph: str)[source]

Example

>>> str(FeynmanGraph.from_str('FeynmanGraph[1, Generic == 1][Field[1] -> V[1]]'))
'FeynmanGraph[1, Generic == 1][Field[1] -> V[1]]'
>>> str(FeynmanGraph.from_str('FeynmanGraph[1, Generic == 1][        Field[1] -> F[3, {1, SequenceForm["Col", 1]}],         Field[2] -> -F[3, {1, SequenceForm["Col", 2]}], Field[3] -> V[1],         Field[4] -> V[5, {        SequenceForm["Glu", 4]}], Field[5] -> F]'))
'FeynmanGraph[1, Generic == 1][Field[1] -> F[3, {1, SequenceForm["Col", 1]}], Field[2] -> -F[3, {1, SequenceForm["Col", 2]}], Field[3] -> V[1], Field[4] -> V[5, {SequenceForm["Glu", 4]}], Field[5] -> F]'
classmethod n()[source]

Example

>>> FeynmanGraph.n() == FeynmanGraph.re().count('(') - FeynmanGraph.re().count('(?')
True