colorfull is hosted by Hepforge, IPPP Durham
ColorFull  1.1
ColorFull::Polynomial Class Reference

#include <Polynomial.h>

Public Member Functions

 Polynomial ()
 Polynomial (const std::string str)
 Polynomial (double dnum)
 Polynomial (int num)
void read_in_Polynomial (std::string filename)
void write_out_Polynomial (std::string filename) const
const Monomialat (int i) const
Monomialat (int i)
int size () const
void append (const Monomial Mon)
void erase (int i)
bool empty () const
void clear ()
void conjugate ()
void simplify ()
void remove_CF ()
void normal_order ()

Public Attributes

polynomial poly

Detailed Description

For containing a Polynomial (in Nc, CF and TR), as a sum of Monomials. Note that a Monomial "is" TR^a*Nc^b*CF^c*int_part*cnum_part where int_part is an integer factor, cnum_part a complex numerical factor and a,b, and c integers (not necessarily positive). An empty Polynomial is defined as 1.

Constructor & Destructor Documentation

◆ Polynomial() [1/4]

ColorFull::Polynomial::Polynomial ( )

Default constructor, leaves polynomial empty=1.

◆ Polynomial() [2/4]

ColorFull::Polynomial::Polynomial ( const std::string  str)

Constructor allow setting the polynomial by using a string. Should be used as for example "Polynomial Poly("(-20*TR^(5))/Nc + 28*Nc*TR^(5) - 10*Nc^3*TR^(5)")". The Momomials should be separated by + or -, see also the Monomial string constructor.

◆ Polynomial() [3/4]

ColorFull::Polynomial::Polynomial ( double  dnum)

Constructor allowing setting the Polynomial using a double. The Polynomial gets one Monomial where the real part of cnum_part gets the value of dnum.

◆ Polynomial() [4/4]

ColorFull::Polynomial::Polynomial ( int  num)

Constructor allowing setting the Polynomial using an int. The Polynomial gets one Monomial where int_part has the value num.

Member Function Documentation

◆ append()

void ColorFull::Polynomial::append ( const Monomial  Mon)

Adding a Monomial term.

◆ at() [1/2]

const Monomial& ColorFull::Polynomial::at ( int  i) const

Returns Monomial at place i.

◆ at() [2/2]

Monomial& ColorFull::Polynomial::at ( int  i)

Returns Monomial at place i.

◆ clear()

void ColorFull::Polynomial::clear ( )

Erases info in polynomial.

◆ conjugate()

void ColorFull::Polynomial::conjugate ( )

Take complex conjugate of the polynomial. Note that this changes the Polynomial itself.

◆ empty()

bool ColorFull::Polynomial::empty ( ) const

Is the polynomial empty?

◆ erase()

void ColorFull::Polynomial::erase ( int  i)

Erases the Monomial at place i.

◆ normal_order()

void ColorFull::Polynomial::normal_order ( )

Orders terms in Polynomial in a unique form, first according to pow_Nc+pow_CF, then according to pow_Nc (for same pow_Nc+pow_CF) then according to int_part*num, then according to int_part, and finally according to pow_TR.

◆ read_in_Polynomial()

void ColorFull::Polynomial::read_in_Polynomial ( std::string  filename)

Function for reading in the Polynomial from the file filename, uses Polynomial_of_str.

◆ remove_CF()

void ColorFull::Polynomial::remove_CF ( )

Replaces CF with TR*Nc-TR/Nc.

◆ simplify()

void ColorFull::Polynomial::simplify ( )

Collects terms with same power of TR and Nc and Cf.

◆ size()

int ColorFull::Polynomial::size ( ) const

Returns the number of terms in the Polynomial.

◆ write_out_Polynomial()

void ColorFull::Polynomial::write_out_Polynomial ( std::string  filename) const

Function for writing out the Polynomial to a file with name filename.

Member Data Documentation

◆ poly

polynomial ColorFull::Polynomial::poly

Contains the polynomial, a sum of Monomials, as an std::vector of Monomials. An empty Polynomial is defined as 1, to get 0, multiply with 0.

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