JAutoDiff

nilgiri.math.autodiff
Class Negative<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.Negative<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 Negative<X extends Field<X>>
extends AbstractUnaryFunction<X>

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


Constructor Summary
Negative(DifferentialFunction<X> i_v)
          Constructs an object whose value is (- 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> negate()
          Returns an object of X whose value is (- this).
 java.lang.String toString()
           
 
Methods inherited from class nilgiri.math.autodiff.AbstractUnaryFunction
arg
 
Methods inherited from class nilgiri.math.autodiff.DifferentialFunction
div, inverse, isConstant, isVariable, minus, mul, mul, plus, pow
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Negative

public Negative(DifferentialFunction<X> i_v)
Constructs an object whose value is (- 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>>

negate

public DifferentialFunction<X> negate()
Description copied from interface: Group
Returns an object of X whose value is (- this).

Specified by:
negate in interface Group<DifferentialFunction<X extends Field<X>>>
Overrides:
negate in class DifferentialFunction<X extends Field<X>>
Returns:
- this

JAutoDiff

JAutoDiff website