Код: Выделить всё
ZZ_pE(); // initial value 0
ZZ_pE(const ZZ_pE& a); // copy constructor
explicit ZZ_pE(const ZZ_p& a); // promotion
explicit ZZ_pE(long a); // promotion
ZZ_pE& operator=(const ZZ_pE& a); // assignment
ZZ_pE& operator=(const ZZ_p& a); // assignment
ZZ_pE& operator=(long a); // assignment
Код: Выделить всё
ZZ_pКод: Выделить всё
// Declare polynomial and coefficient moduli
ZZ_p::init(ZZ(100001));
ZZ_pX cyclo = ZZ_pX(INIT_MONO, 4) - 1;
ZZ_pE::init(cyclo);
// Construct g
ZZ_pE g = ZZ_pE(5);
Последующий вопрос: каков стандартный (наиболее эффективный) способ инициализации полинома (например, в ZZX)? Если бы я хотел построить f = x^2 - 3x + 4, это мой текущий метод:
Код: Выделить всё
ZZ list[3] ={ZZ(4), ZZ(-3), ZZ(1)};
ZZX f;
for(int i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/51116229/what-is-the-standard-way-to-construct-a-polynomial-in-ntl[/url]
Мобильная версия