Class RationalFunction<F extends Field<F>>
java.lang.Object
org.jscience.mathematics.function.Function<F,F>
org.jscience.mathematics.function.RationalFunction<F>
- All Implemented Interfaces:
Serializable
,javolution.lang.Immutable
,javolution.lang.Realtime
,javolution.lang.ValueType
,Field<RationalFunction<F>>
,GroupAdditive<RationalFunction<F>>
,GroupMultiplicative<RationalFunction<F>>
,Ring<RationalFunction<F>>
,Structure<RationalFunction<F>>
public class RationalFunction<F extends Field<F>>
extends Function<F,F>
implements Field<RationalFunction<F>>
This class represents the quotient of two
Polynomial
,
it is also a field
(invertible).- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns a copy of this rational function.differentiate
(Variable<F> v) Returns the first derivative of this function with respect to the specified variable.Returns the quotient of this function with the one specified.divide
(RationalFunction<F> that) Returns the quotient of two rational functions.boolean
Indicates if this function is equals to the specified object.evaluate()
Evaluates this function using itsvariables
current values.Returns the dividend of this rational function.Returns the divisor of this rational function.Returns a lexically ordered list of the variables (or arguments) for this function (empty list for constant functions).int
hashCode()
Returns the hash code for this function (consistent withFunction.equals(Object)
.inverse()
Returns the inverse of this rational function.Returns the difference of this function with the one specified.minus
(RationalFunction<F> that) Returns the difference of two rational functions.opposite()
Returns the opposite of this rational function.Returns the sum of this function with the one specified.plus
(RationalFunction<F> that) Returns the sum of two rational functions.pow
(int n) Returns this function raised at the specified exponent.Returns the product of this function with the one specified.times
(RationalFunction<F> that) Returns the product of two rational functions.javolution.text.Text
toText()
Returns the textual representation of this real-time object (equivalent totoString
except that the returned value can be allocated from the local context space).static <F extends Field<F>>
RationalFunction<F>valueOf
(Polynomial<F> dividend, Polynomial<F> divisor) Returns the rational function from the specified dividend and divisor.
-
Method Details
-
getDividend
Returns the dividend of this rational function.- Returns:
- this rational function dividend.
-
getDivisor
Returns the divisor of this rational function.- Returns:
- this rational function divisor.
-
valueOf
public static <F extends Field<F>> RationalFunction<F> valueOf(Polynomial<F> dividend, Polynomial<F> divisor) Returns the rational function from the specified dividend and divisor.- Parameters:
dividend
- the dividend value.divisor
- the divisor value.- Returns:
dividend / divisor
-
plus
Returns the sum of two rational functions.- Specified by:
plus
in interfaceGroupAdditive<F extends Field<F>>
- Parameters:
that
- the rational function being added.- Returns:
this + that
-
opposite
Returns the opposite of this rational function.- Specified by:
opposite
in interfaceGroupAdditive<F extends Field<F>>
- Returns:
- this
-
minus
Returns the difference of two rational functions.- Parameters:
that
- the rational function being subtracted.- Returns:
this - that
-
times
Returns the product of two rational functions. -
inverse
Returns the inverse of this rational function.- Specified by:
inverse
in interfaceGroupMultiplicative<F extends Field<F>>
- Returns:
1 / this
-
divide
Returns the quotient of two rational functions.- Parameters:
that
- the rational function divisor.- Returns:
this / that
-
getVariables
Description copied from class:Function
Returns a lexically ordered list of the variables (or arguments) for this function (empty list for constant functions). -
evaluate
Description copied from class:Function
Evaluates this function using itsvariables
current values. -
toText
public javolution.text.Text toText()Description copied from class:Function
Returns the textual representation of this real-time object (equivalent totoString
except that the returned value can be allocated from the local context space). -
equals
Description copied from class:Function
Indicates if this function is equals to the specified object. -
hashCode
public int hashCode()Description copied from class:Function
Returns the hash code for this function (consistent withFunction.equals(Object)
. -
differentiate
Description copied from class:Function
Returns the first derivative of this function with respect to the specified variable. -
plus
Description copied from class:Function
Returns the sum of this function with the one specified. -
minus
Description copied from class:Function
Returns the difference of this function with the one specified. -
times
Description copied from class:Function
Returns the product of this function with the one specified. -
divide
Description copied from class:Function
Returns the quotient of this function with the one specified. Evaluation of this function may raise an exception if the function result is not a { -
pow
Description copied from class:Function
Returns this function raised at the specified exponent. -
copy
Returns a copy of this rational function.allocated
by the calling thread (possibly on the stack).- Specified by:
copy
in interfacejavolution.lang.ValueType
- Returns:
- an identical and independant copy of this rational function.
-