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 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: 799857 $ $Date: 2009-08-01 09:07:12 -0400 (Sat, 01 Aug 2009) $

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-2010 Apache Software Foundation. All Rights Reserved.