- Timestamp:
- Apr 27, 2007 3:39:58 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Couenne/Couenne/src/convex/operators/conv-exprInv.cpp
r476 r520 46 46 47 47 48 // derivative of inv (x)49 50 inline CouNumber oppInvSqr (register CouNumber x)51 {return (- inv (x*x));}52 53 54 48 #define MIN_DENOMINATOR 1e-10 55 49 … … 79 73 aux -> getBounds (wle, wue); 80 74 81 expression *xe = argument_; 82 83 CouNumber x = (*xe) (); 75 CouNumber x; 84 76 85 77 int w_ind = aux -> Index (), … … 107 99 } 108 100 109 int sign = (l > 0) ? +1 : -1;110 111 101 // bound 112 113 cg -> addEnvelope (cs, sign, inv, oppInvSqr, w_ind, x_ind, x, l, u); 102 cg -> addEnvelope 103 (cs, (l > 0) ? +1 : -1, 104 inv, oppInvSqr, w_ind, x_ind, 105 (cg -> isFirst ()) ? 106 // place it somewhere in the interval (we won't care) 107 ((l > COUENNE_EPS) ? l : u) : 108 // not first call, gotta replace it where it gives deepest cut 109 powNewton ((*argument_) (), (*aux) (), inv, oppInvSqr, inv_dblprime), 110 l, u); 114 111 115 112 delete xle;
Note: See TracChangeset
for help on using the changeset viewer.