summaryrefslogtreecommitdiff
path: root/src/phat.cpp
diff options
context:
space:
mode:
authorjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-04-23 15:26:20 +0000
committerjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-04-23 15:26:20 +0000
commitbf7cdc36a86cb252097f559e977bec48ab802666 (patch)
treef04efaf8425cdde70a31c16e78cc78a2f8c25fa9 /src/phat.cpp
parent3cf63b2f122f1fd9a967ee9dc7a21436f4a94077 (diff)
new representation type vector_list
git-svn-id: https://phat.googlecode.com/svn/trunk@39 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
Diffstat (limited to 'src/phat.cpp')
-rw-r--r--src/phat.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/phat.cpp b/src/phat.cpp
index 2b48088..448e0bb 100644
--- a/src/phat.cpp
+++ b/src/phat.cpp
@@ -20,6 +20,7 @@
#include <phat/representations/vector_vector.h>
#include <phat/representations/vector_set.h>
+#include <phat/representations/vector_list.h>
#include <phat/representations/sparse_pivot_column.h>
#include <phat/representations/full_pivot_column.h>
#include <phat/representations/bit_tree_pivot_column.h>
@@ -30,7 +31,7 @@
#include <phat/algorithms/chunk_reduction.h>
-enum Representation_type {VECTOR_VECTOR, VECTOR_SET, SPARSE_PIVOT_COLUMN, FULL_PIVOT_COLUMN, BIT_TREE_PIVOT_COLUMN};
+enum Representation_type {VECTOR_VECTOR, VECTOR_SET, SPARSE_PIVOT_COLUMN, FULL_PIVOT_COLUMN, BIT_TREE_PIVOT_COLUMN, VECTOR_LIST};
enum Algorithm_type {STANDARD, TWIST, ROW, CHUNK };
void print_help() {
@@ -43,7 +44,7 @@ void print_help() {
std::cerr << "--help -- prints this screen" << std::endl;
std::cerr << "--verbose -- verbose output" << std::endl;
std::cerr << "--dualize -- use dualization approach" << std::endl;
- std::cerr << "--vector_vector, --vector_set, --full_pivot_column, --sparse_pivot_column, --bit_tree_pivot_column -- selects a representation data structure for boundary matrices (default is '--bit_tree_pivot_column')" << std::endl;
+ std::cerr << "--vector_vector, --vector_set, --vector_list, --full_pivot_column, --sparse_pivot_column, --bit_tree_pivot_column -- selects a representation data structure for boundary matrices (default is '--bit_tree_pivot_column')" << std::endl;
std::cerr << "--standard, --twist, --chunk, --row -- selects a reduction algorithm (default is '--chunk')" << std::endl;
}
@@ -68,6 +69,7 @@ void parse_command_line( int argc, char** argv, bool& use_binary, Representation
else if( option == "--dualize" ) dualize = true;
else if( option == "--vector_vector" ) rep_type = VECTOR_VECTOR;
else if( option == "--vector_set" ) rep_type = VECTOR_SET;
+ else if( option == "--vector_list" ) rep_type = VECTOR_LIST;
else if( option == "--full_pivot_column" ) rep_type = FULL_PIVOT_COLUMN;
else if( option == "--bit_tree_pivot_column" ) rep_type = BIT_TREE_PIVOT_COLUMN;
else if( option == "--sparse_pivot_column" ) rep_type = SPARSE_PIVOT_COLUMN;
@@ -157,6 +159,13 @@ int main( int argc, char** argv )
case ROW: CALL_GENERIC_CODE(phat::vector_set, phat::row_reduction) break;
case CHUNK: CALL_GENERIC_CODE(phat::vector_set, phat::chunk_reduction) break;
} break;
+
+ case VECTOR_LIST: switch( reduction ) {
+ case STANDARD: CALL_GENERIC_CODE(phat::vector_list, phat::standard_reduction) break;
+ case TWIST: CALL_GENERIC_CODE(phat::vector_list, phat::twist_reduction) break;
+ case ROW: CALL_GENERIC_CODE(phat::vector_list, phat::row_reduction) break;
+ case CHUNK: CALL_GENERIC_CODE(phat::vector_list, phat::chunk_reduction) break;
+ } break;
case FULL_PIVOT_COLUMN: switch( reduction ) {
case STANDARD: CALL_GENERIC_CODE(phat::full_pivot_column, phat::standard_reduction) break;