.. _program_listing_file_include_gwmodelpp_IVarialbeSelectable.h: Program Listing for File IVarialbeSelectable.h ============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/gwmodelpp/IVarialbeSelectable.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef IVARIALBESELECTABLE_H #define IVARIALBESELECTABLE_H #include #include #include "Status.h" #include "Logger.h" namespace gwm { #define GWM_LOG_TAG_VARIABLE_CRITERION "#variable-criterion " struct IVarialbeSelectable { static std::string infoVariableCriterion() { return std::string(GWM_LOG_TAG_VARIABLE_CRITERION) + "variables,criterion"; } static std::string infoVariableCriterion(const std::vector& variables, const double criterion) { std::vector var_labels(variables.size()); std::transform(variables.cbegin(), variables.cend(), var_labels.begin(), [](const std::size_t& var) { return std::to_string(var); }); return std::string(GWM_LOG_TAG_VARIABLE_CRITERION) + strjoin("+", var_labels) + "," + std::to_string(criterion); } virtual Status getCriterion(const std::vector& variables, double& criterion) = 0; virtual std::vector selectedVariables() = 0; }; typedef std::vector, double> > VariablesCriterionList; } #endif // IVARIALBESELECTABLE_H