summaryrefslogtreecommitdiff
path: root/include/phat/representations/bit_tree_pivot_column.h
diff options
context:
space:
mode:
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] = {