|
Go to the documentation of this file.
37 for ( int i = dim() - 1; i >= 0; --i)
41 MSG_DEBUG( std::cout << "DSHIFT08 theUBbound[" << i << "] violated by " << (* theFvec)[i] - theUBbound[i] - allow << std::endl );
53 MSG_DEBUG( std::cout << "DSHIFT08 theLBbound[" << i << "] violated by " << theLBbound[i] - (* theFvec)[i] - allow << std::endl );
67 MSG_DEBUG( std::cout << "DSHIFT01 shiftFvec: OK" << std::endl; )
92 for (i = dim() - 1; i >= 0; --i)
102 (*theCoLbound)[i] = (*theCoUbound)[i];
112 (*theCoUbound)[i] = (*theCoLbound)[i];
117 for (i = coDim() - 1; i >= 0; --i)
127 (*theLbound)[i] = (*theUbound)[i];
137 (*theUbound)[i] = (*theLbound)[i];
144 MSG_DEBUG( std::cout << "DSHIFT02 shiftPvec: OK" << std::endl; )
157 assert(uvec. dim() == p_low. dim());
158 assert(uvec. dim() == p_up. dim());
163 Random mult(10.0 * p_delta, 100.0 * p_delta);
170 for (i = uvec. dim() - start - 1; i >= 0; i -= incr)
175 if (p_up[i] <= vec[i] + eps)
177 p_up[i] = vec[i] + Real(mult);
180 if (p_low[i] >= vec[i] - eps)
182 p_low[i] = vec[i] - Real(mult);
188 for (j = uvec. delta(). size() - start - 1; j >= 0; j -= incr)
203 if (u != l && vec[i] >= u - eps)
205 p_up[i] = vec[i] + Real(mult);
211 if (u != l && vec[i] <= l + eps)
213 p_low[i] = vec[i] - Real(mult);
218 #endif // !FULL_SHIFT
230 assert(uvec. dim() == p_low. dim());
231 assert(uvec. dim() == p_up. dim());
236 Random mult(10.0 * p_delta, 100.0 * p_delta);
242 for (i = uvec. dim() - start - 1; i >= 0; i -= incr)
246 if (p_up[i] <= vec[i] + eps)
248 p_up[i] = vec[i] + Real(mult);
251 if (p_low[i] >= vec[i] - eps)
253 p_low[i] = vec[i] - Real(mult);
259 for (j = uvec. delta(). size() - start - 1; j >= 0; j -= incr)
274 if (u != l && vec[i] >= u - eps)
276 p_up[i] = vec[i] + Real(mult);
282 if (u != l && vec[i] <= l + eps)
284 p_low[i] = vec[i] - Real(mult);
289 #endif // !FULL_SHIFT
320 assert(uvec. dim() == p_low. dim());
321 assert(uvec. dim() == p_up. dim());
326 Random mult(10*p_delta, 100*p_delta);
333 for (i = uvec. dim() - start - 1; i >= 0; i -= incr)
337 if (p_up[i] <= vec[i] + eps && rep()*stat[i] < 0)
339 p_up[i] = vec[i] + Real(mult);
340 l_theShift += p_up[i] - u;
342 if (p_low[i] >= vec[i] - eps && rep()*stat[i] < 0)
344 p_low[i] = vec[i] - Real(mult);
345 l_theShift -= p_low[i] - l;
350 for (j = uvec. delta(). size() - start - 1; j >= 0; j -= incr)
358 if (u != l && vec[i] >= u - eps && rep()*stat[i] < 0)
360 p_up[i] = vec[i] + Real(mult);
361 l_theShift += p_up[i] - u;
366 if (u != l && vec[i] <= l + eps && rep()*stat[i] < 0)
368 p_low[i] = vec[i] - Real(mult);
369 l_theShift -= p_low[i] - l;
373 #endif // !FULL_SHIFT
387 assert(uvec. dim() == p_low. dim());
388 assert(uvec. dim() == p_up. dim());
393 Random mult(10*p_delta, 100*p_delta);
400 for (i = uvec. dim() - start - 1; i >= 0; i -= incr)
404 if (p_up[i] <= vec[i] + eps && rep()*stat[i] < 0)
406 p_up[i] = vec[i] + Real(mult);
407 l_theShift += p_up[i] - u;
409 if (p_low[i] >= vec[i] - eps && rep()*stat[i] < 0)
411 p_low[i] = vec[i] - Real(mult);
412 l_theShift -= p_low[i] - l;
417 for (j = uvec. delta(). size() - start - 1; j >= 0; j -= incr)
425 if (u != l && vec[i] >= u - eps && rep()*stat[i] < 0)
427 p_up[i] = vec[i] + Real(mult);
428 l_theShift += p_up[i] - u;
433 if (u != l && vec[i] <= l + eps && rep()*stat[i] < 0)
435 p_low[i] = vec[i] - Real(mult);
436 l_theShift -= p_low[i] - l;
440 #endif // !FULL_SHIFT
453 desc().coStatus(), 0, 1);
466 desc().coStatus(), 0, 1);
488 for (i = dim(); i-- > 0;)
501 t_low = lower(l_num);
505 if ((* theFvec)[i] < t_up + eps)
509 if ((* theFvec)[i] > t_low - eps)
511 else if ((* theFvec)[i] < t_low)
522 for (i = nRows(); i-- > 0;)
534 for (i = nCols(); i-- > 0;)
550 for (i = dim(); i-- > 0;)
574 if ((* theFvec)[i] < t_up - eps)
579 if ((* theFvec)[i] > t_low + eps)
581 else if ((* theFvec)[i] < t_low)
585 for (i = nRows(); i-- > 0;)
597 for (i = nCols(); i-- > 0;)
619 for (i = nRows(); i-- > 0;)
647 for (i = nCols(); i-- > 0;)
649 t_up = t_low = - maxObj(i);
653 if ((* thePvec)[i] < -t_up + eps)
661 if ((* thePvec)[i] > -t_low - eps)
679 for (i = nRows(); i-- > 0;)
693 if ((* thePvec)[i] < t_up + eps)
697 if ((* thePvec)[i] > t_low - eps)
707 for (i = nCols(); i-- > 0;)
|