⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crt.h

📁 miracl-大数运算库,大家使用有什么问题请多多提意见
💻 H
字号:
/*
 *    MIRACL  C++ Header file crt.h
 *
 *    AUTHOR  : M. Scott
 *  
 *    PURPOSE : Definition of class Crt  (Chinese Remainder Thereom)
 *    NOTE    : Must be used in conjunction with big.cpp
 *              Can be used with either Big or utype moduli
 *                
 *    Copyright (c) 1988-1997 Shamus Software Ltd.
 */

#ifndef CRT_H
#define CRT_H

#include "big.h"

#define MR_CRT_BIG   0
#define MR_CRT_SMALL 1

class Crt 
{ 
    big_chinese bc;
    small_chinese sc;
    int type;
public:
    Crt(int,Big *);
    Crt(int,mr_utype *);

    Big eval(Big *);       
    Big eval(mr_utype *);

    ~Crt() 
    {  /* destructor */
        if (type==MR_CRT_BIG) crt_end(&bc);
        if (type==MR_CRT_SMALL) scrt_end(&sc);
    }
};

#endif

⌨️ 快捷键说明

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