summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/phat.cpp12
-rw-r--r--src/self_test.cpp14
2 files changed, 11 insertions, 15 deletions
diff --git a/src/phat.cpp b/src/phat.cpp
index 6757d3c..6fec0c8 100644
--- a/src/phat.cpp
+++ b/src/phat.cpp
@@ -69,7 +69,7 @@ void parse_command_line( int argc, char** argv, bool& use_binary, Representation
else if( option == "--vec-vec" ) rep_type = VEC_VEC;
else if( option == "--vec-set" ) rep_type = VEC_SET;
else if( option == "--full-pivot" ) rep_type = FULL_PIVOT;
- else if( option == "--bit-tree-pivot" ) rep_type = BIT_TREE_PIVOT;
+ else if( option == "--bit-tree-pivot" ) rep_type = BIT_TREE_PIVOT;
else if( option == "--sparse-pivot" ) rep_type = SPARSE_PIVOT;
else if( option == "--standard" ) reduction = STANDARD;
else if( option == "--twist" ) reduction = TWIST;
@@ -86,8 +86,8 @@ void parse_command_line( int argc, char** argv, bool& use_binary, Representation
template<typename Representation, typename Algorithm>
void generic_compute_pairing( std::string input_filename,
std::string output_filename,
- bool use_binary,
- bool verbose,
+ bool use_binary,
+ bool verbose,
bool dualize ) {
phat::boundary_matrix< Representation > matrix;
@@ -95,7 +95,7 @@ void generic_compute_pairing( std::string input_filename,
double read_timer = omp_get_wtime();
if( use_binary ) {
- LOG( "Reading input file " << input_filename << " in binary mode" )
+ LOG( "Reading input file " << input_filename << " in binary mode" )
read_successful = matrix.load_binary( input_filename );
} else {
LOG( "Reading input file " << input_filename << " in ascii mode" )
@@ -165,8 +165,8 @@ int main( int argc, char** argv )
case CHUNK: CALL_GENERIC_CODE(phat::full_pivot_column, phat::chunk_reduction) break;
} break;
- case BIT_TREE_PIVOT: switch( reduction ) {
- case STANDARD: CALL_GENERIC_CODE(phat::bit_tree_pivot_column, phat::standard_reduction) break;
+ case BIT_TREE_PIVOT: switch( reduction ) {
+ case STANDARD: CALL_GENERIC_CODE(phat::bit_tree_pivot_column, phat::standard_reduction) break;
case TWIST: CALL_GENERIC_CODE(phat::bit_tree_pivot_column, phat::twist_reduction) break;
case ROW: CALL_GENERIC_CODE(phat::bit_tree_pivot_column, phat::row_reduction) break;
case CHUNK: CALL_GENERIC_CODE(phat::bit_tree_pivot_column, phat::chunk_reduction) break;
diff --git a/src/self_test.cpp b/src/self_test.cpp
index b3cddc2..2aabdc4 100644
--- a/src/self_test.cpp
+++ b/src/self_test.cpp
@@ -35,7 +35,7 @@ int main( int argc, char** argv )
typedef phat::sparse_pivot_column Sparse;
typedef phat::full_pivot_column Full;
- typedef phat::bit_tree_pivot_column BitTree;
+ typedef phat::bit_tree_pivot_column BitTree;
typedef phat::vector_vector Vec_vec;
typedef phat::vector_set Vec_set;
@@ -59,7 +59,7 @@ int main( int argc, char** argv )
phat::boundary_matrix< Full > full_boundary_matrix = boundary_matrix;
phat::compute_persistence_pairs< phat::chunk_reduction >( full_pairs, full_boundary_matrix );
- std::cout << "Running Chunk - BitTree ..." << std::endl;
+ std::cout << "Running Chunk - BitTree ..." << std::endl;
phat::persistence_pairs bit_tree_pairs;
phat::boundary_matrix< BitTree > bit_tree_boundary_matrix = boundary_matrix;
phat::compute_persistence_pairs< phat::chunk_reduction >( bit_tree_pairs, bit_tree_boundary_matrix );
@@ -86,18 +86,14 @@ int main( int argc, char** argv )
std::cerr << "Error: vec_vec and vec_set differ!" << std::endl;
error = true;
}
- if( vec_set_pairs != sparse_pairs ) {
- std::cerr << "Error: vec_set and sparse differ!" << std::endl;
+ if( vec_set_pairs != bit_tree_pairs ) {
+ std::cerr << "Error: vec_set and bit_tree differ!" << std::endl;
error = true;
}
- if( bit_tree_pairs != sparse_pairs ) {
+ if( bit_tree_pairs != sparse_pairs ) {
std::cerr << "Error: bit_tree and sparse differ!" << std::endl;
error = true;
}
- if( bit_tree_pairs != vec_set_pairs ) {
- std::cerr << "Error: bit_tree and vec_vec differ!" << std::endl;
- error = true;
- }
if( error ) return EXIT_FAILURE;
else std::cout << "All results are identical (as they should be)" << std::endl;