From 772d0888efe11e12c6849e44bdda5c0cf58d39ee Mon Sep 17 00:00:00 2001 From: "jan.reininghaus" Date: Tue, 14 May 2013 13:40:15 +0000 Subject: code cleanup git-svn-id: https://phat.googlecode.com/svn/trunk@86 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- include/phat/representations/sparse_pivot_column.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (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 9e39950..390fd91 100644 --- a/include/phat/representations/sparse_pivot_column.h +++ b/include/phat/representations/sparse_pivot_column.h @@ -25,17 +25,17 @@ namespace phat { class sparse_column { protected: - std::set< index > m_data; + std::set< index > data; void add_index( const index idx ) { - std::pair< std::set< index >::iterator, bool > result = m_data.insert( idx ); + std::pair< std::set< index >::iterator, bool > result = data.insert( idx ); if( result.second == false ) - m_data.erase( result.first ); + data.erase( result.first ); } public: void init( const index total_size ) { - m_data.clear(); + data.clear(); } void add_col( const column& col ) { @@ -44,21 +44,20 @@ namespace phat { } index get_max_index() { - return m_data.empty() ? -1 : *m_data.rbegin(); + return data.empty() ? -1 : *data.rbegin(); } void get_col_and_clear( column& col ) { - col.clear(); - col.assign( m_data.begin(), m_data.end() ); - m_data.clear(); + col.assign( data.begin(), data.end() ); + data.clear(); } bool is_empty() { - return m_data.empty(); + return data.empty(); } void clear() { - m_data.clear(); + data.clear(); } void remove_max() { @@ -71,7 +70,6 @@ namespace phat { } void get_col( column& col ) { - col.clear(); get_col_and_clear( col ); add_col( col ); } -- cgit v1.2.3