Extend terms by adding view for result
| 82 | |
| 83 | /// Extend terms by adding view for result |
| 84 | FloatView |
| 85 | extend(Home home, Region& r, Term*& t, int& n) { |
| 86 | FloatNum min, max; |
| 87 | estimate(t,n,0.0,min,max); |
| 88 | FloatVar x(home,min,max); |
| 89 | Term* et = r.alloc<Term>(n+1); |
| 90 | for (int i=n; i--; ) |
| 91 | et[i] = t[i]; |
| 92 | et[n].a=-1.0; et[n].x=x; |
| 93 | t=et; n++; |
| 94 | return x; |
| 95 | } |
| 96 | |
| 97 | |
| 98 | /** |