Source code for feynml.propagator

from dataclasses import dataclass

from smpl_util.util import withify

from feynml.connector import Connector
from feynml.line import Line


[docs]@withify() @dataclass class Propagator(Line, Connector):
[docs] def goes_into(self, vertex): """Return True if the propagator goes into the vertex, False otherwise.""" return self.target == vertex.id
[docs] def goes_out_of(self, vertex): """Return True if the propagator goes out of the vertex, False otherwise.""" return self.target == vertex.id