Handles wick contractions. A graph contains Vertices, and is able to connect them in all possible ways returning the set of all possible Graph. More...
#include <graph.h>
Public Types | |
| using | Expr_type = std::pair< csl::Expr, ConjugationList > |
Public Member Functions | |
| Graph () | |
| Default constructor. Empty Graph. | |
| Graph (const std::vector< mty::QuantumField > &field, std::map< csl::Tensor, size_t > &vertexIds, bool ruleMode) | |
| Constructor with one parameter. More... | |
| Graph (const csl::Expr &expr, std::map< csl::Tensor, size_t > &vertexIds, bool ruleMode) | |
| Constructor with one parameter. More... | |
| Graph (Graph const &other, std::vector< std::shared_ptr< Node >> const &init) | |
| ~Graph () | |
| Destructor. | |
| Graph (const Graph &other)=default | |
| Copy constructor = C++ default. | |
| Graph & | operator= (const Graph &other)=default |
| Overload of operator= : C++ default. | |
| Graph | copy () const |
| int | getFactor () const |
| int | getTotalDegeneracyFactor () const |
| std::vector< Vertex > const & | getVertices () const |
| void | addFactor (int t_factor) |
| void | setFactor (int t_factor) |
| void | setSymmetrizeExternalLegs (bool t_symmetrize) |
| void | multiply (int t_factor) |
| void | multiply (csl::Expr const &t_factor) |
| bool | isFullyConnected () const |
| bool | isPhysical () const |
| A Graph is considered physical if it is not (yet) fully connected or if it is composed of one unique connected component. More... | |
| bool | isValid () const |
| int | getNLoops () const |
| int | getFieldDimension () const |
| std::vector< Expr_type > | getExpression () const |
| For a fully connected Graph, return the associated csl csl::Expr, applying combinatorial factors and propagators of the contracted pairs of fields (see mty::QuantumField::getPropagator()). More... | |
| std::vector< Expr_type > | getExpression (mty::FeynruleMomentum &witness) const |
| std::vector< const mty::QuantumField * > | getFields () const |
| std::vector< const mty::QuantumField * > | getConnectedFieldsInVertex (const mty::QuantumField *init) const |
| const mty::QuantumField * | getConnectedField (const mty::QuantumField *init) const |
| std::vector< std::shared_ptr< Node > > & | getNodes () |
| std::vector< std::shared_ptr< Node > > const & | getNodes () const |
| bool | empty () const |
| std::vector< std::shared_ptr< Graph > > | contractionStep () const |
| Performs one contraction step (the Graph must not be fully connected) and returns all possible new Graphs. More... | |
| bool | compare (const Graph &other, std::map< csl::Tensor, csl::Tensor > &mapping, bool fieldBlind=false) const |
| bool | compare (const Graph &other, bool fieldBlind=false) const |
| void | contractHighMass (mty::QuantumFieldParent const *field) |
| bool | operator== (const Graph &other) const |
Static Public Member Functions | |
| static Vertex const * | getVertexOf (std::shared_ptr< Node > const &node, std::vector< Vertex > const &vertices) |
| static std::vector< std::shared_ptr< Node > > | nextNodes (std::shared_ptr< Node > const &node, std::vector< Vertex > const &vertices) |
| static int | countExternalLegs (std::vector< csl::Tensor >::iterator first, std::vector< csl::Tensor >::iterator last, std::vector< Vertex > const &vertices) |
| static int | walk (std::vector< csl::Tensor >::iterator first, std::vector< csl::Tensor >::iterator last, std::shared_ptr< Node > const &node, std::vector< Vertex > const &vertices) |
Private Member Functions | |
| void | isolateIndependantVertices () |
| Isolates at the Graph's creation independant Internal vertices. More... | |
| void | removeIntVertex (int indexVertex) |
| void | initConnectedComponent () |
| Puts the first external vertex in the connected component and removes it from the set of external vertices for further contractions. | |
| Expr_type | getPartialExpression (std::vector< std::shared_ptr< Node >> &nodes, const std::vector< mty::QuantumField > &initialOrder, mty::FeynruleMomentum &witnessMapping, csl::Expr const &globalFactor) const |
| csl::ObjectSymmetry< const mty::QuantumField * > | getSymmetry (const Vertex &vertex, const mty::QuantumField *field) const |
| std::vector< std::vector< std::shared_ptr< Node > > > | symmetrize () const |
| std::vector< int > | getContractibleExtVertices (const mty::QuantumField *field) const |
| std::vector< int > | getContractibleIntVertices (const mty::QuantumField *field) const |
| std::vector< int > | getContractibleConnectedVertices (const mty::QuantumField *field) const |
| bool | contractExternal (const mty::QuantumField *field, int indexVertex) |
| Tries to contract the mty::QuantumField field between the ConnectedComponent and the external vertex at position indexVertex. More... | |
| bool | contractInternal (const mty::QuantumField *field, int indexVertex) |
| Tries to contract the mty::QuantumField field between the ConnectedComponent and the internal vertex at position indexVertex. More... | |
| bool | contractConnected (const mty::QuantumField *field, int indexVertex) |
| Tries to contract the mty::QuantumField field between the ConnectedComponent and the vertex at position indexVertex in connectedCompo. More... | |
Static Private Member Functions | |
| static std::vector< std::shared_ptr< Node > > | copyNodes (const std::vector< std::shared_ptr< Node >> &toCopy) |
| static void | applySymmetry (std::vector< std::shared_ptr< Node >> &nodes, const csl::ObjectPermutation< const mty::QuantumField *> &permutation) |
| static void | addFoundNode (const std::shared_ptr< Node > &newNode, std::vector< csl::Tensor > &foundNodes) |
| static void | sortNodes (std::vector< std::shared_ptr< Node >> &nodes) |
| static bool | compareFieldsDummyPoint (const mty::QuantumField *fieldA, const mty::QuantumField *fieldB, std::map< csl::Tensor, csl::Tensor > &constraints, bool fieldBlind=false) |
| static bool | compareNodesWithConstraints (const std::shared_ptr< Node > &nodeA, const std::shared_ptr< Node > &nodeB, std::map< csl::Tensor, csl::Tensor > &constraints, bool fieldBlind=false) |
Private Attributes | |
| std::vector< std::shared_ptr< Node > > | sortedNodes |
| long long int | factor = 1 |
| Combinatorial factor of the Graph in its current state of contraction. | |
| csl::Expr | exprFactor = CSL_1 |
| bool | symmetrizeExternalLegs = false |
| bool | ruleMode |
| std::shared_ptr< std::vector< Vertex > > | init |
| Initial order of vertices, in order to keep track of a possible sign of commutation between fields. | |
| std::shared_ptr< std::vector< mty::QuantumField > > | initialOrder |
| ConnectedComponent | connectedCompo |
| Connected component of the Graph (contains all its vertices). | |
| std::vector< Vertex > | extVertex |
| List of external vertices not already contracted. | |
| std::vector< Vertex > | intVertex |
| List of internal vertices not already contracted. | |
| std::vector< int > | independentVertices |
| Sets of integers spotting the independant internal vertices in intVertex. | |
| csl::ObjectSymmetry< const mty::QuantumField * > | symmetry = Id_Sym(const mty::QuantumField*) |
| bool | fixedExpression = false |
| std::vector< Expr_type > | expression |
Friends | |
| std::ostream & | operator<< (std::ostream &fout, const Graph &g) |
| Overload of operator<< for Graph. More... | |
Handles wick contractions. A graph contains Vertices, and is able to connect them in all possible ways returning the set of all possible Graph.
|
explicit |
Constructor with one parameter.
| field | std::vector of mty::QuantumField on which apply contractions. |
|
explicit |
Constructor with one parameter.
| expr | csl csl::Expr converted into fields (convertExprToFields()). |
|
private |
Tries to contract the mty::QuantumField field between the ConnectedComponent and the vertex at position indexVertex in connectedCompo.
| field | mty::QuantumField being contracted. |
| indexVertex | Position of the second Vertex being contracted in connectedCompo. |
|
private |
Tries to contract the mty::QuantumField field between the ConnectedComponent and the external vertex at position indexVertex.
| field | mty::QuantumField being contracted. |
| indexVertex | Position of the external Vertex to contract with connectedCompo. |
|
private |
Tries to contract the mty::QuantumField field between the ConnectedComponent and the internal vertex at position indexVertex.
| field | mty::QuantumField being contracted. |
| indexVertex | Position of the internal Vertex to contract with connectedCompo. |
| std::vector< std::shared_ptr< Graph > > mty::wick::Graph::contractionStep | ( | ) | const |
Performs one contraction step (the Graph must not be fully connected) and returns all possible new Graphs.
A contraction step consists in contracting the first contractible Node of the ConnectedComponent with every possible partner. Each partner gives a new Graph, and all these possible graphs are returned in a std::vector.
| bool mty::wick::Graph::empty | ( | ) | const |
|
private |
| field | mty::QuantumField to contract. |
|
private |
| field | mty::QuantumField to contract. |
|
private |
| field | mty::QuantumField to contract. |
| std::vector< Graph::Expr_type > mty::wick::Graph::getExpression | ( | ) | const |
For a fully connected Graph, return the associated csl csl::Expr, applying combinatorial factors and propagators of the contracted pairs of fields (see mty::QuantumField::getPropagator()).
| int mty::wick::Graph::getFactor | ( | ) | const |
| int mty::wick::Graph::getFieldDimension | ( | ) | const |
| bool mty::wick::Graph::isFullyConnected | ( | ) | const |
|
private |
Isolates at the Graph's creation independant Internal vertices.
It is important to avoid unnecessary calculations and keep the good combinatorial factors to recognize identical internal vertices. For example two vertices \( \phi(X)^3\quad \phi(Y)^3 \) are degenerate (see Vertex::isDegenerateWith()). Contractions will be performed considering the two vertices discernable (eg treating X before Y) and a factor 2 will be added in front the Graph's expression.
| bool mty::wick::Graph::isPhysical | ( | ) | const |
|
friend |
1.8.13