#include "ortools/glop/parameters_validation.h"
#include <cmath>
#include <string>
#include "absl/strings/str_cat.h"
#include "ortools/glop/parameters.pb.h"
Go to the source code of this file.
◆ TEST_FINITE_AND_NON_NEGATIVE
| #define TEST_FINITE_AND_NON_NEGATIVE |
( |
| name | ) |
|
Value: if (!std::isfinite(params.name())) { \
return absl::StrCat("parameter '", #name, "' is NaN or not finite"); \
} \
if (params.name() < 0) { \
return absl::StrCat("Parameters '", #name, "' must be non-negative"); \
}
Definition at line 24 of file parameters_validation.cc.
◆ TEST_INTEGER_NON_NEGATIVE
| #define TEST_INTEGER_NON_NEGATIVE |
( |
| name | ) |
|
Value: if (params.name() < 0) { \
return absl::StrCat("Parameters '", #name, "' must be non-negative"); \
}
Definition at line 34 of file parameters_validation.cc.
◆ TEST_NON_NEGATIVE
| #define TEST_NON_NEGATIVE |
( |
| name | ) |
|
Value: if (std::isnan(params.name())) { \
return absl::StrCat("parameter '", #name, "' is NaN"); \
} \
if (params.name() < 0) { \
return absl::StrCat("Parameters '", #name, "' must be non-negative"); \
}
Definition at line 39 of file parameters_validation.cc.
◆ TEST_NOT_NAN
| #define TEST_NOT_NAN |
( |
| name | ) |
|
Value: if (std::isnan(params.name())) { \
return absl::StrCat("parameter '", #name, "' is NaN"); \
}
Definition at line 47 of file parameters_validation.cc.