Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Static Public Member Functions | Data Fields
mty::wick::Node Class Reference

Represents a contractible mty::QuantumField in the context of Wick contraction. More...

#include <graph.h>

Inheritance diagram for mty::wick::Node:
[legend]

Public Member Functions

 Node (const mty::QuantumField *t_field)
 Constructor with one parameter. Initializes a NULL partner. More...
 
 Node (const Node &node)=default
 Copy constructor = C++ default.
 
 Node (Node &&node)=default
 Copy constructor = C++ default.
 
bool isFree () const
 Tells if the Node is free or not. More...
 

Static Public Member Functions

static std::vector< std::shared_ptr< Node > > copyGraph (std::vector< std::shared_ptr< Node >> const &init)
 

Data Fields

const mty::QuantumFieldfield
 mty::QuantumField represented by the node in the graph.
 
std::weak_ptr< Nodepartner
 std::weak_ptr to the Node with which it is contracted, if it is. Else the value is empty.
 

Detailed Description

Represents a contractible mty::QuantumField in the context of Wick contraction.

A node is by definition a single power of mty::QuantumField. It means that a vertex with non trivial powers of a field will be divided in several nodes, one for each power. For example, \( \frac{\lambda}{3}\phi (X)^3 \) is divided in 3 nodes, each Node being for the field \( \phi (X) \). A node can be contracted with another and posess a pointer to its partner in this case. Only std::shared_ptr to Node are used in the program (Node objects that are already contracted are shared by several graphs) and the pointer to the partner is then a std::weak::ptr to avoid a circular owning pattern.

Constructor & Destructor Documentation

◆ Node()

mty::wick::Node::Node ( const mty::QuantumField t_field)
inlineexplicit

Constructor with one parameter. Initializes a NULL partner.

Parameters
t_fieldmty::QuantumField represented by the node.

Member Function Documentation

◆ isFree()

bool mty::wick::Node::isFree ( ) const
inline

Tells if the Node is free or not.

Returns
True if the Node has no partner.
False if the Node has a non NULL partner, i.e. is contracted.

The documentation for this class was generated from the following files: