Top Description Fields Constructors Methods
org.jruby

public Class RubyComplex

extends RubyNumeric
Class Inheritance
Annotations
@JRubyClass
name:Complex
parent:Numeric
Imports
org.jcodings.specific.ASCIIEncoding, org.jruby.anno.JRubyClass, .JRubyMethod, org.jruby.api.Convert, org.jruby.ast.util.ArgsUtil, org.jruby.exceptions.RaiseException, org.jruby.runtime.Arity, .CallSite, .ClassIndex, .Helpers, .JavaSites, .ObjectMarshal, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.marshal.MarshalDumper, .MarshalLoader, org.jruby.util.ByteList, .Numeric, .TypeConverter, org.jruby.util.io.RubyInputStream, .RubyOutputStream, java.io.IOException, java.nio.ByteBuffer, java.util.Arrays, java.util.function.BiFunction

complex.c as of revision: 20011

Field Summary

Modifier and TypeField and Description
private static final ByteList
private static boolean
canonicalization

nucomp_canonicalization

private static final ObjectMarshal<T>
private static final int[][]
private IRubyObject
private IRubyObject
private static final ByteList
Inherited from org.jruby.RubyNumeric:
DBL_EPSILON

Constructor Summary

AccessConstructor and Description
private
RubyComplex(Ruby runtime, RubyClass clazz, IRubyObject real, IRubyObject image)

private
RubyComplex(Ruby runtime, RubyClass clazz)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
abs(ThreadContext context)

Overrides org.jruby.RubyNumeric.abs.

nucomp_abs

public IRubyObject
abs2(ThreadContext context)

Overrides org.jruby.RubyNumeric.abs2.

nucomp_abs2

public IRubyObject
arg(ThreadContext context)

Overrides org.jruby.RubyNumeric.arg.

nucomp_arg

private static RubyNumeric
canonicalizeInternal(ThreadContext context, RubyClass clazz, IRubyObject real, IRubyObject image)

nucomp_s_canonicalize_internal

