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