Changeset 3290
- Timestamp:
- Jul 12, 2014, 7:59:16 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization.cc
r3289 r3290 374 374 // compile test should not be run 375 375 if (false) { 376 gauss(boost::random_access_iterator_archetype<double>(), 377 boost::random_access_iterator_archetype<double>(), 378 boost::mutable_random_access_iterator_archetype<double>()); 379 using utility::DataWeight; 380 gauss(boost::random_access_iterator_archetype<DataWeight>(), 381 boost::random_access_iterator_archetype<DataWeight>(), 382 boost::mutable_random_access_iterator_archetype<DataWeight>()); 383 gauss(boost::random_access_iterator_archetype<DataWeight>(), 384 boost::random_access_iterator_archetype<DataWeight>(), 385 boost::mutable_random_access_iterator_archetype<double>()); 386 gauss(boost::random_access_iterator_archetype<double>(), 387 boost::random_access_iterator_archetype<double>(), 388 boost::mutable_random_access_iterator_archetype<DataWeight>()); 376 using boost::iterator_archetype; 377 iterator_archetype<double, 378 boost::iterator_archetypes::readable_iterator_t, 379 boost::random_access_traversal_tag> 380 readable_iterator; 381 382 iterator_archetype<double, 383 boost::iterator_archetypes::readable_writable_iterator_t, 384 boost::random_access_traversal_tag> 385 writable_iterator; 386 387 // We have to use lvalue here because otherwise proxy classes 388 // provided by boost kick in and they do not provide the needed 389 // data() and weight() functions that e.g. DataWeightProxy does. 390 iterator_archetype<utility::DataWeight, 391 boost::iterator_archetypes::readable_lvalue_iterator_t, 392 boost::random_access_traversal_tag> 393 weighted_readable_iterator; 394 395 iterator_archetype<utility::DataWeight, 396 boost::iterator_archetypes::writable_lvalue_iterator_t, 397 boost::random_access_traversal_tag> 398 weighted_writable_iterator; 399 400 gauss(readable_iterator, readable_iterator, writable_iterator); 401 gauss(readable_iterator, readable_iterator, weighted_writable_iterator); 402 gauss(weighted_readable_iterator, weighted_readable_iterator, 403 writable_iterator); 404 gauss(weighted_readable_iterator, weighted_readable_iterator, 405 weighted_writable_iterator); 389 406 } 390 407 } -
trunk/yat/normalizer/Gauss.h
r2992 r3290 43 43 After normalization the range will follow a standard Gaussian 44 44 distribution (mean zero and unity variance). 45 45 46 46 The range is first rank normalized using Spearman, after which 47 47 each element is between 0 and unity. Second each element is 48 48 replaced by inverse cumulative standard Gaussian distribution. 49 49 50 50 \since New in yat 0.5 51 51 */ … … 58 58 same. 59 59 60 Type requirements: 61 - ForwardIterator must be a \forward_iterator and a \ref 62 concept_data_iterator. 63 - RandomAccessIterator must be a mutable \random_access_iterator 64 and a \ref concept_data_iterator. 60 Type Requirements: 61 - \c RandomAccessIter1 is \readable_iterator 62 - \c RandomAccessIter1 is \random_access_traversal_iterator 63 - \c RandomAccessIter1 is \ref concept_data_iterator 64 - \c RandomAccessIter2 is \readable_iterator 65 - \c RandomAccessIter2 is \writable_iterator 66 - \c RandomAccessIter2 is \random_access_traversal_iterator 67 - \c RandomAccessIter2 is \ref concept_data_iterator 65 68 66 69 \see gsl_cdf_ugaussian_Pinv … … 70 73 RandomAccessIter2 result) const 71 74 { 72 BOOST_CONCEPT_ASSERT((utility::DataIteratorConcept<RandomAccessIter1>));73 BOOST_CONCEPT_ASSERT((utility::DataIteratorConcept<RandomAccessIter2>));74 BOOST_CONCEPT_ASSERT((boost::RandomAccessIterator<RandomAccessIter1>));75 BOOST_CONCEPT_ASSERT((boost::Mutable_RandomAccessIterator<RandomAccessIter2>));76 75 Spearman spearman; 77 76 spearman(first, last, result);
Note: See TracChangeset
for help on using the changeset viewer.