big.h

来自「RSA算法」· C头文件 代码 · 共 44 行

H
44
字号
#ifndef BIG_H
#define BIG_H
#include <vector>

using namespace std;

class Big
{	
	public:
		void Output();
		void Clean();
		void odd_generator(int);
		void Push_back(const long n);
		void ChangeNegative(){ negative = !negative;}
		bool operator > (const Big& b2);
		Big operator -- ();
		Big (const long n);
		Big (){ negative = true,length = 0;}
		~Big (){ length = 0; }
		Big operator << (const int times);
		Big operator >> (const int times);
		Big operator + (const Big& bx);
		Big operator += (const Big& bx);
		Big operator - (const Big& bx);
		Big operator * (const Big& bx);
		Big operator % (const Big& bx);
		Big operator / (const Big& bx);
//		friend Big Modular(int b1,Big times, const Big& b2);
		friend Big Modular(Big &b1,Big times, const Big& b2);
		friend int Judge(const Big &b1,const Big& b2);
		friend Big Gcd(Big &b1,Big& b2);
		friend bool prime_tester(Big & big);
		friend bool prime_tester_small(Big & big);
		friend int fit_next_steps_to_choose_e(Big & big);
		friend bool fit_next_steps_to_choose_e(Big & big,int);


//		vector < unsigned long > numbers;
		unsigned long numbers[140];
		int length;
		bool negative;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?