00001 #include "chern_maker.H"
00002 using namespace std;
00003
00004
00005
00006
00007 void Chern_Maker::start(RepresentationRing *thesource,
00008 GradedAlgebra<F_2> *thetarget){
00009
00010 Exponentiator<F_2>::start(thesource, thetarget, string("c"), 2);
00011 }
00012
00013
00014 void Chern_Maker::create_regular_variables(string prefix){
00015 long i, j, dim;
00016 QQ d;
00017 Polynomial<F_2> zero_poly;
00018 ostringstream autoname;
00019
00020
00021 dim= 0;
00022 for(i=1; i <= source->variables_in_use(); i++){
00023 d= source->epsilon[i];
00024 if( d > dim)
00025 dim= ZZtolong(d);
00026 }
00027
00028 max_dim= dim;
00029
00030 var.resize(source->variables_in_use() +1, dim+1);
00031 zero_poly.alphabet= target;
00032 zero_poly.sets_to_zero();
00033
00034
00035 for(i=1; i <= source->variables_in_use(); i++){
00036 dim= ZZtolong( source->epsilon[i] );
00037 for(j=1; j<= dim; j++){
00038 if( (source->schur_indices[i] == 4) && (j % 2 != 0) )
00039 var(i,j)= zero_poly;
00040 else{
00041 autoname.str("");
00042 autoname << prefix << "_" << j
00043 << "(" << source->nameof(i) << ")";
00044 var(i,j)= target->new_variable(autoname.str(), factor*j);
00045 }
00046 }
00047 }
00048
00049
00050 }