org.jcurl.math.analysis.R1R1Function.java Source code

Java tutorial

Introduction

Here is the source code for org.jcurl.math.analysis.R1R1Function.java

Source

/*
 * jcurl curling simulation framework 
 * Copyright (C) 2005-2006 M. Rohrmoser
 * 
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */
package org.jcurl.math.analysis;

import org.apache.commons.math.FunctionEvaluationException;
import org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction;
import org.apache.commons.math.analysis.UnivariateRealFunction;

/**
 * Functions <code>f : R -&gt; R</code>. If it's not differentiable the
 * derivative shall return <code>null</code>
 * 
 * @author <a href="mailto:jcurl@gmx.net">M. Rohrmoser </a>
 * @version $Id$
 */
public interface R1R1Function extends DifferentiableUnivariateRealFunction {

    /**
     * Get the derivative or <code>null</code> if not differentiable.
     * 
     * @return <code>null</code> if not differentiable.
     */
    public abstract UnivariateRealFunction derivative();

    /**
     * Very useful if e.g.&nbsp;coordinate transformations are involved.
     */
    public abstract boolean isLinear();

    public abstract double value(double x) throws FunctionEvaluationException;
}