Ignore:
Timestamp:
May 7, 2007 1:44:28 PM (13 years ago)
Author:
pbelotti
Message:

moved include files to make them doxygenable. Introduced three-way branching, with fixed intervals for now. Added check for small bound interval within all generateCuts()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Couenne/Couenne/src/convex/operators/conv-exprInv.cpp

    r520 r534  
    7878      x_ind = argument_ -> Index ();
    7979
     80  // special case: l and u are very close, replace function with
     81  // linear term
     82
     83  if (fabs (u - l) < COUENNE_EPS) {
     84
     85    CouNumber x0 = 0.5 * (u+l);
     86    cg -> createCut (cs, 2/x0, 0, w_ind, 1., x_ind, 1/(x0*x0));
     87    return;
     88  }
     89
    8090  // choose sampling points. If unbounded, bound using a rule of thumb
    8191
    8292  int ns = cg -> nSamples ();
    8393
    84   if      (l < - COUENNE_INFINITY + 1) l = ns * (u-1); // (-infinity, u] where u < 0
    85   else if (u >   COUENNE_INFINITY - 1) u = ns * (l+1); // [l, +infinity) where l > 0
     94  if      (l < - COUENNE_INFINITY) l = ns * (u-1); // (-infinity, u] where u < 0
     95  else if (u >   COUENNE_INFINITY) u = ns * (l+1); // [l, +infinity) where l > 0
    8696
    8797  // make bounds nonzero
Note: See TracChangeset for help on using the changeset viewer.