Groebner_HFE80/Store.h

32 lines
890 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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<int, int> 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<int, int>& operator [](int i);
void clear();
};
extern Store system_store;
#endif