org.python.core

Class PyComplex

public class PyComplex extends PyObject

A builtin python complex number
Field Summary
static Stringexposed_name
doubleimag
doublereal
Constructor Summary
PyComplex(PyType subtype, double r, double i)
PyComplex(double r, double i)
Method Summary
static PyObjectcomplex_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
PyComplexconjugate()
PyFloatgetImag()
PyFloatgetReal()
inthashCode()
booleanisMappingType()
booleanisSequenceType()
StringsafeRepr()
static StringtoString(double value)
StringtoString()
static voidtypeSetup(PyObject dict, PyType.Newstyle marker)
static PyObject_pow(PyComplex value, PyComplex right)
PyObject__abs__()
PyObject__add__(PyObject right)
int__cmp__(PyObject other)
Object__coerce_ex__(PyObject other)
PyComplex__complex__()
PyObject__divmod__(PyObject right)
PyObject__div__(PyObject right)
PyObject__eq__(PyObject other)
PyFloat__float__()
PyObject__floordiv__(PyObject right)
PyObject__ge__(PyObject other)
PyObject__gt__(PyObject other)
PyObject__int__()
PyObject__invert__()
PyObject__le__(PyObject other)
PyLong__long__()
PyObject__lt__(PyObject other)
PyObject__mod__(PyObject right)
PyObject__mul__(PyObject right)
PyObject__neg__()
PyObject__ne__(PyObject other)
boolean__nonzero__()
PyObject__pos__()
PyObject__pow__(PyObject right, PyObject modulo)
PyObject__radd__(PyObject left)
PyObject__rdivmod__(PyObject left)
PyObject__rdiv__(PyObject left)
PyObject__reduce__()
Used for pickling.
PyObject__rfloordiv__(PyObject left)
PyObject__rmod__(PyObject left)
PyObject__rmul__(PyObject left)
PyObject__rpow__(PyObject left)
PyObject__rsub__(PyObject left)
PyObject__rtruediv__(PyObject left)
PyObject__sub__(PyObject right)
PyObject__truediv__(PyObject right)

Field Detail

exposed_name

public static final String exposed_name

imag

public double imag

real

public double real

Constructor Detail

PyComplex

public PyComplex(PyType subtype, double r, double i)

PyComplex

public PyComplex(double r, double i)

Method Detail

complex_new

public static PyObject complex_new(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)

conjugate

public PyComplex conjugate()

getImag

public final PyFloat getImag()

getReal

public final PyFloat getReal()

hashCode

public int hashCode()

isMappingType

public boolean isMappingType()

isSequenceType

public boolean isSequenceType()

safeRepr

public String safeRepr()

toString

public static String toString(double value)

toString

public String toString()

typeSetup

public static void typeSetup(PyObject dict, PyType.Newstyle marker)

_pow

public static PyObject _pow(PyComplex value, PyComplex right)

__abs__

public PyObject __abs__()

__add__

public PyObject __add__(PyObject right)

__cmp__

public int __cmp__(PyObject other)

__coerce_ex__

public Object __coerce_ex__(PyObject other)

__complex__

public PyComplex __complex__()

__divmod__

public PyObject __divmod__(PyObject right)

__div__

public PyObject __div__(PyObject right)

__eq__

public PyObject __eq__(PyObject other)

__float__

public PyFloat __float__()

__floordiv__

public PyObject __floordiv__(PyObject right)

__ge__

public PyObject __ge__(PyObject other)

__gt__

public PyObject __gt__(PyObject other)

__int__

public PyObject __int__()

__invert__

public PyObject __invert__()

__le__

public PyObject __le__(PyObject other)

__long__

public PyLong __long__()

__lt__

public PyObject __lt__(PyObject other)

__mod__

public PyObject __mod__(PyObject right)

__mul__

public PyObject __mul__(PyObject right)

__neg__

public PyObject __neg__()

__ne__

public PyObject __ne__(PyObject other)

__nonzero__

public boolean __nonzero__()

__pos__

public PyObject __pos__()

__pow__

public PyObject __pow__(PyObject right, PyObject modulo)

__radd__

public PyObject __radd__(PyObject left)

__rdivmod__

public PyObject __rdivmod__(PyObject left)

__rdiv__

public PyObject __rdiv__(PyObject left)

__reduce__

public PyObject __reduce__()
Used for pickling.

Returns: a tuple of (class, (Integer))

__rfloordiv__

public PyObject __rfloordiv__(PyObject left)

__rmod__

public PyObject __rmod__(PyObject left)

__rmul__

public PyObject __rmul__(PyObject left)

__rpow__

public PyObject __rpow__(PyObject left)

__rsub__

public PyObject __rsub__(PyObject left)

__rtruediv__

public PyObject __rtruediv__(PyObject left)

__sub__

public PyObject __sub__(PyObject right)

__truediv__

public PyObject __truediv__(PyObject right)