diff options
author | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2010-12-23 18:18:20 +0000 |
---|---|---|
committer | astrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675> | 2010-12-23 18:18:20 +0000 |
commit | f3019d095d5f0b6c67de18124cebe93fd9eb5a69 (patch) | |
tree | 930fe733b0a1ebe382c9014f3befd87d2273dcae /data_sets | |
parent | 248e73a7faa069840eb8378719cd92e778cb826f (diff) | |
download | opt-utilities-f3019d095d5f0b6c67de18124cebe93fd9eb5a69.tar.bz2 |
git-svn-id: file:///home/svn/opt_utilities@149 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'data_sets')
-rw-r--r-- | data_sets/default_data_set.hpp | 1 | ||||
-rw-r--r-- | data_sets/shared_table_data_set.hpp | 11 | ||||
-rw-r--r-- | data_sets/sorted_data_set.hpp | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/data_sets/default_data_set.hpp b/data_sets/default_data_set.hpp index 16de859..d56f810 100644 --- a/data_sets/default_data_set.hpp +++ b/data_sets/default_data_set.hpp @@ -1,5 +1,6 @@ /** \file default_data_set.hpp + \author Junhua Gu */ #ifndef DEFAULT_DATA_SET diff --git a/data_sets/shared_table_data_set.hpp b/data_sets/shared_table_data_set.hpp index 6e34808..cf71692 100644 --- a/data_sets/shared_table_data_set.hpp +++ b/data_sets/shared_table_data_set.hpp @@ -1,5 +1,6 @@ /** - \file default_data_set.hpp + \file shared_table_data_set.hpp + \author Junhua Gu */ #ifndef SHARED_TABLE_DATA_SET @@ -14,6 +15,8 @@ namespace opt_utilities /** \brief shared_table implement of the data set + When the shared_table_data_set clones self, it doesn't + allocate a new instance, but returns a pointer to self. \tparam Ty type of y \tparam Tx type of x */ @@ -25,11 +28,17 @@ namespace opt_utilities public: std::vector<data<Ty,Tx> > data_vec; + /** + Only returns a pointer to self + */ data_set<Ty,Tx>* do_clone()const { return (data_set<Ty,Tx>*)(this); } + /** + We do nothing here. + */ void do_destroy() { } diff --git a/data_sets/sorted_data_set.hpp b/data_sets/sorted_data_set.hpp index 034a442..fec4e20 100644 --- a/data_sets/sorted_data_set.hpp +++ b/data_sets/sorted_data_set.hpp @@ -1,5 +1,6 @@ /** \file sorted_data_set.hpp + \author Junhua Gu */ #ifndef SORTED_DATA_SET |