32 lines
696 B
C++
32 lines
696 B
C++
// Copyright 2022 James Pace
|
|
// All Rights Reserved.
|
|
//
|
|
// For a license to this software contact
|
|
// James Pace at jpace121@gmail.com.
|
|
//
|
|
// 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.
|
|
#ifndef J7S__COSTFUNCTION_HPP_
|
|
#define J7S__COSTFUNCTION_HPP_
|
|
|
|
namespace j7s
|
|
{
|
|
class CostFunction
|
|
{
|
|
public:
|
|
CostFunction(double a, double b, double c);
|
|
double eval(double input) const;
|
|
|
|
double actualBest() const;
|
|
|
|
private:
|
|
double m_a;
|
|
double m_b;
|
|
double m_c;
|
|
};
|
|
|
|
} // namespace j7s
|
|
|
|
#endif // J7S__COSTFUNCTION_HPP_
|