public override bool Equals(Object obj) //This could fail { if (this == obj) { return(true); } if (obj == null) { return(false); } if (!(obj is Fp)) { return(false); } Fp other = (Fp)obj; if (r == null) { if (other.r != null) { return(false); } } else if (!r.Equals(other.r)) { return(false); } return(true); }
public Complex(Fp field, BigInt real) { this.field = field; if (!this.field.IsValidElement(real)) { throw new ArgumentException("The input values are not in the field."); } this.real = real; this.imag = BigInt.ZERO; }
public ComplexField(Fp baseField) { this.field = baseField; }
public HalfComplex(Fp field, BigInt real) { this.field = field; this.real = real; }
public Complex(Fp field, BigInt real, BigInt imag) { this.field = field; this.real = real; this.imag = imag; }