Represents a Vertex in feynman diagrams, i.e. a set of Nodes at the same space-time point. More...
#include <graph.h>
Public Member Functions | |
| Vertex () | |
| Default constructor, initializes an empty Vertex. | |
| Vertex (const std::vector< const mty::QuantumField *> &fields, size_t id, bool t_external=false) | |
| Constructor with 2 parameters. More... | |
| Vertex (const Vertex &other) | |
| Copy constructor. See Vertex::operator=(). | |
| bool | isExternal () const |
| bool | isFree () const |
| bool | hasFreeNode () const |
| bool | hasFreeNode (const mty::QuantumField *field) const |
| Tells if a Vertex can be contracted with (has free nodes for) a particular mty::QuantumField. More... | |
| bool | containsExplicit (const mty::QuantumField *field) const |
| bool | isDegenerateWith (const Vertex &other) const |
| Tells if the Vertex is degenerate with another. More... | |
| const mty::QuantumField * | getFirstContractibleField () const |
| Returns the field associated to the first contractible Node of the Vertex. This function calls an error if the Vertex is fully contracted. More... | |
| std::shared_ptr< Node > | getFirstContractibleNode () const |
| std::shared_ptr< Node > | getFirstContractibleNode (const mty::QuantumField *field) const |
| Returns the first Node contractible with field if there is one. More... | |
| std::vector< std::shared_ptr< Node > > | getContractibleNodes () const |
| std::vector< std::shared_ptr< Node > > | getContractibleNodes (const mty::QuantumField *field) const |
| void | setExternal (bool t_external) |
| Sets the external property of the Vertex. True means that the Vertex is composed of field insertions. | |
| int | getDegeneracy (const mty::QuantumField *t_field) const |
| Computes and returns the degeneracy of the Vertex with respect to a given mty::QuantumField. The degeneracy is the number of free Nodes contractible with field. See isExactlyContractiblewith(). More... | |
| int | getTotalDegeneracyFactor () const |
| Vertex & | operator= (const Vertex &other) |
| Overload of operator= for Vertex. More... | |
| bool | operator== (const Vertex &other) const |
| Overload of operator== for Vertex. More... | |
| bool | operator!= (const Vertex &other) const |
| Overload of operator!= for Vertex. See Vertex::operator==(). More... | |
Protected Attributes | |
| bool | external |
| Tells if the Vertex is external, i.e. composed of field insertions. | |
| size_t | id |
Friends | |
| std::ostream & | operator<< (std::ostream &fout, const Vertex &v) |
| Overload of operator<< for Vertex. More... | |
Represents a Vertex in feynman diagrams, i.e. a set of Nodes at the same space-time point.
|
explicit |
Constructor with 2 parameters.
| fields | std::vector of mty::QuantumField in the Vertex. |
| t_external | Tells if the vertex is external (field insertion in correlator). |
| vector< shared_ptr< Node > > mty::wick::Vertex::getContractibleNodes | ( | ) | const |
| int mty::wick::Vertex::getDegeneracy | ( | const mty::QuantumField * | t_field | ) | const |
Computes and returns the degeneracy of the Vertex with respect to a given mty::QuantumField. The degeneracy is the number of free Nodes contractible with field. See isExactlyContractiblewith().
| t_field | mty::QuantumField we want to contract. |
| const QuantumField * mty::wick::Vertex::getFirstContractibleField | ( | ) | const |
Returns the field associated to the first contractible Node of the Vertex. This function calls an error if the Vertex is fully contracted.
| shared_ptr< Node > mty::wick::Vertex::getFirstContractibleNode | ( | ) | const |
| shared_ptr< Node > mty::wick::Vertex::getFirstContractibleNode | ( | const mty::QuantumField * | field | ) | const |
Returns the first Node contractible with field if there is one.
| field | mty::QuantumField we want to contract. |
| bool mty::wick::Vertex::hasFreeNode | ( | ) | const |
| bool mty::wick::Vertex::hasFreeNode | ( | const mty::QuantumField * | field | ) | const |
Tells if a Vertex can be contracted with (has free nodes for) a particular mty::QuantumField.
| field | mty::QuantumField we want to contract. |
| bool mty::wick::Vertex::isDegenerateWith | ( | const Vertex & | other | ) | const |
Tells if the Vertex is degenerate with another.
| bool mty::wick::Vertex::isExternal | ( | ) | const |
| bool mty::wick::Vertex::isFree | ( | ) | const |
| bool mty::wick::Vertex::operator!= | ( | const Vertex & | other | ) | const |
Overload of operator!= for Vertex. See Vertex::operator==().
Overload of operator= for Vertex.
A little subtlety lies there. Nodes that are already contracted are not really copied, i.e. only the shared_ptr are copied. In that case the two final vertices have a pointer to the same Node in memory. This is because in the contraction algorithm, a contracted Node do not change at all after that. However, free nodes are really copied (the two Vertices have two different Nodes) because in two different graphs, the two Nodes can be contracted with different possible partners, and then will be different.
| other | Vertex to copy. |
| bool mty::wick::Vertex::operator== | ( | const Vertex & | other | ) | const |
|
friend |
1.8.13