pyfeyn2.feynmandiagram.FeynmanDiagram
- class pyfeyn2.feynmandiagram.FeynmanDiagram(id: Optional[str] = None, style: cssutils.css.cssstyledeclaration.CSSStyleDeclaration = <factory>, clazz: Optional[str] = None, default_style: Optional[bool] = True, propagators: List[pyfeyn2.feynmandiagram.Propagator] = <factory>, vertices: List[pyfeyn2.feynmandiagram.Vertex] = <factory>, legs: List[pyfeyn2.feynmandiagram.Leg] = <factory>, labels: List[pyfeyn2.feynmandiagram.Label] = <factory>, sheet: cssutils.css.cssstylesheet.CSSStyleSheet = <factory>)[source]
Bases:
Styled,Identifiable- __init__(id: ~typing.Optional[str] = None, style: ~cssutils.css.cssstyledeclaration.CSSStyleDeclaration = <factory>, clazz: ~typing.Optional[str] = None, default_style: ~typing.Optional[bool] = True, propagators: ~typing.List[~pyfeyn2.feynmandiagram.Propagator] = <factory>, vertices: ~typing.List[~pyfeyn2.feynmandiagram.Vertex] = <factory>, legs: ~typing.List[~pyfeyn2.feynmandiagram.Leg] = <factory>, labels: ~typing.List[~pyfeyn2.feynmandiagram.Label] = <factory>, sheet: ~cssutils.css.cssstylesheet.CSSStyleSheet = <factory>) None
Methods
__init__([id, style, clazz, default_style, ...])add(*fd_all)add_rule(rule)add_rules(rules)from_xml(xml)Load self from XML.
get_bounding_box()get_connections(vertex)get_style(obj)Get the style of an object.
get_vertex(idd)put_style(key, value)raw_style()remove_propagator(propagator)to_xml()Return self as XML.
with_class(clazz)with_default_style(value[, k])Set default_style to value and return self.
with_id(value[, k])Set id to value and return self.
with_labels(value[, k])Set labels to value and return self.
with_legs(value[, k])Set legs to value and return self.
with_propagators(value[, k])Set propagators to value and return self.
with_rule(rule)with_rules(rules)with_sheet(value[, k])Set sheet to value and return self.
with_style(style)with_vertices(value[, k])Set vertices to value and return self.
Attributes
CSS class string.
default_styleidpropagatorsverticeslegslabelssheet- clazz: Optional[str] = None
CSS class string.
- get_style(obj) CSSStyleDeclaration[source]
Get the style of an object.
This is prefered over accessing the style attribute directly, sicne it includes class and pdgid definitions.
- style: CSSStyleDeclaration
CSS style string.
- with_default_style(value, k='default_style')
Set default_style to value and return self.
- with_id(value, k='id')
Set id to value and return self.
- with_labels(value, k='labels')
Set labels to value and return self.
- with_legs(value, k='legs')
Set legs to value and return self.
- with_propagators(value, k='propagators')
Set propagators to value and return self.
- with_sheet(value, k='sheet')
Set sheet to value and return self.
- with_vertices(value, k='vertices')
Set vertices to value and return self.