Description: This code constructs a complete C++ polynomial class whose main function is as follows:
1, You can declare a polynomial P by using Poly P
2, A polynomial P can be directly read the handwriting habits polynomial string by using P.read (string P_str)
3, You can add a new term of poly P by using P.newTerm (double Coef, int Exp) . If it contains similar items, merge it
4, You can assign the polynomial P directly by using P Q
5, You can output polynomial directly through cout << P with handwriting habits
6, A polynomial can be cleared by using P.clear ()
7, You can make calculating between polynomials directly by the using operators:+,-,*, /,
8, You can use gcd (Poly P, Poly Q) , lcm (Poly P, Poly Q) to calculate the greatest common divisor of two polynomials and least common multiple
9, You can calculate all kinds of information polynomial:
9.1, You can get the degree of P by using P.deg ()
9.2, You can get the main coeffic
To Search:
File list (Check if you may need any files):
example
.......\test.cpp
.......\PolyRoots.cpp
include
.......\matrix.h
.......\complex.h
.......\linklist.h
.......\poly.h
lib
...\libpoly.so
complex.cpp
matrix.cpp
poly.cpp
README.txt