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

SimpleAlphabet Class Reference

#include <alphabet.H>

Inheritance diagram for SimpleAlphabet:

Alphabet AffineAlgebra< K > AffineAlgebra< F_2 > AffineAlgebra< QQ > AugmentedAlgebra< K > GradedAlgebra< K > GradedAlgebra< F_2 > AugmentedAlgebra< QQ > UnstableAlgebra RepresentationRing RealRepresentationRing List of all members.

Detailed Description

Lets the user name the variables.

you use new_variable("X"); then new_variable("c_2(r_4)"); repeatedly, and they are numbered 1, 2, 3 and so on. you get the name back with name_of(long). see also new_indeterminate in polynomials.H, which makes this transparent. The various algebra classes will make this even easier (as well as perform many many more things). example:

 SimpleAlphabet alpha;
 Polynomial<double> X, Y, P;
 X= new_indeterminate(alpha, "X"); 
 Y= new_indeterminate(alpha, "Y");
 P= X*X + X*Y*(-4); // P is X^2 - 4XY
 cout << P; // prints X^2 + -4XY
here the line X= new_... is basically short for
 alpha.new_variable("X"); X= Polynomial<double>( PowProd(1) );
 X.alphabet=&alpha; 
which is a bit long and confusing.

Definition at line 61 of file alphabet.H.

Public Member Functions

virtual string nameof (long var_num) const
 returns the name of variable number var_num
long new_variable (const string &thename)
 stores a new string -- a new variable
long variables_in_use () const
 lets you know how many variables you have created so far.

Protected Attributes

map< long, string > names
 the names
long var_in_use
 this is the number of variables created -- READ ME !


Member Function Documentation

string SimpleAlphabet::nameof long  var_num  )  const [virtual]
 

returns the name of variable number var_num

Implements Alphabet.

Definition at line 28 of file alphabet.cpp.

References names.

Referenced by SW_Maker::add_complex_relations(), Exponentiator< F_2 >::compute_exp_relations(), SW_Maker::create_regular_variables(), Chern_Maker::create_regular_variables(), Exponentiator< F_2 >::create_regular_variables(), UnstableAlgebra::display(), HomFinder::extend(), HomFinder::extend_all(), AffineAlgebra< F_2 >::find_redundancies(), AffineAlgebra< F_2 >::find_unitary_redundancies(), MilnorAnalyzer::re_setup(), UnstableAlgebra::saturate_and_reduce(), DerivationAnalyzer::setup(), MilnorAnalyzer::setup_for_Sq1(), and AffineAlgebra< F_2 >::tensor_with().

long SimpleAlphabet::new_variable const string &  thename  ) 
 

stores a new string -- a new variable

Reimplemented in AffineAlgebra< K >, AffineAlgebra< QQ >, and AffineAlgebra< F_2 >.

Definition at line 37 of file alphabet.cpp.

References names, and var_in_use.

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

long SimpleAlphabet::variables_in_use  )  const
 

lets you know how many variables you have created so far.

Definition at line 45 of file alphabet.cpp.

Referenced by SW_Maker::add_complex_relations(), HomFinder::branch(), Exponentiator< F_2 >::compute_exp_relations(), DerivationAnalyzer::constant_subalgebra(), Exponentiator< F_2 >::create_extra_variables(), SW_Maker::create_regular_variables(), Chern_Maker::create_regular_variables(), Exponentiator< F_2 >::create_regular_variables(), HomFinder::define_polynomial_variables(), GradedAlgebra< F_2 >::even_subalgebra(), HomFinder::extend(), HomFinder::extend_all(), UnstableAlgebra::has_closure_of(), HomFinder::init(), AffineHomomorphism< F_2 >::is_essentially_surjective(), Exponentiator< F_2 >::kill_extra_variables(), AffineHomomorphism< F_2 >::make_identity(), MilnorAnalyzer::re_setup(), DerivationAnalyzer::setup(), MilnorAnalyzer::setup_for_Sq1(), AffineAlgebra< F_2 >::tensor_with(), and SW_Maker::translate_homomorphism().


Member Data Documentation

map< long, string > SimpleAlphabet::names [protected]
 

the names

Definition at line 64 of file alphabet.H.

Referenced by nameof(), and new_variable().

long SimpleAlphabet::var_in_use [protected]
 

this is the number of variables created -- READ ME !

There is (normally) always an uninterrupted sequence of variables created, numbered 1, 2, ..., var_in_use. Other routines expect that, so one should never kill a variable other than the top one. One reason is that the implementation of PowProd is such that less memory is used when we stick to variables of low indices. More explicitly if x and y are the first two variables, then y is encoded as x^0y^1 and thus occupies more memory than x=x^1. Gets worse with the 50th variable of course. So if you want to kill a variable, kill the top one. The AffineAlgebra class, which inherits from this, has a mechanism for swapping variables.

Definition at line 80 of file alphabet.H.

Referenced by new_variable().


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