AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
RCyclotomic7Integer Class Reference

RC7 and their operations. More...

#include <rcyclotomic7integer.h>

Inheritance diagram for RCyclotomic7Integer:
Inheritance graph
[legend]
Collaboration diagram for RCyclotomic7Integer:
Collaboration graph
[legend]

Public Member Functions

 RCyclotomic7Integer (const RCyclotomic7Integer &rci)
 
 RCyclotomic7Integer (const int &n)
 
 RCyclotomic7Integer (const mpz_class &n)
 
 RCyclotomic7Integer (const array< mpz_class, 3 > &iCoefficients)
 
virtual void set (AlgebraicInteger *ai)
 Assign an algebraic integer to the algebraic integer. More...
 
virtual void set (const int &n)
 Assign an integer to the algebraic integer. More...
 
AlgebraicIntegercopy () const
 Create a copy of an algebraic integer. More...
 
AlgebraicIntegeraiCopyToInteger (const int &n) const
 Create an algebraic integer from an integer. More...
 
virtual void removeSquareFactors ()
 Remove all the square factors of the algebraic integer.
 
virtual bool bIsSquareOfIvertible () const
 Check whether the number is the square of an invertible element. More...
 
virtual bool bIsInvertible () const
 Check whether the number is invertible. More...
 
bool bIsAssociateTo (const AlgebraicInteger *ai)
 
virtual void gcd (const AlgebraicInteger *ai)
 *this becomes the gcd of *this and the parameter More...
 
virtual bool bIsDivisbleBy (const AlgebraicInteger *ai) const
 Check whether *this is divisible by the parameter. More...
 
virtual void divideBy (const AlgebraicInteger *ai)
 Performs the division of *this by the parameter Remark: we do not check that the *this is divisible by *ai. If it is not the case, the division will be an approximation! More...
 
virtual bool divideByIfDivisible (const AlgebraicInteger *ai)
 
virtual void multiplyBy (const AlgebraicInteger *ai)
 Performs the multiplication of *this by the parameter. More...
 
virtual void multiplyBy (const int &n)
 Performs the multiplication of *this by the parameter. More...
 
virtual void opp ()
 Computes the opp.
 
virtual void substract (const AlgebraicInteger *ai)
 Substracts the parameter from *this. More...
 
virtual void add (const AlgebraicInteger *ai)
 Performs the addition of *this by the parameter. More...
 
virtual bool bIsEqualTo (const int &n) const
 Check whether *this == n.
 
virtual bool bIsEqualTo (const AlgebraicInteger &ai) const
 Check whether *this == ai.
 
virtual bool bIsGreaterOEThan (const int &n) const
 Check whether *this >= n.
 
virtual bool bIsGreaterThan (const int &n) const
 Check whether *this > n.
 
virtual bool bIsLessOEThan (const AlgebraicInteger &ai) const
 Check whether *this <= ai.
 
virtual bool bIsLessThan (const AlgebraicInteger &ai) const
 Check whether *this < ai.
 
virtual bool bIsLessThan (const int &n) const
 Check whether *this < n.
 
ostream & print (ostream &) const
 Print the number.
 
virtual std::string get_classname () const
 Return the type (string)
 
virtual std::string to_string (const string &strFormat="generic", const bool &bProtect=false) const
 Convert to string. More...
 
virtual double to_double () const
 Convert to double (approximation)
 
interval to_interval () const
 
long int floor () const
 
mpz_class iNorm () const
 
bool bIsLongInt () const
 
void conjugate (unsigned int i)
 
vector< RCyclotomic7IntegerrciPrimeFactors () const
 
map< RCyclotomic7Integer, unsigned int > rciPrimeDecomposition () const
 
RCyclotomic7Integeroperator= (const RCyclotomic7Integer &rci)
 
RCyclotomic7Integeroperator/= (RCyclotomic7Integer const &rci)
 
RCyclotomic7Integeroperator*= (RCyclotomic7Integer const &rci)
 
RCyclotomic7Integer operator+ (const RCyclotomic7Integer &) const
 
RCyclotomic7Integer operator* (const RCyclotomic7Integer &) const
 
RCyclotomic7Integer operator- (const RCyclotomic7Integer &) const
 
RCyclotomic7Integer operator- () const
 
bool operator> (const RCyclotomic7Integer &rci) const
 
