|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.jpair.pairing.Complex
public class Complex
This immutable class defines complex numbers over a finite field, i.e. the real and imaginary parts of the complex number are taken over the finite field.
Constructor Summary | |
---|---|
Complex(Fp field,
BigInt real)
|
|
Complex(Fp field,
BigInt real,
BigInt imag)
|
Method Summary | |
---|---|
Complex |
add(Complex p)
|
Complex |
conjugate()
Return the conjugate of this complex number. |
Complex |
divide(Complex p)
|
boolean |
equals(java.lang.Object obj)
|
Field |
getField()
|
BigInt |
getImag()
|
BigInt |
getReal()
|
int |
hashCode()
|
Complex |
inverse()
|
boolean |
isOne()
|
boolean |
isZero()
|
Complex |
multiply(Complex p)
|
Complex |
multiply(int val)
|
Complex |
negate()
|
Complex |
pow(BigInt k)
|
Complex |
square()
|
Complex |
substract(Complex p)
|
byte[] |
toByteArray()
Return a single byte array which is equivalent to this.real.toByteArray()||this.imag.toByteArray(); |
java.lang.String |
toString()
Return a string in the format of [a,b] where a and b are the real and imaginary parts of the complex number a+bi. |
java.lang.String |
toString(int radix)
Return a string in the format of [a,b] where a and b are the real and imaginary parts of the complex number a+bi. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Complex(Fp field, BigInt real)
public Complex(Fp field, BigInt real, BigInt imag)
Method Detail |
---|
public boolean isZero()
public boolean isOne()
public Complex add(Complex p)
public Complex substract(Complex p)
public Complex negate()
public Complex multiply(Complex p)
public Complex square()
public Complex divide(Complex p)
public Complex conjugate()
a+bi
, then the conjugate is a-bi
.
public Complex pow(BigInt k)
public Complex inverse()
public Complex multiply(int val)
public Field getField()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int radix)
toString
in interface FieldElement
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public BigInt getReal()
public BigInt getImag()
public byte[] toByteArray()
toByteArray
in interface FieldElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |