From 8bd91d327a3ab6dee59f09556c5e93f3144bf2dd Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sun, 24 Nov 2013 15:07:43 +0100 Subject: [PATCH] Add simplicial_complex::clear() --- include/libstick-0.1/simplicialcomplex.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/libstick-0.1/simplicialcomplex.h b/include/libstick-0.1/simplicialcomplex.h index 4dddc79..482e12d 100644 --- a/include/libstick-0.1/simplicialcomplex.h +++ b/include/libstick-0.1/simplicialcomplex.h @@ -198,6 +198,11 @@ class simplicial_complex { add_simplex(simplex::create_minusonedim_simplex()); } + /** Remove all simplices except the dummy simplex */ + void clear() { + simplices.resize(1); + } + /** Return number of simplices. */ size_t size() const { return simplices.size(); -- 2.39.5