herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ColorFull::Monomial Class Reference

A class to contain the factor of form TR^a*Nc^b*CF^c*int_part*cnum_part, where the powers a, b and c may be negative. More...

#include <Monomial.h>

Public Member Functions

 Monomial ()
 Default constructor sets int_part=cnum_part=1, and pow_Nc=pow_TR=pow_CF=0.
 
 Monomial (double dnum)
 Constructor using a double.
 
 Monomial (int num)
 Constructor using an int.
 
 Monomial (std::string str)
 Constructor taking a string as argument.
 
void conjugate ()
 Take the complex conjugate.
 
void read_in_Monomial (std::string filename)
 Function for reading in the Monomial from the file filename, uses Monomial_of_str.
 
void write_out_Monomial (std::string filename) const
 Function for writing out the Monomial to a file with name filename.
 

Public Attributes

int pow_TR
 Power of TR in Monomial.
 
int pow_Nc
 Power of the number of colors.
 
int pow_CF
 Power of CF=TR (Nc^2-1)/Nc.
 
int int_part
 Integer multiplying the monomial, can be 0.
 
cnum cnum_part
 Complex number multiplying the monomial.
 

Private Member Functions

void Monomial_of_str (std::string str)
 Function for makinga a Monomial from a string.
 

Detailed Description

A class to contain the factor of form TR^a*Nc^b*CF^c*int_part*cnum_part, where the powers a, b and c may be negative.

A default Monomial is defined to be 1, and has int_part and cnum_part=1. A 0-Monomial has int_part=0. A polynomial is a sum of Monomials.

Definition at line 23 of file Monomial.h.

Constructor & Destructor Documentation

◆ Monomial() [1/4]

ColorFull::Monomial::Monomial ( )
inline

Default constructor sets int_part=cnum_part=1, and pow_Nc=pow_TR=pow_CF=0.

Definition at line 27 of file Monomial.h.

References cnum_part, int_part, pow_CF, pow_Nc, and pow_TR.

◆ Monomial() [2/4]

ColorFull::Monomial::Monomial ( double  dnum)
inline

Constructor using a double.

The cnum_part member is set to contain the value.

Definition at line 35 of file Monomial.h.

References cnum_part, int_part, pow_CF, pow_Nc, and pow_TR.

◆ Monomial() [3/4]

ColorFull::Monomial::Monomial ( int  num)
inline

Constructor using an int.

The int_part member is set to contain the value.

Definition at line 43 of file Monomial.h.

References cnum_part, int_part, pow_CF, pow_Nc, and pow_TR.

◆ Monomial() [4/4]

ColorFull::Monomial::Monomial ( std::string  str)

Constructor taking a string as argument.

The argument should be of the form in for example -(20*TR^5)/Nc or -20 TR^(5)/Nc or 20 / TR^(-5)Nc^(1) CF^(3). NOTE: All spaces and * are ignored, except in "*(-1)" and *-1, which is understood as (*-1). EVERYTHING standing after / is divided with, whereas everything standing before is multiplied with. Parentheses are ignored unless they appear in powers, i.e., directly after ^. No spaces are allowed inside the powers. If the string contains no info or is empty the Monomial is put to 1, pow_TR = pow_Nc = pow_CF = 0, int_part = 1, cnum_part = 1.0. (Expanded Mathematica 8 expressions are in this form.)

Member Function Documentation

◆ conjugate()

void ColorFull::Monomial::conjugate ( )
inline

Take the complex conjugate.

Note that this changes the Monomial itself.

Definition at line 81 of file Monomial.h.

References cnum_part.

◆ Monomial_of_str()

void ColorFull::Monomial::Monomial_of_str ( std::string  str)
private

Function for makinga a Monomial from a string.

The argument should be of the form given in form (for example) -(20*TR^5)/Nc or -20 TR^(5)/Nc or 20 / TR^(-5)Nc^(1) CF^3. NOTE: All spaces and * are ignored, except in "*(-1)" and *-1, which is understood as (*-1). EVERYTHING standing after / is divided with, whereas everything standing before is multiplied with. Parentheses are ignored unless they appear in powers, i.e, directly after ^. No spaces are allowed inside the powers. If the string contains no information or is empty, the Monomial is set to 1, pow_TR = pow_Nc = pow_CF = 0, int_part = 1, cnum_part = 1.0.

Member Data Documentation

◆ cnum_part

cnum ColorFull::Monomial::cnum_part

Complex number multiplying the monomial.

Definition at line 77 of file Monomial.h.

Referenced by conjugate(), and Monomial().

◆ int_part

int ColorFull::Monomial::int_part

Integer multiplying the monomial, can be 0.

Definition at line 74 of file Monomial.h.

Referenced by Monomial().

◆ pow_CF

int ColorFull::Monomial::pow_CF

Power of CF=TR (Nc^2-1)/Nc.

Definition at line 71 of file Monomial.h.

Referenced by Monomial().

◆ pow_Nc

int ColorFull::Monomial::pow_Nc

Power of the number of colors.

Definition at line 68 of file Monomial.h.

Referenced by Monomial().

◆ pow_TR

int ColorFull::Monomial::pow_TR

Power of TR in Monomial.

Definition at line 65 of file Monomial.h.

Referenced by Monomial().


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