OPTK  0.1.2
Toolkit for global optimisation algorithms
Classes | Namespaces | Typedefs | Functions
gridsearch.cpp File Reference

This file implements a simple gridsearch algorithm. More...

#include <optimisers/gridsearch.hpp>
#include <assert.h>

Classes

class  __gs::value< T >
 
class  __gs::node
 

Namespaces

 __gs
 

Typedefs

typedef std::vector< std::tuple< std::string, node * > > __gs::subspaces
 
typedef std::vector< std::tuple< std::string, param * > > __gs::params
 

Functions

static void __gs::iterate_local_params (bool *cont, inst::node *parent, params *values, std::vector< inst::param *> *local_params)
 
static void __gs::iterate_subspaces (bool *cont, inst::node *parent, subspaces *nodes)
 
template<typename T >
static void unpack_categorical (sspace::param_t *param, __gs::node *parent)
 
static void unpack_param (sspace::param_t *param, __gs::node *parent)
 
static bool validate_space (sspace::sspace_t *space)
 

Detailed Description

This file implements a simple gridsearch algorithm.

Copyright (C) 2020 Maxime Robeyns maxim.nosp@m.erob.nosp@m.eyns@.nosp@m.gmai.nosp@m.l.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.

Function Documentation

◆ unpack_param()

static void unpack_param ( sspace::param_t param,
__gs::node parent 
)
static

This function will 'unpack' a parameter in the search space definition, enumerating all its values if it is a concerete parameter, or recursively unpacking nested / conditional parameters.

Parameters
paramThe parameter description to 'unpack'
parentThe parameter space node in which to store the resulting unpacked value.