org.apache.commons.math.analysis
Class SinFunction

java.lang.Object
  extended by org.apache.commons.math.analysis.SinFunction
All Implemented Interfaces:
org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction, org.apache.commons.math.analysis.UnivariateRealFunction

public class SinFunction
extends java.lang.Object
implements org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction

Auxillary class for testing solvers. The function is extraordinarily well behaved around zero roots: it has an inflection point there (second order derivative is zero), which means linear approximation (Regula Falsi) will converge quadratically.

Version:
$Revision: 480442 $ $Date: 2006-11-29 00:21:22 -0700 (Wed, 29 Nov 2006) $

Constructor Summary
SinFunction()
           
 
Method Summary
 org.apache.commons.math.analysis.UnivariateRealFunction derivative()
           
 double value(double x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SinFunction

public SinFunction()
Method Detail

value

public double value(double x)
             throws org.apache.commons.math.FunctionEvaluationException
Specified by:
value in interface org.apache.commons.math.analysis.UnivariateRealFunction
Throws:
org.apache.commons.math.FunctionEvaluationException

derivative

public org.apache.commons.math.analysis.UnivariateRealFunction derivative()
Specified by:
derivative in interface org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.