/*
 * @(#)Function.java    2.4.0   8 July 2005
 *
 * Copyright 2005
 * College of Computer and Information Science
 * Northeastern University
 * Boston, MA  02115
 *
 * The Java Power Tools software may be used for educational
 * purposes as long as this copyright notice is retained intact
 * at the top of all source files.
 *
 * To discuss possible commercial use of this software, 
 * contact Richard Rasala at Northeastern University, 
 * College of Computer and Information Science,
 * 617-373-2462 or rasala@ccs.neu.edu.
 *
 * The Java Power Tools software has been designed and built
 * in collaboration with Viera Proulx and Jeff Raab.
 *
 * Should this software be modified, the words "Modified from 
 * Original" must be included as a comment below this notice.
 *
 * All publication rights are retained.  This software or its 
 * documentation may not be published in any media either
 * in whole or in part without explicit permission.
 *
 * This software was created with support from Northeastern 
 * University and from NSF grant DUE-9950829.
 */

package edu.neu.ccs;

import java.awt.geom.*;

/**
 * <p>Class <code>Function</code> is a collection of interfaces
 * that classify functions that accept and return values of
 * type <code>double</code> according to the number and kind of
 * direct function arguments.</p>
 *
 * <p>For example, a class that implements the interface
 * <code>Function.OneArg</code> is required to have a method
 * with the following signature.</p>
 *
 * <p><code>public double evaluate(double x)</code>.</p>
 *
 * <p>Tools and instances of <code>Function.OneArg</code>
 * may be found in the classes <code>F</code>,
 * <code>XPolynomial</code>, and <code>XFourier</code>.</p>
 *
 * <p>Class <code>Function</code> cannot be instantiated.</p>
 *
 * @author  Richard Rasala
 * @version 2.4.0
 * @since   2.3.2
 */
public class Function {
    
    private Function() {}
    
    public interface NoArg {
        public double evaluate();
    }
    
    public interface OneArg {
        public double evaluate(double x);
    }
    
    public interface TwoArg {
        public double evaluate(double x, double y);
    }
    
    public interface ThreeArg {
        public double evaluate(double x, double y, double z);
    }
    
    public interface FourArg {
        public double evaluate(double x, double y, double z, double w);
    }
    
    public interface ArrayArg {
        public double evaluate(double[] args);
    }
    
    public interface TwoArrayArg {
        public double evaluate(double[] args1, double[] args2);
    }
    
    public interface ArrayOfArrayArg {
        public double evaluate(double[][] args);
    }
    
    public interface Point2DArg {
        public double evaluate(Point2D p);
    }
    
    public interface Point2DArrayArg {
        public double evaluate(Point2D[] args);
    }
    
}
