summaryrefslogtreecommitdiff
path: root/include/phat/representations/bit_tree_pivot_column.h
diff options
context:
space:
mode:
authorjan.reininghaus@gmail.com <jan.reininghaus@gmail.com@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-12 20:42:59 +0000
committerjan.reininghaus@gmail.com <jan.reininghaus@gmail.com@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-12 20:42:59 +0000
commitfb02e45712d44f217dfbd71910ea533894c065e6 (patch)
tree77928bd2a11345ced14cec6ca9b07086e09948ce /include/phat/representations/bit_tree_pivot_column.h
parent7569a4005dc119d7a62990aeb4abe263716617a5 (diff)
simplified pivot column representations
git-svn-id: https://phat.googlecode.com/svn/trunk@84 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
Diffstat (limited to 'include/phat/representations/bit_tree_pivot_column.h')
-rw-r--r--include/phat/representations/bit_tree_pivot_column.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/phat/representations/bit_tree_pivot_column.h b/include/phat/representations/bit_tree_pivot_column.h
index 9e72530..f997434 100644
--- a/include/phat/representations/bit_tree_pivot_column.h
+++ b/include/phat/representations/bit_tree_pivot_column.h
@@ -153,6 +153,31 @@ namespace phat {
bool empty() {
return !data[0];
}
+
+ void clear() {
+ while(true)
+ {
+ index mx = this->max_index();
+ if (mx == -1)
+ break;
+ add_index(mx);
+ }
+ }
+
+ void remove_max() {
+ add_index( max_index() );
+ }
+
+ void set_col( const column& col ) {
+ clear();
+ add_column( col );
+ }
+
+ void get_col( column& col ) {
+ col.clear();
+ get_column_and_clear( col );
+ add_column( col );
+ }
};
const size_t bit_tree_column::debrujin_magic_table[64] = {