JAutoDiff

nilgiri.math.autodiff
Class Inverse<X extends Field<X>>

java.lang.Object
  extended by nilgiri.math.autodiff.DifferentialFunction<X>
      extended by nilgiri.math.autodiff.AbstractUnaryFunction<X>
          extended by nilgiri.math.autodiff.Inverse<X>
Type Parameters:
X - A set forms a field.
All Implemented Interfaces:
Differential<Variable<X>,DifferentialFunction<X>>, CommutativeGroup<DifferentialFunction<X>>, CommutativeRing<DifferentialFunction<X>>, Field<DifferentialFunction<X>>, Group<DifferentialFunction<X>>, Ring<DifferentialFunction<X>>

public class Inverse<X extends Field<X>>
extends AbstractUnaryFunction<X>

This class represents the inverse element of an argument in X with respect to multiplication.


Constructor Summary
Inverse(DifferentialFunction<X> i_v)
          Constructs an object whose value is (1 / i_v).
 
Method Summary
 DifferentialFunction<X> diff(Variable<X> i_v)
          Returns an object of D whose value is the derivative with respect to i_v.
 X getValue()
          Returns the value in X of the function.
 DifferentialFunction<X> inverse()
          Returns an object of X whose value is (1 / this).
 java.lang.String toString()
           
 
Methods inherited from class nilgiri.math.autodiff.AbstractUnaryFunction
arg
 
Methods inherited from class nilgiri.math.autodiff.DifferentialFunction
div, isConstant, isVariable, minus, mul, mul, negate, plus, pow
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Inverse

public Inverse(DifferentialFunction<X> i_v)
Constructs an object whose value is (1 / i_v).

Parameters:
i_v -
Method Detail

getValue

public X getValue()
Description copied from class: DifferentialFunction
Returns the value in X of the function.

Specified by:
getValue in class DifferentialFunction<X extends Field<X>>
Returns:
the value.

diff

public DifferentialFunction<X> diff(Variable<X> i_v)
Description copied from interface: Differential
Returns an object of D whose value is the derivative with respect to i_v.

Specified by:
diff in interface Differential<Variable<X extends Field<X>>,DifferentialFunction<X extends Field<X>>>
Specified by:
diff in class DifferentialFunction<X extends Field<X>>
Returns:
the derivative with respect to i_v.

toString

public java.lang.String toString()
Specified by:
toString in class DifferentialFunction<X extends Field<X>>

inverse

public DifferentialFunction<X> inverse()
Description copied from interface: Field
Returns an object of X whose value is (1 / this).

Specified by:
inverse in interface Field<DifferentialFunction<X extends Field<X>>>
Overrides:
inverse in class DifferentialFunction<X extends Field<X>>
Returns:
1 / this

JAutoDiff

JAutoDiff website