bpp-core3  3.0.0
NumCalcApplicationTools.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_APP_NUMCALCAPPLICATIONTOOLS_H
6 #define BPP_APP_NUMCALCAPPLICATIONTOOLS_H
7 
8 
9 #include "../Numeric/Function/FunctionTools.h"
10 #include "../Numeric/VectorTools.h"
11 #include "../Text/StringTokenizer.h"
12 #include "ApplicationTools.h"
13 
14 namespace bpp
15 {
17 {
18 public:
20  virtual ~NumCalcApplicationTools();
21 
22 public:
35  static std::vector<int> seqFromString(const std::string& s, const std::string& delim = ",", const std::string& seqdelim = "-");
36 
56  static std::vector<double> getVector(const std::string& desc);
57 
67  static double getDefaultValue(const ParameterList& pl, const std::string& name, double x);
68 
89  static std::shared_ptr<ParameterGrid> getParameterGrid(
90  std::map<std::string, std::string>& params,
91  const std::string& suffix = "",
92  bool suffixIsOptional = true,
93  bool warn = true);
94 };
95 } // End of namespace bpp.
96 #endif // BPP_APP_NUMCALCAPPLICATIONTOOLS_H
static std::vector< double > getVector(const std::string &desc)
Build a vector of double from a structured text description.
static std::shared_ptr< ParameterGrid > getParameterGrid(std::map< std::string, std::string > &params, const std::string &suffix="", bool suffixIsOptional=true, bool warn=true)
Design a parameter grid from input options.
The parameter list object.
Definition: ParameterList.h:27
static double getDefaultValue(const ParameterList &pl, const std::string &name, double x)
Returns the value of the Parameter of the given name if it exists; otherwise returns the default valu...
static std::vector< int > seqFromString(const std::string &s, const std::string &delim=",", const std::string &seqdelim="-")
Build a vector of integers as described by a string.