Changeset 2149
- Timestamp:
- Jan 17, 2010, 4:28:14 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization_test.cc
r2148 r2149 400 400 suite.add(suite.equal(res(0,2).data(), 2.0/3)); 401 401 suite.add(suite.equal(res(0,3).data(), 0.5/3)); 402 // compile test should not be run 403 if (false) { 404 spearman(boost::random_access_iterator_archetype<double>(), 405 boost::random_access_iterator_archetype<double>(), 406 boost::mutable_random_access_iterator_archetype<double>()); 407 } 408 402 409 } 403 410 -
trunk/yat/normalizer/Spearman.h
r2148 r2149 29 29 #include "yat/utility/WeightIterator.h" 30 30 31 #include <boost/concept_check.hpp> 32 31 33 #include <algorithm> 32 34 #include <functional> … … 58 60 permissible for the iterators \a first and \a result to be the 59 61 same. 62 63 Type Requirements: 64 - RandomAccessIter1 must be a \random_access_iterator 65 - RandomAccessIter2 must be a mutable \random_access_iterator 66 60 67 */ 61 template<typename ForwardIterator, typename RandomAccessIterator>62 void operator()( ForwardIterator first, ForwardIteratorlast,63 RandomAccessIter atorresult) const68 template<typename RandomAccessIter1, typename RandomAccessIter2> 69 void operator()(RandomAccessIter1 first, RandomAccessIter1 last, 70 RandomAccessIter2 result) const 64 71 { 65 typename utility::weighted_iterator_traits<ForwardIterator>::type tag; 72 using boost::function_requires; 73 function_requires<boost::RandomAccessIterator<RandomAccessIter1> >(); 74 function_requires<boost::Mutable_RandomAccessIterator<RandomAccessIter2> >(); 75 typename utility::weighted_iterator_traits<RandomAccessIter1>::type tag; 66 76 normalize(first, last, result, tag); 67 77 }
Note: See TracChangeset
for help on using the changeset viewer.