<commit_before>#include <KrisLibrary/Logger.h>
#include "GLPKInterface.h"
#if HAVE_GLPK

#include <utils.h>
#include <utils/SignalHandler.h>
#include <signal.h>
#include <iostream>
#include <stdexcept>
extern "C"
{
#include <glpk.h>
}
using namespace Optimization;
using namespace std;

#if GLP_MAJOR_VERSION < 4 || (GLP_MAJOR_VERSION == 4 && GPL_MINOR_VERSION < 20)
#error "Require GLPK 4.20 or above"
#endif

const static Real kZeroTol = 1e-6;

GLPKInterface::GLPKInterface()
:lp(NULL)
{}

GLPKInterface::~GLPKInterface()
{
  SafeDeleteProc(lp,glp_delete_prob);
}

inline int BoundType(Real low,Real high)
{
  if(IsInf(low)==-1) {
    if(IsInf(high) == 1) return GLP_FR;
    return GLP_UP;
  }
  else if(IsInf(high) == 1) {
    return GLP_LO;
  }
  else {
    if(low==high) return GLP_FX;
    else return GLP_DB;
  }
}

int BoundTypeToGLP(LinearProgram::BoundType b)
{<commit_msg>Fixed typo on gpheng commit<commit_after>#include <KrisLibrary/Logger.h>
#include "GLPKInterface.h"
#if HAVE_GLPK

#include <utils.h>
#include <utils/SignalHandler.h>
#include <signal.h>
#include <iostream>
#include <stdexcept>
extern "C"
{
#include <glpk.h>
}
using namespace Optimization;
using namespace std;

#if GLP_MAJOR_VERSION < 4 || (GLP_MAJOR_VERSION == 4 && GLP_MINOR_VERSION < 20)
#error "Require GLPK 4.20 or above"
#endif

const static Real kZeroTol = 1e-6;

GLPKInterface::GLPKInterface()
:lp(NULL)
{}

GLPKInterface::~GLPKInterface()
{
  SafeDeleteProc(lp,glp_delete_prob);
}

inline int BoundType(Real low,Real high)
{
  if(IsInf(low)==-1) {
    if(IsInf(high) == 1) return GLP_FR;
    return GLP_UP;
  }
  else if(IsInf(high) == 1) {
    return GLP_LO;
  }
  else {
    if(low==high) return GLP_FX;
    else return GLP_DB;
  }
}

int BoundTypeToGLP(LinearProgram::BoundType b)
{
{'fraction_non_alphanumeric': 0.140607424071991, 'fraction_numerical': 0.013498312710911136, 'mean_word_length': 4.871287128712871, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7462298', 'n_tokens_mistral': 744, 'n_tokens_neox': 720, 'n_words': 156}