summaryrefslogtreecommitdiff
path: root/include/phat/representations/heap_pivot_column.h
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2020-08-27 12:35:45 +0200
committerGard Spreemann <gspr@nonempty.org>2020-08-27 12:35:45 +0200
commit0356915f2d3e4f41b1993fc4688f07431506f610 (patch)
tree6eecbae2c86e57948d94f76460929c1793c3813e /include/phat/representations/heap_pivot_column.h
parenta378599c297e61be6543079945819e8da9d55b38 (diff)
parent746517263955660b5a0a0f4defc18f2d2d84f502 (diff)
Merge tag 'v1.6' into debian/sid
Added tag v1.6 for changeset 746517263955
Diffstat (limited to 'include/phat/representations/heap_pivot_column.h')
-rw-r--r--include/phat/representations/heap_pivot_column.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/phat/representations/heap_pivot_column.h b/include/phat/representations/heap_pivot_column.h
index 33cd07b..c5e4313 100644
--- a/include/phat/representations/heap_pivot_column.h
+++ b/include/phat/representations/heap_pivot_column.h
@@ -19,7 +19,6 @@
#pragma once
#include <phat/helpers/misc.h>
-#include <phat/representations/abstract_pivot_column.h>
namespace phat {
class heap_column {
@@ -71,6 +70,18 @@ namespace phat {
clear();
}
+
+ template<typename InputIterator>
+ void add_col(InputIterator begin, InputIterator end) {
+ for(InputIterator it=begin;it!=end;it++) {
+ data.push(*it);
+ inserts_since_last_prune++;
+ }
+ if( 2 * inserts_since_last_prune >( index ) data.size( ) )
+ prune();
+ }
+
+
void add_col( const column& col ) {
for( index idx = 0; idx < (index) col.size(); idx++ )
data.push( col[ idx ] );
@@ -122,5 +133,4 @@ namespace phat {
}
};
- typedef abstract_pivot_column< heap_column > heap_pivot_column;
}