return is_filtration();
}
+ /** Randomize order. It has hardly any impact on runtime, but
+ * it makes cycles "nicer" when the simplice's function values
+ * are constant.
+ * */
+ void randomize_order() {
+ std::random_shuffle(order.begin(), order.end());
+ restore_revorder_from_order();
+ }
+
/** Sort simplices such that is_monotone() gives true. This
* requires that the complex's is_monotone() gave true
* beforehand.*/
void make_monotone_filtration() {
assert(c.is_monotone());
- sort(order.begin(), order.end(), cmp_monotone_filtration(c));
+ std::sort(order.begin(), order.end(), cmp_monotone_filtration(c));
restore_revorder_from_order();
assert(c.is_monotone());