Add simplicial_complex::clear()
[libstick.git] / include / libstick-0.1 / simplicialcomplex.h
index 1183a92d699dfa896853e8148abb988f3ca06ed4..482e12d3edbcd13b46fe3f0f9eb2feee48562273 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <iostream>
 
-#include <libstick-0.1/booleanmatrix.h>
+#include "booleanmatrix.h"
 
 
 namespace libstick {
@@ -92,7 +92,7 @@ class simplicial_complex {
         class simplex_order {
 
             public:
-                typedef boolean_colrowmatrix<IT> boundary_matrix;
+                typedef boolean_colmatrix<IT> boundary_matrix;
 
                 /** Create a standard order of the complex c, i.e., the identity permutation. */
                 simplex_order(const simplcompltype &c) :
@@ -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();