001/*
002 *   BasisFunction  -- Interface that defines a basis function as used by ModelData.
003 *
004 *   Copyright (C) 2002-2025, by Joseph A. Huwaldt. All rights reserved.
005 *   
006 *   This library is free software; you can redistribute it and/or
007 *   modify it under the terms of the GNU Lesser General Public
008 *   License as published by the Free Software Foundation; either
009 *   version 2 of the License, or (at your option) any later version.
010 *   
011 *   This library is distributed in the hope that it will be useful,
012 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
013 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 *   Lesser General Public License for more details.
015 *
016 *   You should have received a copy of the GNU Lesser General Public License
017 *   along with this program; if not, write to the Free Software
018 *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
019 *   Or visit:  http://www.gnu.org/licenses/lgpl.html
020 */
021package jahuwaldt.tools.math;
022
023/**
024 * Defines the interface for a basis function as required by the ModelData class.
025 *
026 * <p> Modified by: Joseph A. Huwaldt </p>
027 *
028 * @author Joseph A. Huwaldt    Date:   October 21, 2002
029 * @version February 23, 2025
030 */
031public interface BasisFunction {
032
033    /**
034     * Method that returns the minimum number of coefficients allowed by this basis
035     * function.
036     *
037     * @return The minimum number of coefficients allowed by this basis function.
038     */
039    public int getMinNumCoef();
040
041    /**
042     * Basis function that takes an input x and calculates the parameters of the function
043     * placing them in p[].
044     *
045     * @param x The function input parameter.
046     * @param p The array to hold the output parameters.
047     */
048    public void func(double x, double[] p);
049}