001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
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 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
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 */
017
018package org.apache.commons.math3.optimization.univariate;
019
020import java.io.Serializable;
021
022/**
023 * This class holds a point and the value of an objective function at this
024 * point.
025 * This is a simple immutable container.
026 *
027 * @deprecated As of 3.1 (to be removed in 4.0).
028 * @since 3.0
029 */
030@Deprecated
031public class UnivariatePointValuePair implements Serializable {
032    /** Serializable version identifier. */
033    private static final long serialVersionUID = 1003888396256744753L;
034    /** Point. */
035    private final double point;
036    /** Value of the objective function at the point. */
037    private final double value;
038
039    /**
040     * Build a point/objective function value pair.
041     *
042     * @param point Point.
043     * @param value Value of an objective function at the point
044     */
045    public UnivariatePointValuePair(final double point,
046                                    final double value) {
047        this.point = point;
048        this.value = value;
049    }
050
051    /**
052     * Get the point.
053     *
054     * @return the point.
055     */
056    public double getPoint() {
057        return point;
058    }
059
060    /**
061     * Get the value of the objective function.
062     *
063     * @return the stored value of the objective function.
064     */
065    public double getValue() {
066        return value;
067    }
068}