From 39f867a091cbcdbf67499403d08fbe28103f06b7 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Thu, 27 Nov 2014 21:45:23 +0100 Subject: [PATCH] Use scomplex throughout rather than simplcompltype --- include/libstick/simplicialcomplex.h | 8 ++++---- include/libstick/simplicialfunction.h | 12 ++++++------ tests/image.h | 2 +- tests/persistence.h | 2 +- tests/simplicialcomplex.h | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/libstick/simplicialcomplex.h b/include/libstick/simplicialcomplex.h index 6dd99a3..6aaf816 100644 --- a/include/libstick/simplicialcomplex.h +++ b/include/libstick/simplicialcomplex.h @@ -41,7 +41,7 @@ class simplicial_complex { public: /** The type of this class. */ - typedef simplicial_complex simplcompltype; + typedef simplicial_complex scomplex; /** Type of indices of simplices. */ typedef IT index_type; @@ -93,7 +93,7 @@ class simplicial_complex { typedef std::vector order_type; /** Create a standard order of the complex c, i.e., the identity permutation. */ - simplex_order(const simplcompltype &c) : + simplex_order(const scomplex &c) : c(c) { reset(); } @@ -130,7 +130,7 @@ class simplicial_complex { } /** Return the underlying complex. */ - const simplcompltype& get_complex() const { + const scomplex& get_complex() const { return c; } @@ -210,7 +210,7 @@ class simplicial_complex { } /** The complex of which we consider a simplex order. */ - const simplcompltype &c; + const scomplex &c; /** The i-th simplex in order is the order[i]-th simplex of the * complex. 'order' can be seen as a permutation of the diff --git a/include/libstick/simplicialfunction.h b/include/libstick/simplicialfunction.h index 6371d66..d09bfe7 100644 --- a/include/libstick/simplicialfunction.h +++ b/include/libstick/simplicialfunction.h @@ -19,13 +19,13 @@ class simplicial_function { public: /** The type of the underlying simplicial complex. */ - typedef simplicial_complex simplcompltype; + typedef simplicial_complex scomplex; /** Type of indices of simplices. */ typedef IT index_type; /** Type of the simplices of the underlying simplicial complex */ - typedef typename simplcompltype::simplex simplex; + typedef typename scomplex::simplex simplex; /** Type of the order on the underlying simplicial complex */ - typedef typename simplcompltype::simplex_order simplex_order; + typedef typename scomplex::simplex_order simplex_order; /** To every simplex a function value is assigned according to which a * filtration is considered. This is the value type of the function. */ typedef VT value_type; @@ -51,7 +51,7 @@ class simplicial_function { /**Create a simplicial function on a given simplicial complex c. Only * define for the (-1)-dim dummy vertex a value, namely * get_minusonedim_value().*/ - simplicial_function(simplcompltype &c) : + simplicial_function(scomplex &c) : c(c) { values.push_back(get_minusonedim_value()); } @@ -84,7 +84,7 @@ class simplicial_function { } /** Return the underlying complex. */ - const simplcompltype& get_complex() const { + const scomplex& get_complex() const { return c; } @@ -224,7 +224,7 @@ class simplicial_function { values_type values; /** The complex on which we consider a function. */ - simplcompltype &c; + scomplex &c; }; } diff --git a/tests/image.h b/tests/image.h index 9b07eed..b069d90 100644 --- a/tests/image.h +++ b/tests/image.h @@ -41,7 +41,7 @@ class image_TestSuite: public Test::Suite { // Create complex and add image typedef simplicial_function<2, uint32_t, float> sfunction; - typedef sfunction::simplcompltype scomplex; + typedef sfunction::scomplex scomplex; scomplex s; sfunction f(s); add_image_to_simplicialfunction(f, image, width, height); diff --git a/tests/persistence.h b/tests/persistence.h index b7678bf..aac4723 100644 --- a/tests/persistence.h +++ b/tests/persistence.h @@ -13,7 +13,7 @@ class persistence_TestSuite: public Test::Suite { private: typedef simplicial_function<3, uint32_t, uint32_t> sfunction; - typedef sfunction::simplcompltype scomplex; + typedef sfunction::scomplex scomplex; typedef persistence<3, uint32_t> pers; typedef pers::boundary_matrix bm; typedef pers::lowestones_matrix lom; diff --git a/tests/simplicialcomplex.h b/tests/simplicialcomplex.h index 1c8f949..91d1c55 100644 --- a/tests/simplicialcomplex.h +++ b/tests/simplicialcomplex.h @@ -13,7 +13,7 @@ class simplicial_complex_TestSuite: public Test::Suite { private: typedef simplicial_function<3, uint32_t, double> sfunction; - typedef sfunction::simplcompltype scomplex; + typedef sfunction::scomplex scomplex; typedef scomplex::simplex_order::boundary_matrix bm; bool setupcalled; -- 2.30.2