aboutsummaryrefslogtreecommitdiffstats
path: root/data_sets/shared_table_data_set.hpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2010-12-23 18:18:20 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2010-12-23 18:18:20 +0000
commitf3019d095d5f0b6c67de18124cebe93fd9eb5a69 (patch)
tree930fe733b0a1ebe382c9014f3befd87d2273dcae /data_sets/shared_table_data_set.hpp
parent248e73a7faa069840eb8378719cd92e778cb826f (diff)
downloadopt-utilities-f3019d095d5f0b6c67de18124cebe93fd9eb5a69.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@149 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'data_sets/shared_table_data_set.hpp')
-rw-r--r--data_sets/shared_table_data_set.hpp11
1 files changed, 10 insertions, 1 deletions
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()
{
}