| 194 | |
| 195 | template<class View> |
| 196 | ExecStatus |
| 197 | Single<View>::advise(Space& home, Advisor& a0, const Delta&) { |
| 198 | Index& a(static_cast<Index&>(a0)); |
| 199 | int i = a.i; |
| 200 | // Check for gamma |
| 201 | if ((beta <= gamma) && (i < gamma) && |
| 202 | x[i].notContains(s) && x[i].contains(t)) |
| 203 | gamma = i; |
| 204 | if (x[i].assigned()) { |
| 205 | a.dispose(home,c); |
| 206 | if (c.empty()) |
| 207 | return ES_NOFIX; |
| 208 | } else if ((i < alpha) || (i > gamma)) { |
| 209 | x[i].cancel(home,a); |
| 210 | a.dispose(home,c); |
| 211 | return (c.empty()) ? ES_NOFIX : ES_FIX; |
| 212 | } |
| 213 | if (beta > gamma) |
| 214 | return ES_NOFIX; |
| 215 | if ((alpha == i) || (beta == i)) |
| 216 | return ES_NOFIX; |
| 217 | return ES_FIX; |
| 218 | } |
| 219 | |
| 220 | template<class View> |
| 221 | ExecStatus |