124 /// [module documentation][self]. |
124 /// [module documentation][self]. |
125 fn if_verbose<V, E : Error>(&self, calc_objective : impl FnMut() -> V) -> Step<V, E>; |
125 fn if_verbose<V, E : Error>(&self, calc_objective : impl FnMut() -> V) -> Step<V, E>; |
126 |
126 |
127 /// Returns the current iteration count. |
127 /// Returns the current iteration count. |
128 fn iteration(&self) -> usize; |
128 fn iteration(&self) -> usize; |
|
129 |
|
130 /// Indicates whether the iterator is quiet |
|
131 fn is_quiet(&self) -> bool; |
129 } |
132 } |
130 |
133 |
131 /// Result of a step of an [`AlgIterator`] |
134 /// Result of a step of an [`AlgIterator`] |
132 #[derive(Debug, Serialize)] |
135 #[derive(Debug, Serialize)] |
133 pub enum Step<V, Fail : Error = std::convert::Infallible> { |
136 pub enum Step<V, Fail : Error = std::convert::Infallible> { |
465 /// Whether the iteration is verbose, i.e., results should be displayed. |
468 /// Whether the iteration is verbose, i.e., results should be displayed. |
466 /// Requires `calc` to be `true`. |
469 /// Requires `calc` to be `true`. |
467 verbose : bool, |
470 verbose : bool, |
468 /// Whether results should be calculated. |
471 /// Whether results should be calculated. |
469 calc : bool, |
472 calc : bool, |
|
473 /// Indicates whether the iteration is quiet |
|
474 quiet : bool, |
470 } |
475 } |
471 |
476 |
472 /// [`AlgIteratorFactory`] for [`BasicAlgIterator`] |
477 /// [`AlgIteratorFactory`] for [`BasicAlgIterator`] |
473 #[derive(Clone,Debug)] |
478 #[derive(Clone,Debug)] |
474 pub struct BasicAlgIteratorFactory<V> { |
479 pub struct BasicAlgIteratorFactory<V> { |