From f3019d095d5f0b6c67de18124cebe93fd9eb5a69 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Thu, 23 Dec 2010 18:18:20 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@149 ed2142bd-67ad-457f-ba7c-d818d4011675 --- data_sets/default_data_set.hpp | 1 + data_sets/shared_table_data_set.hpp | 11 ++++++++++- data_sets/sorted_data_set.hpp | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'data_sets') 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_vec; + /** + Only returns a pointer to self + */ data_set* do_clone()const { return (data_set*)(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 -- cgit v1.2.2