| 67 pub merge_every: usize, |
67 pub merge_every: usize, |
| 68 |
68 |
| 69 /// Additional weight optimisation steps after merge and random insertion |
69 /// Additional weight optimisation steps after merge and random insertion |
| 70 pub extra_weight_optimisation_steps: usize, |
70 pub extra_weight_optimisation_steps: usize, |
| 71 |
71 |
| |
72 /// Maximum iteration for scaling hack, zero if no maximum. |
| |
73 pub max_scaling_iter: usize, |
| |
74 |
| 72 /// Random insertion after merge |
75 /// Random insertion after merge |
| 73 pub random_insertions: bool, |
76 pub random_insertions: bool, |
| 74 |
77 |
| 75 /// Maximum iteration for scaling hack, zero if no maximum. |
78 /// Greedily insert points, even if no tolerance violation. |
| 76 pub max_scaling_iter: usize, |
79 pub greedy: bool, |
| 77 } |
80 } |
| 78 |
81 |
| 79 #[replace_float_literals(F::cast_from(literal))] |
82 #[replace_float_literals(F::cast_from(literal))] |
| 80 impl<F: Float> Default for InsertionConfig<F> { |
83 impl<F: Float> Default for InsertionConfig<F> { |
| 81 fn default() -> Self { |
84 fn default() -> Self { |
| 93 merge_every: 10, |
96 merge_every: 10, |
| 94 merge_tolerance_mult: 2.0, |
97 merge_tolerance_mult: 2.0, |
| 95 extra_weight_optimisation_steps: 0, |
98 extra_weight_optimisation_steps: 0, |
| 96 max_scaling_iter: 0, |
99 max_scaling_iter: 0, |
| 97 random_insertions: false, |
100 random_insertions: false, |
| |
101 greedy: false, |
| 98 } |
102 } |
| 99 } |
103 } |
| 100 } |
104 } |
| 101 |
105 |
| 102 impl<F: Float> InsertionConfig<F> { |
106 impl<F: Float> InsertionConfig<F> { |