| 185 | |
| 186 | template<class View, class Val, bool iss> |
| 187 | forceinline void |
| 188 | ViewValSupport<View,Val,iss>::init(Space& home, ViewArray<View>& a, Val s, |
| 189 | int i, int q) { |
| 190 | y = home.alloc<int>(a.size()+1); |
| 191 | v.init(home,static_cast<unsigned int>(a.size())); |
| 192 | y[0] = 0; |
| 193 | for ( int l=0; l<a.size(); l++ ) { |
| 194 | if ( alternative_not_possible(a,s,i,l+1) ) { |
| 195 | y[l+1] = y[l] + 1; |
| 196 | } else { |
| 197 | y[l+1] = y[l]; |
| 198 | } |
| 199 | if ( l+1 >= q ) { |
| 200 | potential_violation(l+1-q); |
| 201 | } |
| 202 | if ( l <= a.size() - q ) { |
| 203 | potential_violation(l); |
| 204 | } |
| 205 | |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | template<class View, class Val, bool iss> |
| 210 | forceinline void |
no test coverage detected