Documentation API of the 'edu.rit.numeric.Rational' Java class
Rational
edu.rit.numeric

Class Rational

  • All Implemented Interfaces:
    Serializable, Comparable


    public class Rationalextends Objectimplements Comparable, Serializable
    Class Rational provides a 32-bit rational number. A 32-bit rational number is the ratio of two 32-bit integers (type int). Operations are provided for exact arithmetic and comparison with rational numbers.

    Class Rational overrides the equals() and hashCode() methods, making it suitable for use as a key in a hashed data structure like a HashMap or HashSet. However, a Rational object is mutable. Take care not to change the value of a Rational object if it is used as a key in a hashed data structure.

    Class Rational is not multiple thread safe.

    See Also:
    Serialized Form

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.