COIN-OR::LEMON - Graph Library

Changes in / [512:9b9ffe7d9b75:513:2a136de8e3f2] in lemon-1.2


Ignore:
Location:
lemon
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_to_eps.h

    r440 r509  
    3030#include<ctime>
    3131#else
     32#ifndef WIN32_LEAN_AND_MEAN
    3233#define WIN32_LEAN_AND_MEAN
     34#endif
     35#ifndef NOMINMAX
    3336#define NOMINMAX
     37#endif
    3438#include<windows.h>
    3539#endif
     
    689693#else
    690694      SYSTEMTIME time;
    691       char buf1[11], buf2[9], buf3[5];
    692 
    693695      GetSystemTime(&time);
     696#if defined(_MSC_VER) && (_MSC_VER < 1500)
     697      LPWSTR buf1, buf2, buf3;
    694698      if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
    695                         "ddd MMM dd", buf1, 11) &&
     699                        L"ddd MMM dd", buf1, 11) &&
    696700          GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
    697                         "HH':'mm':'ss", buf2, 9) &&
     701                        L"HH':'mm':'ss", buf2, 9) &&
    698702          GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
    699                                 "yyyy", buf3, 5)) {
     703                        L"yyyy", buf3, 5)) {
    700704        os << "%%CreationDate: " << buf1 << ' '
    701705           << buf2 << ' ' << buf3 << std::endl;
    702706      }
     707#else
     708        char buf1[11], buf2[9], buf3[5];
     709        if (GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
     710                          "ddd MMM dd", buf1, 11) &&
     711            GetTimeFormat(LOCALE_USER_DEFAULT, 0, &time,
     712                          "HH':'mm':'ss", buf2, 9) &&
     713            GetDateFormat(LOCALE_USER_DEFAULT, 0, &time,
     714                          "yyyy", buf3, 5)) {
     715          os << "%%CreationDate: " << buf1 << ' '
     716             << buf2 << ' ' << buf3 << std::endl;
     717        }
     718#endif
    703719#endif
    704720    }
  • lemon/lp_base.cc

    r459 r510  
    2323namespace lemon {
    2424
    25   const LpBase::Value LpBase::INF = std::numeric_limits<Value>::infinity();
    26   const LpBase::Value LpBase::NaN = std::numeric_limits<Value>::quiet_NaN();
     25  const LpBase::Value LpBase::INF =
     26    std::numeric_limits<LpBase::Value>::infinity();
     27  const LpBase::Value LpBase::NaN =
     28    std::numeric_limits<LpBase::Value>::quiet_NaN();
    2729
    2830} //namespace lemon
  • lemon/lp_base.h

    r471 r511  
    598598      ///Is the constraint lower bounded?
    599599      bool lowerBounded() const {
    600         return _lb != -INF && !isnan(_lb);
     600        return _lb != -INF && !isNaN(_lb);
    601601      }
    602602      ///Is the constraint upper bounded?
    603603      bool upperBounded() const {
    604         return _ub != INF && !isnan(_ub);
     604        return _ub != INF && !isNaN(_ub);
    605605      }
    606606
     
    16671667                                   const LpBase::Constr &c) {
    16681668    LpBase::Constr tmp(c);
    1669     LEMON_ASSERT(isnan(tmp.lowerBound()), "Wrong LP constraint");
     1669    LEMON_ASSERT(isNaN(tmp.lowerBound()), "Wrong LP constraint");
    16701670    tmp.lowerBound()=n;
    16711671    return tmp;
     
    16791679  {
    16801680    LpBase::Constr tmp(c);
    1681     LEMON_ASSERT(isnan(tmp.upperBound()), "Wrong LP constraint");
     1681    LEMON_ASSERT(isNaN(tmp.upperBound()), "Wrong LP constraint");
    16821682    tmp.upperBound()=n;
    16831683    return tmp;
     
    16911691                                   const LpBase::Constr &c) {
    16921692    LpBase::Constr tmp(c);
    1693     LEMON_ASSERT(isnan(tmp.upperBound()), "Wrong LP constraint");
     1693    LEMON_ASSERT(isNaN(tmp.upperBound()), "Wrong LP constraint");
    16941694    tmp.upperBound()=n;
    16951695    return tmp;
     
    17031703  {
    17041704    LpBase::Constr tmp(c);
    1705     LEMON_ASSERT(isnan(tmp.lowerBound()), "Wrong LP constraint");
     1705    LEMON_ASSERT(isNaN(tmp.lowerBound()), "Wrong LP constraint");
    17061706    tmp.lowerBound()=n;
    17071707    return tmp;
  • lemon/math.h

    r470 r511  
    6161  ///Is should be equivalent with std::isnan(), but it is not
    6262  ///provided by all compilers.
    63   inline bool isnan(double v)
     63  inline bool isNaN(double v)
    6464    {
    6565      return v!=v;
  • lemon/time_measure.h

    r440 r509  
    2525
    2626#ifdef WIN32
     27#ifndef WIN32_LEAN_AND_MEAN
    2728#define WIN32_LEAN_AND_MEAN
     29#endif
     30#ifndef NOMINMAX
    2831#define NOMINMAX
     32#endif
    2933#include <windows.h>
    3034#include <cmath>
    3135#else
     36#include <unistd.h>
    3237#include <sys/times.h>
    3338#include <sys/time.h>
Note: See TracChangeset for help on using the changeset viewer.