|
Boost-Commit : |
From: chintanraoh_at_[hidden]
Date: 2008-06-09 00:09:41
Author: chintanraoh
Date: 2008-06-09 00:09:41 EDT (Mon, 09 Jun 2008)
New Revision: 46269
URL: http://svn.boost.org/trac/boost/changeset/46269
Log:
added trie::size()
Text files modified:
sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Modified: sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp
==============================================================================
--- sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp (original)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp 2008-06-09 00:09:41 EDT (Mon, 09 Jun 2008)
@@ -56,7 +56,6 @@
trie(const type &other)
{
- //std::cout<<"in copy constructor"<<std::endl;
copy_trie_preserve(const_cast<node_type *>(other.node_root) );
}
@@ -80,11 +79,13 @@
this->operator[](v.first)=v.second;
}
- //TODO: O(sizeof(intput))?
std::size_t size() const
{
- assert(false);
- return 0;
+ int num=0;
+ const_iterator it;
+ const_iterator end_it=this->end();
+ for(it=this->begin();it!=end_it;it++,num++);
+ return num;
}
std::size_t max_size()
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk