Interior-point-optimisation  1.0-1
Interior-pointoptimisationlibrary
FunctionBase.hpp
Go to the documentation of this file.
1 /*
2  * $Id: FunctionBase.hpp 185 2014-10-22 09:24:15Z jdl3 $
3  * Copyright (C) 2013 John D Lamb
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or (at
8  * your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 #ifndef IPO_FUNCTION_DETAIL_FUNCTIONBASE_HPP
21 #define IPO_FUNCTION_DETAIL_FUNCTIONBASE_HPP
22 
23 #include<cstddef>
24 
28 namespace ipo_function {
33  namespace detail {
41  class FunctionBase {
42  public:
48  FunctionBase( size_t const size = 0 );
52  virtual ~FunctionBase() = 0;
57  size_t getSize() const { return size; }
58  protected:
63  size_t const size;
64  };
65  }
66 }
67 
68 #endif
virtual ~FunctionBase()=0
Make the class abstract.
Definition: FunctionBase.cc:30
size_t getSize() const
Get size of vector for function arguments or zero for arbitrary size.
Namespace for functions that can be used by ipo::Objective and ipo::Constraint.
Base class for Function and DerivativesEstimates.
size_t const size
Size of vector arguments to supply to subclass functions.
FunctionBase(size_t const size=0)
Constructor.
Definition: FunctionBase.cc:28