NO DOC.
#include <iostream>
#include <givaro/givrandom.h>
#include <givaro/modular-integer.h>
#include <givaro/gfqkronecker.h>
int main(
int argc,
char ** argv) {
unsigned long charac = (argc>1?atoi(argv[1]):3);
unsigned long expo = (argc>2?atoi(argv[2]):8);
GF.
write(std::cerr <<
"After field init of ") << std::endl;
GF.
write( std::cerr <<
"7 --> ", a ) << std::endl;
GF.
write( std::cerr <<
"b: ", b ) << std::endl;
PAD.radixdirect(pol, GF.
convert(b), expo);
PAD.write(std::cerr<< "b(Y): ", pol) << std::endl;
unsigned long shift =
ceil(log( (
double)charac)/log(2.));
for(size_t i=0; i<5; ++i, ++shift) {
std::cerr << "b kron(" << shift << "): " << r << std::endl;
PmAD.radixdirect(pol, r, expo);
PmAD.write(std::cerr<< "b(" << (1<<shift) << "): ", pol) << std::endl;
}
--shift;
Zm.
write(std::cerr <<
"with shift: ") << std::endl;
PAD.radixdirect(pol, GF.
convert(c), expo);
PmAD.radixdirect(Ipol, GF.
convert(r,c), expo);
PmAD.write(std::cerr<< "c:=", Ipol) << ';' << std::endl;
PmAD.radixdirect(Ipol, GF.
convert(r,d), expo);
PmAD.write(std::cerr<< "d:=", Ipol) << ';' << std::endl;
PmAD.radixdirect(Ipol, GF.
convert(r,e), expo);
PmAD.write(std::cerr<< "e:=", Ipol) << ';' << std::endl;
PmAD.radixdirect(Ipol, GF.
convert(r,f), expo);
PmAD.write(std::cerr<< "f:=", Ipol) << ';' << std::endl;
GF.
write( std::cerr <<
"dot: ", dot ) << std::endl;
PmAD.radixdirect(Ipol, GF.
convert(r,dot), expo);
PmAD.write(std::cerr<< "dot:=", Ipol) << ';' << std::endl;
PmAD.radixdirect(Ipol, Idot, 2*(expo));
PmAD.write(std::cerr<< "Idot:=", Ipol) << ';' << std::endl;
std::cerr << "Idot: " << Idot << std::endl;
GF.
write( std::cerr <<
"res: ", res ) << std::endl;
std::cerr << "ERROR: incoherency" << std::endl;
} else
std::cerr << "passed." << std::endl;
return 0;
}
Rep & random(RandIter &g, Rep &r) const
Rep & mul(Rep &r, const Rep a, const Rep b) const
Definition gfq.inl:309
std::ostream & write(std::ostream &s) const
Definition gfq.inl:606
bool areEqual(const Rep a, const Rep b) const
Definition gfq.inl:272
Rep & axpyin(Rep &r, const Rep a, const Rep b) const
Definition gfq.inl:378
GivRandom.
Definition givrandom.h:37
This is the Integer class.
Definition gmp++_int.h:160
std::ostream & write(std::ostream &s, const Element &a) const
Definition modular-implem.h:272
Forward declaration for Givaro::Modular.
Definition modular-inttype.h:38
Definition givpoly1padic.h:24
Field::Element Element
Definition f4n3.cpp:12
int main()
Definition f4n3.cpp:22
Namespace in which the whole Givaro library resides.
Definition all_field.C:23
const Integer ceil(const Rational &r)
Definition givratmisc.C:36
GFqKronecker.
Definition gfqkronecker.h:33
Rep Element
Definition gfqkronecker.h:42
Ints setShift(const Ints &i)
Definition gfqkronecker.h:73
virtual Ints & convert(Ints &r, const Rep a) const
Definition gfqkronecker.h:96
virtual Rep & init(Rep &a, const Ints r) const
Definition gfqkronecker.h:114