summaryrefslogtreecommitdiff
path: root/include/phat/representations/sparse_pivot_column.h
diff options
context:
space:
mode:
authorjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-14 13:40:15 +0000
committerjan.reininghaus <jan.reininghaus@8e3bb3c2-eed4-f18f-5264-0b6c94e6926d>2013-05-14 13:40:15 +0000
commit772d0888efe11e12c6849e44bdda5c0cf58d39ee (patch)
tree6ea357a7bc11d14c0cf047cd46ee1f24fb0147c2 /include/phat/representations/sparse_pivot_column.h
parent595ce965ef6e07c554a91ebb8b41c8e1c06b8b32 (diff)
code cleanup
git-svn-id: https://phat.googlecode.com/svn/trunk@86 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d
Diffstat (limited to 'include/phat/representations/sparse_pivot_column.h')
-rw-r--r--include/phat/representations/sparse_pivot_column.h20
1 files changed, 9 insertions, 11 deletions
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 );
}