public boolean
public IRubyObject
private void
public IRubyObject
coerce(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyNumeric.coerce.

nucomp_coerce

public IRubyObject
complex_p(ThreadContext context)

nucomp_complex_p

private IRubyObject
public IRubyObject
conjugate(ThreadContext context)

Overrides org.jruby.RubyNumeric.conjugate.

nucomp_conjugate

public static IRubyObject
convert(ThreadContext context, IRubyObject clazz, IRubyObject[] args)
Deprecated

public static IRubyObject
convert(ThreadContext context, IRubyObject recv, IRubyObject arg)

nucomp_s_convert

public static IRubyObject
convert(ThreadContext context, IRubyObject recv, IRubyObject a1, IRubyObject a2)

nucomp_s_convert

public static IRubyObject
convert(ThreadContext context, IRubyObject recv, IRubyObject a1, IRubyObject a2, IRubyObject kwargs)

nucomp_s_convert

public static IRubyObject
convertCommon(ThreadContext context, IRubyObject recv, IRubyObject a1, IRubyObject a2, boolean raise)

private static RubyNumeric
public static RubyClass
public IRubyObject
demoninator(ThreadContext context)

nucomp_denominator

public IRubyObject
eql_p(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyNumeric.eql_p.

nucomp_eql_p

private boolean
equals(ThreadContext context, Object other)

public boolean
equals(Object
object to compare
other
)

Overrides org.jruby.RubyObject.equals.

This override does not do a "checked" dispatch.

public IRubyObject
exact_p(ThreadContext context)

nucomp_exact_p

private static IRubyObject
f_complex_polar(ThreadContext context, RubyClass clazz, IRubyObject x, IRubyObject y)

f_complex_polar

public static IRubyObject
public IRubyObject
fdiv(ThreadContext context, IRubyObject other)

Overrides org.jruby.RubyNumeric.fdiv.

nucomp_fdiv

public IRubyObject
pack-priv IRubyObject
public ClassIndex
getNativeClassIndex()

Overrides org.jruby.RubyObject.getNativeClassIndex.

Implements org.jruby.runtime.marshal.CoreObjectType.getNativeClassIndex.

This is overridden in the other concrete Java builtins to provide a fast way to determine what type they are.

pack-priv IRubyObject
public RubyFixnum
hash(ThreadContext
the current thread context
context
)

Overrides org.jruby.RubyBasicObject.hash.

nucomp_hash

public int
hashCode()

Overrides org.jruby.RubyObject.hashCode.

This override does not do "checked" dispatch since Object usually has #hash defined.

public IRubyObject
image()
Deprecated since 10.0.

public IRubyObject
image(ThreadContext context)

Overrides org.jruby.RubyNumeric.image.

nucomp_image

public IRubyObject
inexact_p(ThreadContext context)

nucomp_exact_p

public IRubyObject
public IRubyObject
public boolean
private static boolean
private static IRubyObject
m_cos(ThreadContext context, IRubyObject x)

m_cos

private static IRubyObject
m_sin(ThreadContext context, IRubyObject x)

m_sin

private static IRubyObject
m_sqrt(ThreadContext context, IRubyObject x)

m_sqrt

public IRubyObject
marshal_dump(ThreadContext context)

nucomp_marshal_dump

public IRubyObject
marshal_load(ThreadContext context, IRubyObject arg)

nucomp_marshal_load

public IRubyObject
negate(ThreadContext context)

nucomp_negate

pack-priv static RubyNumeric
newComplex(ThreadContext context, RubyClass clazz, IRubyObject x)

f_complex_new1

pack-priv static RubyNumeric
newComplex(ThreadContext context, RubyClass clazz, IRubyObject x, IRubyObject y)

f_complex_new2

pack-priv static RubyComplex
newComplexBang(ThreadContext context, RubyClass clazz, RubyNumeric x, RubyNumeric y)

f_complex_new_bang2

pack-priv static RubyComplex
newComplexBang(ThreadContext context, RubyClass clazz, RubyNumeric x)

f_complex_new_bang1

public static RubyComplex
newComplexBang(ThreadContext context, RubyClass clazz, IRubyObject x)
Deprecated

public static IRubyObject
public static IRubyObject
public static IRubyObject
public static IRubyObject
newComplexConvert(ThreadContext context, IRubyObject x, IRubyObject y)

rb_Complex/rb_Complex2

private static RubyComplex
pack-priv static IRubyObject
newComplexPolar(ThreadContext context, IRubyObject x, IRubyObject y)

rb_complex_polar

public static RubyComplex
newComplexRaw(Ruby runtime, IRubyObject x, IRubyObject y)

rb_complex_raw

public static RubyComplex
newComplexRaw(Ruby runtime, IRubyObject x)

rb_complex_raw1

public static RubyComplex
public static IRubyObject
newInstance(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

nucomp_s_new

public static IRubyObject
public static IRubyObject
newInstance(ThreadContext context, IRubyObject recv, IRubyObject real, boolean raise)

public static IRubyObject
public static IRubyObject
newInstance(ThreadContext context, IRubyObject recv, IRubyObject real, IRubyObject image, boolean raise)

public static IRubyObject
newInstanceBang(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

nucomp_s_new_bang

public static IRubyObject
public static IRubyObject
public static IRubyObject
newInstanceNew(ThreadContext context, IRubyObject recv, IRubyObject real)
Deprecated

public static IRubyObject
newInstanceNew(ThreadContext context, IRubyObject recv, IRubyObject real, IRubyObject image)
Deprecated

private boolean
public IRubyObject
numerator(ThreadContext context)

Overrides org.jruby.RubyNumeric.numerator.

nucomp_numerator

public IRubyObject
op_add(ThreadContext context, IRubyObject other)

nucomp_add

public IRubyObject
public IRubyObject
op_div(ThreadContext context, IRubyObject other)

nucomp_div / nucomp_quo / rb_complex_div

public IRubyObject
public IRubyObject
op_expt(ThreadContext context, IRubyObject other)

MRI: nucomp_expt, rb_complex_pow

public IRubyObject
op_mul(ThreadContext context, IRubyObject other)

nucomp_mul

public IRubyObject
op_sub(ThreadContext context, IRubyObject other)

nucomp_sub

public static IRubyObject
polar(ThreadContext context, IRubyObject clazz, IRubyObject... args)

nucomp_s_polar

public IRubyObject
polar(ThreadContext context)

Overrides org.jruby.RubyNumeric.polar.

nucomp_polar

public IRubyObject
rationalize(ThreadContext context, IRubyObject[] args)

nucomp_rationalize

public IRubyObject
real()
Deprecated since 10.0.

public IRubyObject
real(ThreadContext context)

Overrides org.jruby.RubyNumeric.real.

numeric_real

public IRubyObject
real_p(ThreadContext context)

Overrides org.jruby.RubyNumeric.real_p.

nucomp_real_p

private static boolean
realCheck(ThreadContext context, IRubyObject num, boolean raise)

nucomp_real_check (might go to bimorphic)

public IRubyObject
rect(ThreadContext context)

Overrides org.jruby.RubyNumeric.rect.

nucomp_rect

public static void
setCanonicalization(boolean canonical)

private static boolean
signbit(ThreadContext context, IRubyObject x)

f_signbit

private static JavaSites.ComplexSites
sites(ThreadContext context)

Hides org.jruby.RubyNumeric.sites.

Retrieve the call sites for this class.

pack-priv static IRubyObject[]
private static IRubyObject
str_to_c_strict(ThreadContext context, RubyString str, boolean raise)

public IRubyObject
to_c(ThreadContext context)

Overrides org.jruby.RubyNumeric.to_c.

nucomp_to_c

public IRubyObject
to_f(ThreadContext context)

nucomp_to_f

public IRubyObject
to_i(ThreadContext context)

nucomp_to_i

public IRubyObject
to_r(ThreadContext context)

nucomp_to_r

public IRubyObject
to_s(ThreadContext context)

Overrides org.jruby.RubyBasicObject.to_s.

nucomp_to_s

private static boolean
tpositive_p(ThreadContext context, IRubyObject x)

f_tpositive_p

private static IRubyObject
Inherited from org.jruby.RubyNumeric:
asBigIntegerasDoubleasIntasLongasNumericcallCoercedcallCoercedcallCoercedcallCoercedceilceilcheckIntcheckIntcoercecoerceBincoerceBincoerceBitcoerceBitcoerceCmpcoerceCmpcoerceFailedcoerceRelOpcoerceRelOpcoerceRescuecompareNumberWithZerocompareWithZeroconvertToRationalconvertToRationalcreateNumericClassdbl2ivaldbl2numdbl_cmpdenominatordivdivmoddoCoercedupfix2intfix2intfix2longfixablefloat2longfloat2ulongfloatStepfloatStepSizefloorfloorgetBigIntegerValuegetCoercedgetDoubleValuegetIntValuegetLongValuegetRoundingModeidividivinitialize_copyint2fixinteger_pinteger_pintervalStepSizeisNegativeisNegativeisNegativeNumberisPositiveisPositiveisPositiveNumberisZeroisZeromagnitudemodulomodulonegativeIntnegFixablenegFixablenewNumericnonzero_pnum2chrnum2dblnum2dblnum2fixnum2fixnum2intnum2longnum2ulongnum_imaginarynumFuncallnumFuncallnumRemainderop_minusop_notop_num_equalop_plusop_uminusop_uplusop_uplusposFixableposFixablepositiveIntquorbClonerbClonerbClonerbCloneremainderroundroundscalar_psingleton_method_addedstepstr2fnumstr2fnumstr2fnumstr2inumstr2inumstr2inumto_inttoJavatruncatetruncatezero_p