TimeStructure Diagram¶
Module with functions relative to timestucture diagrams, called by ADG.

class
adg.tsd.
TimeStructureDiagram
(bmbpt_diag, tag_num)[source]¶ Bases:
adg.diag.Diagram
Describes a timestructure diagram with its related properties.

perms
¶ The permutations on the vertices for all the BMBPT diagrams associated to this TSD.
Type: dict

equivalent_trees
¶ The tag numbers of the equivalent tree TSDs associated to a nontree TSD.
Type: list

is_tree
¶ The tree or nontree character of a TSD.
Type: bool

expr
¶ The Goldstone denominator associated to the TSD.
Type: str

draw_equivalent_tree_tsds
(latex_file)[source]¶ Draw the equivalent tree TSDs for a given nontree TSD.
Parameters: latex_file (file) – The output LaTeX file of the priogram.

resummation_power
()[source]¶ Calculate the resummation power of the tree TSD.
Returns: The resummation power associated to the TSD.abs Return type: (int)

treat_cycles
()[source]¶ Find and treat cycles in a TSD diagram.
Returns: The unique tree TSDs associated to a nontree TSD. Return type: (list)

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 timestructure 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 nontree 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
(graph)[source]¶ Return the timestructure graph associated to the graph.
Parameters: graph (NetwrokX MultiDiGraph) – The BMBPT graph of interest. Returns: The timestructure 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 timestructure 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)[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.