summaryrefslogtreecommitdiff
path: root/include/phat/representations/sparse_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/sparse_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/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;