|
OPTK
0.1.2
Toolkit for global optimisation algorithms
|
Implements the main types used in the program. More...
#include <optk/types.hpp>Macros | |
| #define | deltype(type, src) |
Functions | |
| static bool | dbleq (double a, double b) |
| static sspace::param_t * | find_key (const std::string &k, sspace::sspace_t *sspace) |
| static void | validate_int_value (int ival, sspace::param_t *iparam) |
| static void | validate_dbl_value (double dval, sspace::param_t *dparam) |
| static void | validate_str_value (std::string sval, sspace::param_t *sparam) |
Implements the main types used in the program.
Copyright (C) 2020 Maxime Robeyns maximerobeyns@gmail.com
Written for the ACRC, University of Bristol
Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.
| #define deltype | ( | type, | |
| src | |||
| ) |
|
static |
Searches a vector of sspace::param_t values for an element matching the provided key. Throws an exception upon error.
| k | The key to search for |
| sspace | The vector of sspace::param_t values to search through. |
| std::invalid_argument | When the key cannot be found. |
|
static |
Validates a double-valued parameter.
| dval | A double-precision floating point value |
| dparam | The corresponding specification for the parameter |
| std::invalid_argument | if dval is invalid under dparam. |
|
static |
Validates an integer-valued parameter.
| ival | An integer |
| iparam | The corresponding specification for the parameter |
| std::invalid_argument | if ival is invalid under iparam. |
|
static |
Validates a string-valued parameter.
| sval | A string value |
| sparam | The corresponding specification for the parameter |
| std::invalid_argument | if sval is invalid under sparam. |
1.8.13