diff --git a/Store.h b/Store.h new file mode 100644 index 0000000..e0f4903 --- /dev/null +++ b/Store.h @@ -0,0 +1,32 @@ +#ifndef STORE_H +#define STORE_H +#include "polynomial.h" +//#include "polynomial_store.h" +struct Store_item { + int type; //多项式类型:0稠密多项式,1乘积多项式 + int mul_poly; //乘积多项式中多项式部分的首项编号 + int mul_mono; //乘积多项式中单项式部分的首项编号 + int reductor; //消元子 + int id; //多项式编号 + Polynomial* poly; //指向稠密多项式的指针 +}; +struct Store { + Store_item data[M]; + Store(); + void Store_Polynomial(Polynomial* p, int id); + Store_item& operator [](int i); + void clear(); +}; +struct MPTS { //multiple polynomial temp store + pair data[MAX_ROWS]; + int polys; + MPTS(); + void append(int mul_poly, int mul_mono); + void insert(int mul_poly, int mul_mono, int index); + void remove_null(int max_polys = MAX_ROWS); + + pair& operator [](int i); + void clear(); +}; +extern Store system_store; +#endif \ No newline at end of file