#include "ortools/sat/parameters_validation.h"
#include <stdint.h>
#include <cmath>
#include <limits>
#include <string>
#include "absl/strings/str_cat.h"
#include "ortools/sat/cp_model_search.h"
#include "ortools/sat/sat_parameters.pb.h"
Go to the source code of this file.
◆ TEST_IN_RANGE
      
        
          | #define TEST_IN_RANGE | ( |  | name, | 
        
          |  |  |  | min, | 
        
          |  |  |  | max ) | 
      
 
Value:  if (params.name() < min || params.name() > max) {                         \
    return absl::StrCat("parameter '", #name, "' should be in [", min, ",", \
                        max, "]. Current value is ", params.name());        \
  }
Definition at line 29 of file parameters_validation.cc.
 
 
◆ TEST_IS_FINITE
      
        
          | #define TEST_IS_FINITE | ( |  | name | ) |  | 
      
 
Value:  if (!std::isfinite(params.name())) {                                   \
    return absl::StrCat("parameter '", #name, "' is NaN or not finite"); \
  }
Definition at line 50 of file parameters_validation.cc.
 
 
◆ TEST_NON_NEGATIVE
      
        
          | #define TEST_NON_NEGATIVE | ( |  | name | ) |  | 
      
 
Value:  if (params.name() < 0) {                                              \
    return absl::StrCat("Parameters ", #name, " must be non-negative"); \
  }
Definition at line 35 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 45 of file parameters_validation.cc.
 
 
◆ TEST_POSITIVE
      
        
          | #define TEST_POSITIVE | ( |  | name | ) |  | 
      
 
Value:  if (params.name() <= 0) {                                         \
    return absl::StrCat("Parameters ", #name, " must be positive"); \
  }
Definition at line 40 of file parameters_validation.cc.