Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hartmath.expression
Interface HNumber  view HNumber download HNumber.java

All Known Subinterfaces:
HRational, HSignedNumber
All Known Implementing Classes:
HComplex, HDouble, HDoubleComplex, HFraction, HInteger

public interface HNumber

Interface that represents a number.


Method Summary
 HObject abs(com.hartmath.lib.Session session)
          Returns the absolute value.
 int compSignum()
          0 for this == 0; +1 for re(this) > 0 or ( re(this)==0 and im(this)>0 ); -1 for re(this) < 0 or ( re(this)==0 and im(this)<0 );
 HObject conjugate()
          returns the conjugate complex of a number
 HObject im()
          returns the imaginary part of a number
 boolean isZero()
          Gets the zero attribute of the HNumber object
 HObject re()
          returns the real part of a number
 

Method Detail

compSignum

public int compSignum()
0 for this == 0; +1 for re(this) > 0 or ( re(this)==0 and im(this)>0 ); -1 for re(this) < 0 or ( re(this)==0 and im(this)<0 );


abs

public HObject abs(com.hartmath.lib.Session session)
Returns the absolute value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.


conjugate

public HObject conjugate()
returns the conjugate complex of a number


re

public HObject re()
returns the real part of a number


im

public HObject im()
returns the imaginary part of a number


isZero

public boolean isZero()
Gets the zero attribute of the HNumber object