diff options
Diffstat (limited to 'data_sets')
-rw-r--r-- | data_sets/shared_table_data_set.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<Ty,Tx>& 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<data_vec.size()) |