Macaulay2 Engine
Loading...
Searching...
No Matches

◆ calc()

int hilb_comp::calc ( int nsteps)

Definition at line 422 of file hilb.cpp.

424{
425 if (n_components == 0) return COMP_DONE;
426 if (n_steps >= 0)
427 {
428 int calc_nsteps = nsteps + n_steps;
429 while (calc_nsteps-- > 0)
430 {
431 int result = step();
432 if (result == COMP_DONE) return COMP_DONE;
434 }
435 return COMP_DONE_STEPS;
436 }
437 else
438 for (;;)
439 {
440 int result = step();
441 if (result == COMP_DONE) return COMP_DONE;
443 }
444}
int step()
Definition hilb.cpp:446
int nsteps
Definition hilb.hpp:113
int n_components
Definition hilb.hpp:106
@ COMP_DONE_STEPS
Definition computation.h:69
@ COMP_DONE
Definition computation.h:60
@ COMP_INTERRUPTED
Definition computation.h:57
bool system_interrupted()
VALGRIND_MAKE_MEM_DEFINED & result(result)

References COMP_DONE, COMP_DONE_STEPS, COMP_INTERRUPTED, n_components, nsteps, result(), step(), and system_interrupted().

Referenced by hilbertNumerator(), and hilbertNumerator().