diff options
Diffstat (limited to 'include/phat/representations')
-rw-r--r-- | include/phat/representations/abstract_pivot_column.h | 2 | ||||
-rw-r--r-- | include/phat/representations/vector_heap.h | 6 | ||||
-rw-r--r-- | include/phat/representations/vector_list.h | 4 | ||||
-rw-r--r-- | include/phat/representations/vector_set.h | 5 | ||||
-rw-r--r-- | include/phat/representations/vector_vector.h | 6 |
5 files changed, 23 insertions, 0 deletions
diff --git a/include/phat/representations/abstract_pivot_column.h b/include/phat/representations/abstract_pivot_column.h index fbee368..e16d7a5 100644 --- a/include/phat/representations/abstract_pivot_column.h +++ b/include/phat/representations/abstract_pivot_column.h @@ -94,6 +94,8 @@ namespace phat { void _set_col( index idx, const column& col ) { is_pivot_col( idx ) ? get_pivot_col().set_col( col ) : Base::_set_col( idx, col ); }
void _remove_max( index idx ) { is_pivot_col( idx ) ? get_pivot_col().remove_max() : Base::_remove_max( idx ); }
+
+ void finalize( index idx ) { Base::_finalize( idx ); }
};
}
diff --git a/include/phat/representations/vector_heap.h b/include/phat/representations/vector_heap.h index 78501f0..db0420f 100644 --- a/include/phat/representations/vector_heap.h +++ b/include/phat/representations/vector_heap.h @@ -160,5 +160,11 @@ namespace phat { if( 2 * inserts_since_last_prune[ target ] > ( index )matrix[ target ].size() )
_prune( target );
}
+
+ // finalizes given column
+ void _finalize( index idx ) {
+ _prune( idx );
+ }
+
};
}
diff --git a/include/phat/representations/vector_list.h b/include/phat/representations/vector_list.h index fdd5818..ca0b5b8 100644 --- a/include/phat/representations/vector_list.h +++ b/include/phat/representations/vector_list.h @@ -93,5 +93,9 @@ namespace phat { source_col.begin(), source_col.end(),
std::back_inserter( target_col ) );
}
+
+ // finalizes given column
+ void _finalize( index idx ) {
+ }
};
}
diff --git a/include/phat/representations/vector_set.h b/include/phat/representations/vector_set.h index ea6df09..6878a27 100644 --- a/include/phat/representations/vector_set.h +++ b/include/phat/representations/vector_set.h @@ -90,5 +90,10 @@ namespace phat { col.erase( result.first ); } } + + // finalizes given column + void _finalize( index idx ) { + } + }; } diff --git a/include/phat/representations/vector_vector.h b/include/phat/representations/vector_vector.h index 15dbfb1..f111d6b 100644 --- a/include/phat/representations/vector_vector.h +++ b/include/phat/representations/vector_vector.h @@ -97,5 +97,11 @@ namespace phat { target_col.swap(temp_col);
}
+
+ // finalizes given column
+ void _finalize( index idx ) {
+ column& col = matrix[ idx ];
+ column(col.begin(), col.end()).swap(col);
+ }
};
}
|