std::vector of Vertex that represents the connected component of a Graph. A Graph has typically one ConnectedComponent and free Vertices.
More...
#include <graph.h>
|
|
std::vector< Vertex > | vertices |
| |
std::vector of Vertex that represents the connected component of a Graph. A Graph has typically one ConnectedComponent and free Vertices.
◆ ConnectedComponent()
| mty::wick::ConnectedComponent::ConnectedComponent |
( |
const Vertex & |
firstVertex | ) |
|
|
explicit |
Constructor with one parameter.
- Parameters
-
| firstVertex | First (and unique for now) Vertex in the component. |
◆ connect() [1/2]
| int mty::wick::ConnectedComponent::connect |
( |
int |
indexVertex | ) |
|
Connects the first contractible Node of the ConnectedComponent with the first Node (contractible with the previous one) of the Vertex in position indexVertex of the component.
- Parameters
-
| indexVertex | Index of the Vertex to contract. |
- Returns
- The degeneracy encountered in the contraction.
◆ connect() [2/2]
| bool mty::wick::ConnectedComponent::connect |
( |
Vertex & |
other | ) |
|
Tries to connect the first contractible Node of the ConnectedComponent with the Vertex other.
- Parameters
-
| other | Vertex to contract with the first contractible Node. |
- Returns
- True if there is a contraction.
-
False else.
◆ getContractibleVertices()
| vector< int > mty::wick::ConnectedComponent::getContractibleVertices |
( |
const mty::QuantumField * |
field | ) |
const |
Returns the list (in a std::vector) of the Vertices in the ConnectedComponent contractible with field.
The first constractible vertex is not put in the returned vector except is its degeneracy (see Vertex::getDegeneracy()) is bigger than one, i.e. has more than one Node contractible with field. This is because at each contraction step we contract the first Node of the ConnectedComponent of the Graph with possible other Nodes. The first contractible Node of the ConnectedComponent is then not included in the "other Nodes".
- Parameters
-
- Returns
- A std::vector filled with Vertices of the ConnectedComponent contractible with field.
◆ getFirstContractibleField()
| const QuantumField * mty::wick::ConnectedComponent::getFirstContractibleField |
( |
| ) |
const |
◆ getFirstContractibleNode()
| shared_ptr< Node > mty::wick::ConnectedComponent::getFirstContractibleNode |
( |
| ) |
const |
◆ getFirstContractibleVertex()
| int mty::wick::ConnectedComponent::getFirstContractibleVertex |
( |
| ) |
const |
- Returns
- The position of the first contractible Vertex if there is one.
-
-1 else.
◆ getNodes()
| vector< shared_ptr< Node > > mty::wick::ConnectedComponent::getNodes |
( |
| ) |
const |
◆ hasValenceLeft()
| bool mty::wick::ConnectedComponent::hasValenceLeft |
( |
| ) |
const |
Tells if the ConnectedComponent has contractible Node left.
If no, it means that the component can no longer be contracted. And if there if free Node left in the Graph, the contraction gives 0 in the calculation: only connected Graph are considered in Wick contraction.
- Returns
- True if the component has free Node left.
-
False else.
◆ operator<<
The documentation for this class was generated from the following files: