Added interfaces for differentiable multidimensional functions.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1383450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f4cd0eec56
commit
76e8646b95
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.math3.analysis.differentiation;
|
||||
|
||||
import org.apache.commons.math3.analysis.MultivariateFunction;
|
||||
import org.apache.commons.math3.exception.DimensionMismatchException;
|
||||
import org.apache.commons.math3.exception.MathIllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Extension of {@link MultivariateFunction} representing a
|
||||
* multivariate differentiable real function.
|
||||
* @version $Id$
|
||||
* @since 3.1
|
||||
*/
|
||||
public interface MultivariateDifferentiableFunction extends MultivariateFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function at the given point.
|
||||
*
|
||||
* @param point Point at which the function must be evaluated.
|
||||
* @return the function value for the given point.
|
||||
* @throws org.apache.commons.math3.exception.DimensionMismatchException
|
||||
* if the parameter's dimension is wrong for the function being evaluated.
|
||||
* @throws org.apache.commons.math3.exception.MathIllegalArgumentException
|
||||
* when the activated method itself can ascertain that preconditions,
|
||||
* specified in the API expressed at the level of the activated method,
|
||||
* have been violated. In the vast majority of cases where Commons Math
|
||||
* throws this exception, it is the result of argument checking of actual
|
||||
* parameters immediately passed to a method.
|
||||
*/
|
||||
DerivativeStructure value(DerivativeStructure[] point)
|
||||
throws DimensionMismatchException, MathIllegalArgumentException;
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.math3.analysis.differentiation;
|
||||
|
||||
import org.apache.commons.math3.analysis.MultivariateVectorFunction;
|
||||
import org.apache.commons.math3.exception.DimensionMismatchException;
|
||||
|
||||
|
||||
/**
|
||||
* Extension of {@link MultivariateVectorFunction} representing a
|
||||
* multivariate differentiable vectorial function.
|
||||
* @version $Id$
|
||||
* @since 3.1
|
||||
*/
|
||||
public interface MultivariateDifferentiableVectorFunction
|
||||
extends MultivariateVectorFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function at the given point.
|
||||
* @param point point at which the function must be evaluated
|
||||
* @return function value for the given point
|
||||
* @exception DimensionMismatchException if points dimension is wrong
|
||||
*/
|
||||
DerivativeStructure[] value(DerivativeStructure[] point)
|
||||
throws DimensionMismatchException;
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.math3.analysis.differentiation;
|
||||
|
||||
import org.apache.commons.math3.analysis.UnivariateMatrixFunction;
|
||||
|
||||
/**
|
||||
* Extension of {@link UnivariateMatrixFunction} representing a univariate differentiable matrix function.
|
||||
*
|
||||
* @version $Id$
|
||||
* @since 3.1
|
||||
*/
|
||||
public interface UnivariateDiferentiableMatrixFunction
|
||||
extends UnivariateMatrixFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
* @return the value
|
||||
*/
|
||||
DerivativeStructure[][] value(DerivativeStructure x);
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.math3.analysis.differentiation;
|
||||
|
||||
import org.apache.commons.math3.analysis.UnivariateVectorFunction;
|
||||
|
||||
/**
|
||||
* Extension of {@link UnivariateVectorFunction} representing a univariate differentiable vectorial function.
|
||||
*
|
||||
* @version $Id$
|
||||
* @since 3.1
|
||||
*/
|
||||
public interface UnivariateDifferentiableVectorFunction
|
||||
extends UnivariateVectorFunction {
|
||||
|
||||
/**
|
||||
* Compute the value for the function.
|
||||
* @param x the point for which the function value should be computed
|
||||
* @return the value
|
||||
*/
|
||||
DerivativeStructure[] value(DerivativeStructure x);
|
||||
|
||||
}
|
|
@ -26,6 +26,10 @@
|
|||
* interface. Any differentiable function should implement this interface.
|
||||
* </p>
|
||||
* <p>
|
||||
* Similar interfaces also exist for multivariate functions and for vector or
|
||||
* matrix valued functions.
|
||||
* </p>
|
||||
* <p>
|
||||
* The {@link UnivariateDifferentiator} interface defines a way to differentiation
|
||||
* a simple {@link org.apache.commons.math3.analysis.UnivariateFunction
|
||||
* univariate function} and get a {@link differential function}.
|
||||
|
|
Loading…
Reference in New Issue