From 7b96eb822cf02b5d92905f0ab732e977b4dd0e7c Mon Sep 17 00:00:00 2001 From: "jan.reininghaus" Date: Tue, 23 Apr 2013 15:27:22 +0000 Subject: vector_set cleanup git-svn-id: https://phat.googlecode.com/svn/trunk@41 8e3bb3c2-eed4-f18f-5264-0b6c94e6926d --- include/phat/representations/vector_set.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/phat/representations/vector_set.h b/include/phat/representations/vector_set.h index 2ce0c56..dadf1b3 100644 --- a/include/phat/representations/vector_set.h +++ b/include/phat/representations/vector_set.h @@ -51,7 +51,6 @@ namespace phat { col.clear(); col.reserve( matrix[idx].size() ); std::copy (matrix[idx].begin(), matrix[idx].end(), std::back_inserter(col) ); - std::sort( col.begin(), col.end() ); } void _set_col( index idx, const column& col ) { matrix[ idx ].clear(); @@ -85,11 +84,8 @@ namespace phat { // adds column 'source' to column 'target' void _add_to( index source, index target ) { - internal_column& source_col = matrix[ source ]; - for( internal_column::const_iterator source_it = source_col.begin(); - source_it != source_col.end(); source_it++ ) { - _toggle(target, *source_it); - } + for( internal_column::iterator it = matrix[ source ].begin(); it != matrix[ source ].end(); it++ ) + _toggle( target, *it ); } //// toggles given index pair -- cgit v1.2.3