Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

PowProd Class Reference

#include <powerprod.H>

List of all members.


Detailed Description

Powprod class: represents power products, that is things of the form X^aY^bZ^c...

these are ordered, and it is quite important that they are. See comments in powerprod.H before LEX is defined.

Definition at line 50 of file powerprod.H.

Public Member Functions

 PowProd (long var_num)
 PowProd (long var_num, long thepower)
 PowProd (const PowProd &that)
void debug () const
bool is_correct () const
long nvars () const
 returns the number of variables in use
long degree () const
 returns the degree of the power product
long power_of (long i) const
 returns the power of variable #i
PowProdoperator= (const PowProd &that)
PowProdoperator *= (const PowProd &that)
PowProd operator * (const PowProd &that) const
bool lex_lessthan (const PowProd &that) const
bool lexsv_lessthan (const PowProd &that, long sv) const
bool deglex_lessthan (const PowProd &that) const
bool deglexsv_lessthan (const PowProd &that, long sv) const
bool degrevlex_lessthan (const PowProd &that) const
bool degrevlexsv_lessthan (const PowProd &that, long sv) const
bool operator< (const PowProd &that) const
 comparison operator <
bool operator== (const PowProd &that) const
 equality operator
bool divides (const PowProd &that) const
 returns true of this divides that
PowProdoperator/= (const PowProd &that)
 divides this by that
PowProd operator/ (const PowProd &that) const
bool prime_to (const PowProd &that) const
void swap (long i, long j)
 exchanges variables i and j
void shift (long n)
 shifts the variables (ie, add n to the variables indices) -- n must be >0 !!

Static Public Member Functions

void use_order (int theorder)
 sets the order to use
int current_order ()
 returns the current order
Alphabetget_current_alphabet ()
Alphabetget_default_alphabet ()
void set_alphabet (Alphabet *thealphabet)
 sets the pointer "alphabet" to a new alphabet. This is used all the time by polynomials. See <<.

Public Attributes

Tuple< long > powers
 the powers themselves.

Static Private Attributes

Alphabetalphabet = &PowProd::default_alphabet
 a pointer to an alphabet. Used when printing. Points to default_alphabet by default.
AutoAlphabet default_alphabet
 a default, automatic alphabet.
int order = LEX
 the type of order on power products. Determines the behavior of the < operator.

Friends

bool powprod_compare (const PowProd &one, const PowProd &two, int order, long priority)
 compares powprods using various orders
PowProd lcm (const PowProd &a, const PowProd &b)
 computes the least common multiple
ostream & operator<< (ostream &os, const PowProd &P)
 prints a power product.
ofstream & operator<< (ofstream &file, PowProd &x)
void operator>> (ifstream &file, PowProd &x)


Member Function Documentation

int PowProd::current_order  )  [static]
 

returns the current order

Definition at line 229 of file powerprod.cpp.

Referenced by AffineAlgebra< F_2 >::top_variable_redundant().

long PowProd::degree  )  const
 

returns the degree of the power product

Definition at line 46 of file powerprod.cpp.

References powers, and Tuple< T >::size().

bool PowProd::divides const PowProd that  )  const
 

returns true of this divides that

Definition at line 238 of file powerprod.cpp.

References powers, and Tuple< T >::size().

Referenced by Ideal< F_2 >::grobnerize(), and Ideal< F_2 >::minimalize().

long PowProd::nvars  )  const
 

returns the number of variables in use

Definition at line 42 of file powerprod.cpp.

References powers, and Tuple< T >::size().

Referenced by Exponentiator< F_2 >::exp_classes_after_tensoring(), GradedAlgebra< F_2 >::hom_degree_of(), AffineAlgebra< F_2 >::is_finite_dimensional(), AffineAlgebra< F_2 >::is_polynomial_variable(), and UnstableAlgebra::Sq().

PowProd & PowProd::operator/= const PowProd that  ) 
 

divides this by that

Definition at line 254 of file powerprod.cpp.

References powers, Tuple< T >::resize(), and Tuple< T >::size().

bool PowProd::operator< const PowProd that  )  const
 

comparison operator <

This switches to one of lex_lessthan, deglex_lessthan, or degrevlex_lessthan according to the value of PowProd::order. see powerprod.H, definition of LEX for more comments.

Definition at line 212 of file powerprod.cpp.

References LEX.

bool PowProd::operator== const PowProd that  )  const
 

equality operator

Definition at line 233 of file powerprod.cpp.

References powers.

long PowProd::power_of long  i  )  const
 

returns the power of variable #i

Definition at line 55 of file powerprod.cpp.

References powers, and Tuple< T >::size().

Referenced by Exponentiator< F_2 >::compute_lambda_relation(), Exponentiator< F_2 >::compute_tensor_relation(), Exponentiator< F_2 >::exp_classes_after_tensoring(), GradedAlgebra< F_2 >::hom_degree_of(), and AffineAlgebra< F_2 >::is_finite_dimensional().

void PowProd::set_alphabet Alphabet thealphabet  )  [static]
 

sets the pointer "alphabet" to a new alphabet. This is used all the time by polynomials. See <<.

Definition at line 366 of file powerprod.cpp.

References alphabet.

void PowProd::shift long  n  ) 
 

shifts the variables (ie, add n to the variables indices) -- n must be >0 !!

Definition at line 340 of file powerprod.cpp.

References powers, Tuple< T >::resize(), and Tuple< T >::size().

Referenced by Polynomial< F_2 >::shift_variables().

void PowProd::swap long  i,
long  j
 

exchanges variables i and j

Definition at line 301 of file powerprod.cpp.

References powers, Tuple< T >::resize(), and Tuple< T >::size().

Referenced by Polynomial< F_2 >::swap_variables().

void PowProd::use_order int  theorder  )  [static]
 

sets the order to use

Definition at line 225 of file powerprod.cpp.

References order.


Friends And Related Function Documentation

PowProd lcm const PowProd a,
const PowProd b
[friend]
 

computes the least common multiple

Definition at line 373 of file powerprod.cpp.

ostream& operator<< ostream &  os,
const PowProd P
[friend]
 

prints a power product.

The names of the variables are given by alphabet->nameof(long). When a polynomial is printed (cf polynomials.H), it replaces temporarily the pointer alphabet by a pointer to an object which inherits from alphabet.

Definition at line 415 of file powerprod.cpp.

bool powprod_compare const PowProd one,
const PowProd two,
int  order,
long  priority
[friend]
 

compares powprods using various orders

Definition at line 392 of file powerprod.cpp.


Member Data Documentation

Alphabet * PowProd::alphabet = &PowProd::default_alphabet [static, private]
 

a pointer to an alphabet. Used when printing. Points to default_alphabet by default.

Definition at line 8 of file powerprod.cpp.

Referenced by set_alphabet().

AutoAlphabet PowProd::default_alphabet [static, private]
 

a default, automatic alphabet.

Definition at line 7 of file powerprod.cpp.

int PowProd::order = LEX [static, private]
 

the type of order on power products. Determines the behavior of the < operator.

Definition at line 9 of file powerprod.cpp.

Referenced by use_order().

Tuple<long> PowProd::powers
 

the powers themselves.

Definition at line 61 of file powerprod.H.

Referenced by degree(), divides(), nvars(), operator/=(), operator==(), power_of(), shift(), and swap().


The documentation for this class was generated from the following files:
Generated on Wed Jun 18 17:22:46 2008 for Pierre Guillot by  doxygen 1.3.9.1