summaryrefslogtreecommitdiff
path: root/include/phat/representations/sparse_pivot_column.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/phat/representations/sparse_pivot_column.h')
-rw-r--r--include/phat/representations/sparse_pivot_column.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/phat/representations/sparse_pivot_column.h b/include/phat/representations/sparse_pivot_column.h
index c851a2b..f4eab8b 100644
--- a/include/phat/representations/sparse_pivot_column.h
+++ b/include/phat/representations/sparse_pivot_column.h
@@ -56,6 +56,25 @@ namespace phat {
bool empty() {
return m_data.empty();
}
+
+ void clear() {
+ m_data.clear();
+ }
+
+ 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< sparse_column > sparse_pivot_column;