Time-Structure Diagram

Module with functions relative to time-stucture diagrams, called by ADG.

class adg.tsd.TimeStructureDiagram(bmbpt_diag)[source]

Bases: Diagram

Describes a time-structure diagram with its related properties.

Parameters

bmbpt_diag (BmbptFeynmanDiagram) – The BMBPT graph to be turned into a TSD.

degrees

The ascendingly sorted degrees of the graph vertices.

Type

tuple

draw_equivalent_tree_tsds(latex_file)[source]

Draw the equivalent tree TSDs for a given non-tree TSD.

Parameters

latex_file (file) – The output LaTeX file of the program.

equivalent_trees

The tag numbers of the equivalent tree TSDs associated to a non-tree TSD.

Type

list

expr

The Goldstone denominator associated to the TSD.

Type

str

get_feynman_diags(feyn_diagrams)[source]

Return the list of Feynman diagrams associated to the TSD.

Parameters

feyn_diagrams (list) – All produced BmbptFeymmanDiagrams.

Returns

All the identifiers of associated BmbptFeymmanDiagrams.

Return type

str

graph

The actual graph.

Type

NetworkX MultiDiGraph

io_degrees

The sorted version of unsort_io_degrees.

Type

tuple

is_tree

The tree or non-tree character of a TSD.

Type

bool

max_degree

The maximal degree of a vertex in the graph.

Type

int

perms

The permutations on the vertices for all the BMBPT diagrams associated to this TSD.

Type

dict

resum

The resummation power of a tree TSD.

Type

int

resummation_power()[source]

Calculate the resummation power of the tree TSD.

Returns

The resummation power associated to the TSD.abs

Return type

int

tags

The tag numbers associated to a diagram.

Type

list

treat_cycles()[source]

Find and treat cycles in a TSD diagram.

Returns

The unique tree TSDs associated to a non-tree TSD.

Return type

list

unsort_degrees

The degrees of the graph vertices

Type

tuple

unsort_io_degrees

The list of in- and out-degrees for each vertex of the graph, stored in a (in, out) tuple.

Type

tuple

write_graph(latex_file, directory, write_time)

Write the graph of the diagram to the LaTeX file.

Parameters
  • latex_file (file) – The LaTeX ouput file of the program.

  • directory (str) – Path to the result folder.

  • write_time (bool) – (Here to emulate polymorphism).

adg.tsd.disentangle_cycle(time_graph, cycle_nodes)[source]

Separate a cycle in a sum of tree diagrams.

Parameters
  • time_graph (NetworkXn MultiDiGraph) – A time-structure diagram.

  • cycle_nodes (tuple) – Integers encoding the positions of the end nodes of the cycle.

Returns

New graphs produced from treating the cycles in the TSD.

Return type

list

adg.tsd.equivalent_labelled_tsds(equivalent_trees, labelled_tsds)[source]

Return the list of labelled TSDs corresponding to equivalent TSDs.

Parameters
  • equivalent_trees (list) – The equivalent tree TSDs of a non-tree TSD.

  • labelled_tsds (list) – The labelled TSDs obtained from BMBPT diagrams.

Returns

The list of tag numbers of the equivalent TSDs.

Return type

str

adg.tsd.find_cycle(graph)[source]

Return start and end nodes for an elementary cycle.

Parameters

graph (NetworkX MultiDiGraph) – A TSD with cycle(s) to be treated.

Returns

Positions of the two end nodes of a cycle in the graph.

Return type

tuple

adg.tsd.time_structure_graph(diag)[source]

Return the time-structure graph associated to the graph.

Parameters

diag (BmbptFeymmanDiagram) – The BMBPT graph of interest.

Returns

The time-structure diagram.

Return type

NetworkX MultiDiGraph

adg.tsd.treat_tsds(diagrams_time)[source]

Order TSDs, produce their expressions, return also number of trees.

Parameters

diagrams_time (list) – All the associated TSDs.

Returns

List of TSDs, number of tree TSDs

Return type

tuple

adg.tsd.tree_time_structure_den(time_graph)[source]

Return the denominator associated to a tree time-structure graph.

Parameters

time_graph (NetworkX MultiDiGraph) – The TSD of interest.

Returns

The denominator associated to the TSD.

Return type

str

adg.tsd.write_section(latex_file, directory, pdiag, time_diagrams, nb_tree_tsds, diagrams)[source]

Write the appropriate section for tsd diagrams in the LaTeX file.

Parameters
  • latex_file (file) – The LaTeX output file of the program.

  • directory (str) – Path to the output folder.

  • pdiag (bool) – True if diagrams are to be drawn.

  • time_diagrams (list) – The ensemble of TSDs.

  • nb_tree_tsds (int) – Number of tree TSDs.

  • diagrams (list) – All produced BmbptFeymmanDiagrams.