From b17e55afc11caff584573a9b3b2f86493b9642b8 Mon Sep 17 00:00:00 2001 From: "jan.reininghaus" Date: Wed, 30 Apr 2014 08:57:41 +0000 Subject: new vector_heap Representation git-svn-id: https://phat.googlecode.com/svn/trunk@164 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- src/self_test.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/self_test.cpp') diff --git a/src/self_test.cpp b/src/self_test.cpp index 02bca5e..249b9b2 100644 --- a/src/self_test.cpp +++ b/src/self_test.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -41,6 +42,7 @@ int main( int argc, char** argv ) typedef phat::full_pivot_column Full; typedef phat::bit_tree_pivot_column BitTree; typedef phat::vector_vector Vec_vec; + typedef phat::vector_heap Vec_heap; typedef phat::vector_set Vec_set; typedef phat::vector_list Vec_list; @@ -79,6 +81,11 @@ int main( int argc, char** argv ) phat::boundary_matrix< Vec_vec > vec_vec_boundary_matrix = boundary_matrix; phat::compute_persistence_pairs< phat::chunk_reduction >( vec_vec_pairs, vec_vec_boundary_matrix ); + std::cout << "Running Chunk - Vec_heap ..." << std::endl; + phat::persistence_pairs vec_heap_pairs; + phat::boundary_matrix< Vec_heap > vec_heap_boundary_matrix = boundary_matrix; + phat::compute_persistence_pairs< phat::chunk_reduction >( vec_heap_pairs, vec_heap_boundary_matrix ); + std::cout << "Running Chunk - Vec_set ..." << std::endl; phat::persistence_pairs vec_set_pairs; phat::boundary_matrix< Vec_set > vec_set_boundary_matrix = boundary_matrix; @@ -101,8 +108,12 @@ int main( int argc, char** argv ) std::cerr << "Error: full and vec_vec differ!" << std::endl; error = true; } - if( vec_vec_pairs != vec_set_pairs ) { - std::cerr << "Error: vec_vec and vec_set differ!" << std::endl; + if( vec_vec_pairs != vec_heap_pairs ) { + std::cerr << "Error: vec_vec and vec_heap differ!" << std::endl; + error = true; + } + if( vec_heap_pairs != vec_set_pairs ) { + std::cerr << "Error: vec_heap and vec_set differ!" << std::endl; error = true; } if( vec_set_pairs != bit_tree_pairs ) { -- cgit v1.2.3