```001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
010 *
011 * Unless required by applicable law or agreed to in writing, software
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.math4.analysis.interpolation;
018
019import org.apache.commons.math4.analysis.MultivariateFunction;
020import org.apache.commons.math4.exception.DimensionMismatchException;
021import org.apache.commons.math4.exception.MathIllegalArgumentException;
022import org.apache.commons.math4.exception.NoDataException;
023import org.apache.commons.math4.exception.NullArgumentException;
024
025/**
026 * Interface representing a univariate real interpolating function.
027 *
028 * @since 2.1
029 */
030public interface MultivariateInterpolator {
031
032    /**
033     * Computes an interpolating function for the data set.
034     *
035     * @param xval the arguments for the interpolation points.
036     * {@code xval[i][0]} is the first component of interpolation point
037     * {@code i}, {@code xval[i][1]} is the second component, and so on
038     * until {@code xval[i][d-1]}, the last component of that interpolation
039     * point (where {@code d} is thus the dimension of the space).
040     * @param yval the values for the interpolation points
041     * @return a function which interpolates the data set
042     * @throws MathIllegalArgumentException if the arguments violate assumptions
043     * made by the interpolation algorithm.
044     * @throws DimensionMismatchException when the array dimensions are not consistent.
045     * @throws NoDataException if an array has zero-length.
046     * @throws NullArgumentException if the arguments are {@code null}.
047     */
048    MultivariateFunction interpolate(double[][] xval, double[] yval)
049        throws MathIllegalArgumentException, DimensionMismatchException,
050               NoDataException, NullArgumentException;
051}

```