summaryrefslogtreecommitdiff
path: root/include/phat/representations/full_pivot_column.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/phat/representations/full_pivot_column.h')
-rw-r--r--include/phat/representations/full_pivot_column.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/phat/representations/full_pivot_column.h b/include/phat/representations/full_pivot_column.h
index 9e0c348..ce7b9f1 100644
--- a/include/phat/representations/full_pivot_column.h
+++ b/include/phat/representations/full_pivot_column.h
@@ -75,6 +75,26 @@ namespace phat {
bool empty() {
return (max_index() == -1);
}
+
+ void clear() {
+ while( !empty() )
+ add_index( max_index() );
+ }
+
+ 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 );
+ }
};
typedef abstract_pivot_column< full_column > full_pivot_column;