MAiNGO
babUtils.h File Reference
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <string>
#include <type_traits>

Go to the source code of this file.

Classes

struct  babBase::BabLog
 Struct storing logging information during B&B prodcedure. More...
 
class  babBase::OutVar< T >
 Helper class that can be used to enforce the caller to explicitly state that the variable he passed may be changed. More...
 

Namespaces

 babBase
 namespace holding all essentials of the babBase submodule
 
 babBase::enums
 namespace holding all enums used for branching and B&B reporting
 

Enumerations

enum  babBase::enums::BAB_RETCODE {
  babBase::enums::GLOBALLY_OPTIMAL = 0, babBase::enums::INFEASIBLE, babBase::enums::GLOBAL_MIN_NODE_SIZE, babBase::enums::MAX_TIME,
  babBase::enums::MAX_ITERATIONS, babBase::enums::MAX_NODES, babBase::enums::FEASIBLE_POINT_ONLY, babBase::enums::TARGET_UBD,
  babBase::enums::TARGET_LBD, babBase::enums::NOT_SOLVED_YET
}
 Enum for representing the return codes returned by the B&B solver. More...
 
enum  babBase::enums::NS { babBase::enums::NS_BESTBOUND = 0, babBase::enums::NS_DEPTHFIRST, babBase::enums::NS_BREADTHFIRST }
 Enum for selecting the Node Selection heuristic. More...
 
enum  babBase::enums::BV { babBase::enums::BV_ABSDIAM = 0, babBase::enums::BV_RELDIAM, babBase::enums::BV_PSCOSTS }
 Enum for selecting the Branching Variable selection heuristic. More...
 

Functions

template<class T >
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type babBase::almost_equal (T x, T y, int ulp=2)
 compares if two floating numbers are very close to each other from:https://en.cppreference.com/w/cpp/types/numeric_limits/epsilon More...
 
bool babBase::larger_or_equal_within_rel_and_abs_tolerance (const double LBD, const double UBD, const double epsilonR, const double epsilonA)
 Function for checking if LBD is larger than UBD, or smaller by not more than the specified tolerance. More...
 
template<typename T >
OutVar< T > babBase::out_par (T &arr)
 Function for casting to OutVar<type T> More...