X-Git-Url: https://git.sthu.org/?p=libstick.git;a=blobdiff_plain;f=include%2Flibstick-0.1%2Fsimplicialcomplex.h;h=482e12d3edbcd13b46fe3f0f9eb2feee48562273;hp=4dddc791b619fe3faab6fdbeebce239012672ad8;hb=8bd91d327a3ab6dee59f09556c5e93f3144bf2dd;hpb=ad301e7c9a6b22e6e023a7cad0476ff74f0d52dd 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();