bool operator== (const RCyclotomic7Integer &rci) const
 
bool operator== (const long int &) const
 
- Public Member Functions inherited from AlgebraicInteger
bool operator== (const AlgebraicInteger &ai) const
 Check whether *this == ai.
 
bool operator!= (const int &n) const
 Check whether *this != n.
 
bool operator!= (const AlgebraicInteger &ai) const
 Check whether *this != ai.
 

Static Public Member Functions

static void initialize ()
 
static void initializePrimeDecomposition ()
 
static bool computePrimeDecomposition (const unsigned int &iPrime)
 

Public Attributes

array< mpz_class, 3 > iC
 Decomposition in the basis lambda_1, ..., lambda_(iDegree)
 

Detailed Description

RC7 and their operations.

Member Function Documentation

void RCyclotomic7Integer::add ( const AlgebraicInteger ai)
virtual

Performs the addition of *this by the parameter.

Parameters
ai(const AlgebraicInteger* ) Pointer to the summand

Implements AlgebraicInteger.

AlgebraicInteger * RCyclotomic7Integer::aiCopyToInteger ( const int &  n) const
virtual

Create an algebraic integer from an integer.

Parameters
n(const int ): Integer
Returns
Pointer to the algebraic integer created

Implements AlgebraicInteger.

bool RCyclotomic7Integer::bIsDivisbleBy ( const AlgebraicInteger ai) const
virtual

Check whether *this is divisible by the parameter.

Parameters
ai(const AlgebraicInteger* ) Pointer to the divisor
Returns
True if *this is divisible by the parameter

Implements AlgebraicInteger.

bool RCyclotomic7Integer::bIsInvertible ( ) const
virtual

Check whether the number is invertible.

Returns
True if invertible or not

Implements AlgebraicInteger.

bool RCyclotomic7Integer::bIsSquareOfIvertible ( ) const
virtual

Check whether the number is the square of an invertible element.

Returns
True if invertible or not

Implements AlgebraicInteger.

AlgebraicInteger * RCyclotomic7Integer::copy ( ) const
virtual

Create a copy of an algebraic integer.

Returns
Pointer to the algebraic integer created

Implements AlgebraicInteger.

void RCyclotomic7Integer::divideBy ( const AlgebraicInteger ai)
virtual

Performs the division of *this by the parameter Remark: we do not check that the *this is divisible by *ai. If it is not the case, the division will be an approximation!

Parameters
ai(const AlgebraicInteger* ) Pointer to the divisor

Implements AlgebraicInteger.

void RCyclotomic7Integer::gcd ( const AlgebraicInteger ai)
virtual

*this becomes the gcd of *this and the parameter

Parameters
ai(const AlgebraicInteger* ) The other algebraic integer

Implements AlgebraicInteger.

void RCyclotomic7Integer::multiplyBy ( const AlgebraicInteger ai)
virtual

Performs the multiplication of *this by the parameter.

Parameters
ai(const AlgebraicInteger* ) Pointer to the multiplicand

Implements AlgebraicInteger.

void RCyclotomic7Integer::multiplyBy ( const int &  n)
virtual

Performs the multiplication of *this by the parameter.

Parameters
ai(const AlgebraicInteger* ) Pointer to the multiplicand

Implements AlgebraicInteger.

void RCyclotomic7Integer::set ( AlgebraicInteger ai)
virtual

Assign an algebraic integer to the algebraic integer.

Parameters
ai(AlgebraicInteger* ) Pointer to the algebraic integer

Implements AlgebraicInteger.

void RCyclotomic7Integer::set ( const int &  n)
virtual

Assign an integer to the algebraic integer.

Parameters
n(const int& ) Integer

Implements AlgebraicInteger.

void RCyclotomic7Integer::substract ( const AlgebraicInteger ai)
virtual

Substracts the parameter from *this.

Parameters
ai(const AlgebraicInteger* ) Pointer to the subtrahend

Implements AlgebraicInteger.

std::string RCyclotomic7Integer::to_string ( const string &  strFormat = "generic",
const bool &  bProtect = false 
) const
virtual

Convert to string.

Parameters
strFormat(const string& ): Format for the output; can be: generic, mathematica, pari, latex
bProtect(const bool& ): If true, avoid certain characters (for example if the string is used in for a file name)

Implements AlgebraicInteger.


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