Uses of Class
org.apache.commons.math.fraction.Fraction
-
Packages that use Fraction Package Description org.apache.commons.math.fraction Fraction number type and fraction number formatting.org.apache.commons.math.linear Linear algebra support. -
-
Uses of Fraction in org.apache.commons.math.fraction
Fields in org.apache.commons.math.fraction declared as Fraction Modifier and Type Field Description static Fraction
Fraction. FOUR_FIFTHS
A fraction representing "4/5".static Fraction
Fraction. MINUS_ONE
A fraction representing "-1 / 1".static Fraction
Fraction. ONE
A fraction representing "1".static Fraction
Fraction. ONE_FIFTH
A fraction representing "1/5".static Fraction
Fraction. ONE_HALF
A fraction representing "1/2".static Fraction
Fraction. ONE_QUARTER
A fraction representing "1/4".static Fraction
Fraction. ONE_THIRD
A fraction representing "1/3".static Fraction
Fraction. THREE_FIFTHS
A fraction representing "3/5".static Fraction
Fraction. THREE_QUARTERS
A fraction representing "3/4".static Fraction
Fraction. TWO
A fraction representing "2 / 1".static Fraction
Fraction. TWO_FIFTHS
A fraction representing "2/5".static Fraction
Fraction. TWO_QUARTERS
A fraction representing "2/4".static Fraction
Fraction. TWO_THIRDS
A fraction representing "2/3".static Fraction
Fraction. ZERO
A fraction representing "0".Methods in org.apache.commons.math.fraction that return Fraction Modifier and Type Method Description Fraction
Fraction. abs()
Returns the absolute value of this fraction.Fraction
Fraction. add(int i)
Add an integer to the fraction.Fraction
Fraction. add(Fraction fraction)
Adds the value of this fraction to another, returning the result in reduced form.Fraction
Fraction. divide(int i)
Divide the fraction by an integer.Fraction
Fraction. divide(Fraction fraction)
Divide the value of this fraction by another.Fraction
FractionField. getOne()
Get the multiplicative identity of the field.static Fraction
Fraction. getReducedFraction(int numerator, int denominator)
Creates aFraction
instance with the 2 parts of a fraction Y/Z.Fraction
FractionField. getZero()
Get the additive identity of the field.Fraction
Fraction. multiply(int i)
Multiply the fraction by an integer.Fraction
Fraction. multiply(Fraction fraction)
Multiplies the value of this fraction by another, returning the result in reduced form.Fraction
Fraction. negate()
Return the additive inverse of this fraction.Fraction
FractionFormat. parse(java.lang.String source)
Parses a string to produce aFraction
object.Fraction
FractionFormat. parse(java.lang.String source, java.text.ParsePosition pos)
Parses a string to produce aFraction
object.Fraction
ProperFractionFormat. parse(java.lang.String source, java.text.ParsePosition pos)
Parses a string to produce aFraction
object.Fraction
Fraction. reciprocal()
Return the multiplicative inverse of this fraction.Fraction
Fraction. subtract(int i)
Subtract an integer from the fraction.Fraction
Fraction. subtract(Fraction fraction)
Subtracts the value of another fraction from the value of this one, returning the result in reduced form.Methods in org.apache.commons.math.fraction with parameters of type Fraction Modifier and Type Method Description Fraction
Fraction. add(Fraction fraction)
Adds the value of this fraction to another, returning the result in reduced form.int
Fraction. compareTo(Fraction object)
Compares this object to another based on size.Fraction
Fraction. divide(Fraction fraction)
Divide the value of this fraction by another.java.lang.StringBuffer
FractionFormat. format(Fraction fraction, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
Formats aFraction
object to produce a string.java.lang.StringBuffer
ProperFractionFormat. format(Fraction fraction, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
Formats aFraction
object to produce a string.static java.lang.String
FractionFormat. formatFraction(Fraction f)
This static method calls formatFraction() on a default instance of FractionFormat.Fraction
Fraction. multiply(Fraction fraction)
Multiplies the value of this fraction by another, returning the result in reduced form.Fraction
Fraction. subtract(Fraction fraction)
Subtracts the value of another fraction from the value of this one, returning the result in reduced form. -
Uses of Fraction in org.apache.commons.math.linear
Method parameters in org.apache.commons.math.linear with type arguments of type Fraction Modifier and Type Method Description static Array2DRowRealMatrix
MatrixUtils. fractionMatrixToRealMatrix(FieldMatrix<Fraction> m)
-