Configures a Benchmark class from a CFG file. Inspired in the OMPLapp benchmarking software: http://ompl.kavrakilab.org. More...
#include <benchmarkcfg.hpp>
Public Member Functions | |
BenchmarkCFG () | |
Requires readOptions to be manually called after this constructor. | |
BenchmarkCFG (const char *filename) | |
Creates an object from a CFG file. Automatically calls readOptions. | |
bool | readOptions (const char *filename) |
Parses the CFG file given. | |
template<class grid_t , class cell_t > | |
void | configure (Benchmark< grid_t > &b) |
template<typename T > | |
T | getValue (const std::string &key) const |
Get the value for a given key (option). | |
Private Member Functions | |
template<typename T , size_t N> | |
std::array< T, N > | splitAndCast (const std::string &s) |
From a string of format XXX,YY,ZZZ,... splis the N elements and cast as type T (comma-separated) as an array. | |
std::vector< std::string > | split (const std::string &s) |
From a string of format XXX,YY,ZZZ,... splis the elements (comma-separated) as a vector of strings. | |
Private Attributes | |
std::vector< std::string > | solverNames_ |
Stores the names of the parsed solvers. | |
std::vector< std::string > | ctorParams_ |
Stores the constructor parameters for the parsed solvers. | |
std::unordered_map < std::string, std::string > | options_ |
Option-value map. | |
boost::filesystem::path | path_ |
Stores the absolute path to the CFG file. | |
the getter functions do not check if the types are admissible.
does not have support for multiple starts or goals.
the way ctor parameters are given could be improved (as declareParams in OMPL - command pattern).
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition at line 45 of file benchmarkcfg.hpp.