C# Class Sharith.Arithmetic.XInt

Mini-Wrapper for some of MPIR's BigInt functions.
Show file Open project: PeterLuschny/Fast-Factorial-Functions Class Usage Examples

Public Properties

Property Type Description
MinusOne XInt
One XInt
Zero XInt

Public Methods

Method Description
Clone ( ) : object
CompareTo ( Int32 other ) : Int32
CompareTo ( XInt other ) : Int32
Equals ( XInt other ) : bool
Equals ( object obj ) : bool
Factorial ( Int32 x ) : XInt
GetHashCode ( ) : Int32
GreatestCommonDivisor ( XInt x, XInt y ) : XInt
IsEven ( ) : bool
Pow ( Int32 n ) : XInt
Pow ( UInt32 bas, UInt32 exp ) : XInt
Pow ( XInt bas, Int32 exp ) : XInt
Pow ( XInt bas, UInt32 exp ) : XInt
PowMod ( XInt exp, XInt mod ) : XInt
PrimeSwingParallelFactorial ( Int32 x ) : XInt
SchoenhageParallelFactorial ( Int32 x ) : XInt
SizeInBase ( Int32 basis ) : Int32
Sqrt ( ) : XInt
Sqrt ( XInt i ) : XInt
ToString ( IFormatProvider provider ) : string
XInt ( ) : System
XInt ( Int32 value ) : System
XInt ( System.Int64 value ) : System
XInt ( String value ) : System
XInt ( UInt32 value ) : System
XInt ( System.UInt64 value ) : System
XInt ( XInt value ) : System
operator ( ) : XInt
operator ( ) : bool

Private Methods

Method Description
_PrimeSwingParallelFactorial ( MpzT &fact, ulong n ) : void
_SchoenhageParallelFactorial ( MpzT &fact, ulong n ) : void
mpz_add ( MpzT &dest, MpzT &src, MpzT &src2 ) : void
mpz_add_ui ( MpzT &dest, MpzT &src, UInt32 val ) : void
mpz_clear ( MpzT &src ) : void
mpz_cmp ( MpzT &x, MpzT &y ) : Int32
mpz_cmp_d ( MpzT &x, double y ) : Int32
mpz_cmp_si ( MpzT &x, Int32 y ) : Int32
mpz_fac_ui ( MpzT &rop, UInt32 op ) : void
mpz_gcd ( MpzT &rop, MpzT &op1, MpzT &op2 ) : void
mpz_get_d ( MpzT &src ) : double
mpz_get_si ( MpzT &src ) : Int32
mpz_get_str ( IntPtr outString, Int32 _base, MpzT &src ) : IntPtr
mpz_init ( MpzT &value ) : void
mpz_init_set_si ( MpzT &value, Int32 v ) : void
mpz_init_set_str ( MpzT &rop, IntPtr s, Int32 basis ) : Int32
mpz_init_set_ui ( MpzT &rop, UInt32 v ) : void
mpz_invert ( MpzT &rop, MpzT &x, MpzT &y ) : Int32
mpz_mod ( MpzT &rop, MpzT &x, MpzT &mod ) : void
mpz_mul ( MpzT &dest, MpzT &x, MpzT &y ) : void
mpz_mul_2exp ( MpzT &rop, MpzT &x, UInt32 shift ) : Int32
mpz_mul_si ( MpzT &dest, MpzT &src, Int32 val ) : void
mpz_mul_ui ( MpzT &dest, MpzT &src, UInt32 val ) : void
mpz_pow_ui ( MpzT &rop, MpzT &op, UInt32 exp ) : void
mpz_powm ( MpzT &rop, MpzT &bas, MpzT &exp, MpzT &mod ) : void
mpz_set ( MpzT &dest, MpzT &src ) : void
mpz_set_si ( MpzT &src, Int32 value ) : void
mpz_set_str ( MpzT &rop, IntPtr s, Int32 sbase ) : Int32
mpz_sizeinbase ( MpzT &src, Int32 _base ) : Int32
mpz_sqrt ( MpzT &rop, MpzT &op ) : void
mpz_sub ( MpzT &rop, MpzT &x, MpzT &y ) : void
mpz_tdiv_q ( MpzT &dest, MpzT &src, MpzT &src2 ) : void
mpz_ui_pow_ui ( MpzT &rop, UInt32 bas, UInt32 exp ) : void

Method Details

Clone() public method

public Clone ( ) : object
return object

CompareTo() public method

public CompareTo ( Int32 other ) : Int32
other System.Int32
return System.Int32

CompareTo() public method

public CompareTo ( XInt other ) : Int32
other XInt
return System.Int32

Equals() public method

public Equals ( XInt other ) : bool
other XInt
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

Factorial() public static method

public static Factorial ( Int32 x ) : XInt
x System.Int32
return XInt

GetHashCode() public method

public GetHashCode ( ) : Int32
return System.Int32

GreatestCommonDivisor() public static method

public static GreatestCommonDivisor ( XInt x, XInt y ) : XInt
x XInt
y XInt
return XInt

IsEven() public method

public IsEven ( ) : bool
return bool

Pow() public method

public Pow ( Int32 n ) : XInt
n System.Int32
return XInt

Pow() public static method

public static Pow ( UInt32 bas, UInt32 exp ) : XInt
bas System.UInt32
exp System.UInt32
return XInt

Pow() public static method

public static Pow ( XInt bas, Int32 exp ) : XInt
bas XInt
exp System.Int32
return XInt

Pow() public static method

public static Pow ( XInt bas, UInt32 exp ) : XInt
bas XInt
exp System.UInt32
return XInt

PowMod() public method

public PowMod ( XInt exp, XInt mod ) : XInt
exp XInt
mod XInt
return XInt

PrimeSwingParallelFactorial() public static method

public static PrimeSwingParallelFactorial ( Int32 x ) : XInt
x System.Int32
return XInt

SchoenhageParallelFactorial() public static method

public static SchoenhageParallelFactorial ( Int32 x ) : XInt
x System.Int32
return XInt

SizeInBase() public method

public SizeInBase ( Int32 basis ) : Int32
basis System.Int32
return System.Int32

Sqrt() public method

public Sqrt ( ) : XInt
return XInt

Sqrt() public static method

public static Sqrt ( XInt i ) : XInt
i XInt
return XInt

ToString() public method

public ToString ( IFormatProvider provider ) : string
provider IFormatProvider
return string

XInt() public method

public XInt ( ) : System
return System

XInt() public method

public XInt ( Int32 value ) : System
value System.Int32
return System

XInt() public method

public XInt ( System.Int64 value ) : System
value System.Int64
return System

XInt() public method

public XInt ( String value ) : System
value String
return System

XInt() public method

public XInt ( UInt32 value ) : System
value System.UInt32
return System

XInt() public method

public XInt ( System.UInt64 value ) : System
value System.UInt64
return System

XInt() public method

public XInt ( XInt value ) : System
value XInt
return System

operator() public static method

public static operator ( ) : XInt
return XInt

operator() public static method

public static operator ( ) : bool
return bool

Property Details

MinusOne public static property

public static XInt,Sharith.Arithmetic MinusOne
return XInt

One public static property

public static XInt,Sharith.Arithmetic One
return XInt

Zero public static property

public static XInt,Sharith.Arithmetic Zero
return XInt