From fb02e45712d44f217dfbd71910ea533894c065e6 Mon Sep 17 00:00:00 2001 From: "jan.reininghaus@gmail.com" Date: Sun, 12 May 2013 20:42:59 +0000 Subject: simplified pivot column representations git-svn-id: https://phat.googlecode.com/svn/trunk@84 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- include/phat/representations/sparse_pivot_column.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/phat/representations/sparse_pivot_column.h') 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 @@ -55,6 +55,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 ); } }; -- cgit v1.2.3