X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=include%2Flibstick-0.1%2Fsimplicialcomplex.h;h=e83daa47b83597cc016b97bb0bcbd4e04ea3d58b;hb=1e1b88154c99e34f7d84403adfbb3b7fb364a80e;hp=4dddc791b619fe3faab6fdbeebce239012672ad8;hpb=6aee6db48c36489e401309740313b1cda0e7dea5;p=libstick.git diff --git a/include/libstick-0.1/simplicialcomplex.h b/include/libstick-0.1/simplicialcomplex.h index 4dddc79..e83daa4 100644 --- a/include/libstick-0.1/simplicialcomplex.h +++ b/include/libstick-0.1/simplicialcomplex.h @@ -121,6 +121,10 @@ class simplicial_complex { return c.simplices[order.at(i)]; } + const simplcompltype& get_complex() const { + return c; + } + /** Returns true iff the faces of simplex i are before i in this order. */ bool is_filtration() const { assert(size() == c.size()); @@ -198,6 +202,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();