From ec066c34fea88f9bcbdf3b9280a2747672fa2ef6 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Wed, 23 Sep 2009 17:26:19 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@72 ed2142bd-67ad-457f-ba7c-d818d4011675 --- data_sets/shared_table_data_set.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'data_sets/shared_table_data_set.hpp') diff --git a/data_sets/shared_table_data_set.hpp b/data_sets/shared_table_data_set.hpp index 1e9b743..380e055 100644 --- a/data_sets/shared_table_data_set.hpp +++ b/data_sets/shared_table_data_set.hpp @@ -70,6 +70,17 @@ namespace opt_utilities return true; } + bool insert_data(size_t idx,size_t n,const data& d) + { + if(idx<0||idx>data_vec.size()) + { + return false; + } + data_vec.insert(data_vec.begin()+idx,n,d); + return true; + } + + bool erase_data(size_t idx) { if(idx>=0&&idx