[−][src]Struct clacc::bigint::BigIntGmp
Trait Implementations
impl BigInt for BigIntGmp
[src]
fn next_prime(&self) -> Self
[src]
use clacc::bigint::{BigInt, BigIntGmp}; let x: BigIntGmp = 32.into(); let p = x.next_prime(); assert_eq!(p, 37.into());
fn gcdext(&self, y: &Self) -> (Self, Self, Self)
[src]
use clacc::bigint::{BigInt, BigIntGmp}; let x: BigIntGmp = 240.into(); let y: BigIntGmp = 46.into(); let (g, a, b) = x.gcdext(&y); assert_eq!(g, 2.into()); assert_eq!(a, (-9).into()); assert_eq!(b, 47.into());
fn modulus(&self, m: &Self) -> Self
[src]
use clacc::bigint::{BigInt, BigIntGmp}; let b: BigIntGmp = 11.into(); let n: BigIntGmp = 7.into(); let m = b.modulus(&n); assert_eq!(m, 4.into());
fn powm(&self, e: &Self, m: &Self) -> Self
[src]
use clacc::bigint::{BigInt, BigIntGmp}; let b: BigIntGmp = 5.into(); let e: BigIntGmp = 3.into(); let m: BigIntGmp = 13.into(); let c = b.powm(&e, &m); assert_eq!(c, 8.into());
fn invert(&self, m: &Self) -> Option<Self>
[src]
use clacc::bigint::{BigInt, BigIntGmp}; let a: BigIntGmp = 123.into(); let n: BigIntGmp = 4567.into(); let i = a.invert(&n).unwrap(); assert_eq!(i, 854.into());
fn to_vec(&self) -> Vec<u8>
[src]
use clacc::bigint::{BigInt, BigIntGmp}; let x: BigIntGmp = 15.into(); assert_eq!(x.to_vec(), vec![0x0f]);
impl<'a> BigIntAdd<&'a BigIntGmp> for BigIntGmp
[src]
impl<'a> BigIntDiv<&'a BigIntGmp> for BigIntGmp
[src]
impl<'a> BigIntMul<&'a BigIntGmp> for BigIntGmp
[src]
impl<'a> BigIntSub<&'a BigIntGmp> for BigIntGmp
[src]
impl BigIntSub<i64> for BigIntGmp
[src]
impl Clone for BigIntGmp
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BigIntGmp
[src]
impl Default for BigIntGmp
[src]
impl<'de> Deserialize<'de> for BigIntGmp
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for BigIntGmp
[src]
impl Eq for BigIntGmp
[src]
impl<'_> From<&'_ Mpz> for BigIntGmp
[src]
impl<'a> From<&'a [u8]> for BigIntGmp
[src]
impl From<Mpz> for BigIntGmp
[src]
impl From<i64> for BigIntGmp
[src]
impl LowerHex for BigIntGmp
[src]
impl PartialEq<BigIntGmp> for BigIntGmp
[src]
impl PartialOrd<BigIntGmp> for BigIntGmp
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for BigIntGmp
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
use clacc::bigint::BigIntGmp; let x: BigIntGmp = 6666666666.into(); let bytes = velocypack::to_bytes(&x).unwrap(); let de = velocypack::from_bytes(&bytes).unwrap(); assert_eq!(x, de);
impl UpperHex for BigIntGmp
[src]
Auto Trait Implementations
impl RefUnwindSafe for BigIntGmp
impl Send for BigIntGmp
impl Sync for BigIntGmp
impl Unpin for BigIntGmp
impl UnwindSafe for BigIntGmp
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,