Changeset 2470
- Timestamp:
- Apr 12, 2011, 5:21:45 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/0.7-stable merged: 2412,2444,2461,2464-2468
- Property svn:mergeinfo changed
-
trunk/NEWS
r2463 r2470 13 13 14 14 yat 0.7.x series from http://dev.thep.lu.se/yat/svn/branches/0.7-stable 15 16 version 0.7.2 (released 12 April 2011) 17 - omic::Codon("ATG").amino_acid() now return 'M' (bug #664) 18 - median now works on empty ranges (bug #660) 19 - fixed bug percentiler sometimes zero weight elements (r2466) 20 21 A complete list of closed tickets can be found here [[br]] 22 http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.7.2 23 15 24 16 25 version 0.7.1 (released 13 January 2011) -
trunk/bootstrap
r2121 r2470 7 7 # Copyright (C) 2006 Jari Häkkinen 8 8 # Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 9 # Copyright (C) 2009 Peter Johansson9 # Copyright (C) 2009, 2011 Peter Johansson 10 10 # 11 11 # This file is part of the yat library, http://dev.thep.lu.se/yat … … 37 37 shift; 38 38 done 39 cmd="autoreconf --install --symlink --force"; 39 40 if test "x$verbose" = "xno"; then 40 exec >& /dev/null 41 exec > /dev/null 42 else 43 cmd="$cmd --verbose" 41 44 fi 42 cmd="autoreconf --install --symlink --force --verbose";43 45 echo "$me: running: $cmd"; 44 46 exec $cmd; -
trunk/m4/version.m4
r2431 r2470 32 32 # DEV_BUILD - When rolling a tarball we set this to `false'. In 33 33 # repository value remains `true'. 34 m4_define([DEV_BUILD], [ true])34 m4_define([DEV_BUILD], [false]) 35 35 36 36 # Library versioning (current:revision:age) … … 67 67 # yat-0.7.0 4:0:0 68 68 # yat-0.7.1 4:1:0 69 # yat-0.7.2 4:2:0 69 70 # 70 71 # *Accidently, the libtool number was not updated for yat 0.5 -
trunk/test/codon.cc
r2370 r2470 2 2 3 3 /* 4 Copyright (C) 2010 Peter Johansson4 Copyright (C) 2010, 2011 Peter Johansson 5 5 6 6 This file is part of the yat library, http://dev.thep.lu.se/yat … … 53 53 suite.err() << "error: expected end() to return false\n"; 54 54 55 if (!suite.add(Codon("ATG").amino_acid()=='M')) 56 suite.err() << "error: Codon(\"ATG\").amino_acid() returns: `" 57 << Codon("ATG").amino_acid() << "'\n"; 58 59 if (!suite.add(Codon("ATG").start())) 60 suite.err() << "error: Codon(\"ATG\").start() returns: false\n"; 61 55 62 return suite.return_value(); 56 63 } -
trunk/test/statistics.cc
r2370 r2470 6 6 Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 7 7 Copyright (C) 2007, 2008, 2009 Jari Häkkinen, Peter Johansson 8 Copyright (C) 2010 Peter Johansson8 Copyright (C) 2010, 2011 Peter Johansson 9 9 10 10 This file is part of the yat library, http://dev.thep.lu.se/yat … … 46 46 void test_mad(test::Suite&); 47 47 48 void test_median_empty(test::Suite&); 48 49 void test_percentiler(test::Suite&); 49 50 void test_percentiler_nan(test::Suite&); … … 124 125 125 126 } 127 test_median_empty(suite); 126 128 return suite.return_value(); 127 129 } … … 150 152 boost::random_access_iterator_archetype<utility::DataWeight>()); 151 153 } 154 } 155 156 157 // test for ticket #660 158 void test_median_empty(test::Suite& suite) 159 { 160 std::vector<double> x; 161 double m = 0; 162 m = statistics::median(x.begin(), x.end(), true); 152 163 } 153 164 … … 260 271 RandomAccessIterator2 last2) 261 272 { 262 for (double p=0; p< 100; p+=10) {273 for (double p=0; p<=100; p+=10) { 263 274 double correct=statistics::percentile2(first1, last1, p); 264 275 test_percentiler(suite, first2, last2, p, correct); -
trunk/yat/omic/Codon.cc
r2369 r2470 2 2 3 3 /* 4 Copyright (C) 2010 Peter Johansson4 Copyright (C) 2010, 2011 Peter Johansson 5 5 6 6 This file is part of the yat library, http://dev.thep.lu.se/yat … … 138 138 add_to_map('I', "ATT,ATC,ATA"); 139 139 add_to_map('V', "GTT,GTC,GTA,GTG"); 140 add_to_map('\0',"ATG"); // start141 140 add_to_map('*',"TAA,TGA,TAG"); // stop 142 141 } … … 145 144 bool Codon::start(void) const 146 145 { 147 return iter_->second==' \0';146 return iter_->second=='M'; 148 147 } 149 148 -
trunk/yat/statistics/Percentiler.h
r2263 r2470 6 6 /* 7 7 Copyright (C) 2008, 2009 Jari Häkkinen, Peter Johansson 8 Copyright (C) 2010 Peter Johansson8 Copyright (C) 2010, 2011 Peter Johansson 9 9 10 10 This file is part of the yat library, http://dev.thep.lu.se/yat … … 34 34 #include <algorithm> 35 35 #include <cmath> 36 #include <limits> 36 37 #include <numeric> 37 38 #include <stdexcept> … … 99 100 BOOST_CONCEPT_ASSERT((boost::RandomAccessIterator<RandomAccessIterator>)); 100 101 BOOST_CONCEPT_ASSERT((utility::DataIteratorConcept<RandomAccessIterator>)); 102 if (first==last) 103 return std::numeric_limits<double>::quiet_NaN(); 101 104 return calculate(first, last, sorted_, 102 105 typename utility::weighted_iterator_traits<RandomAccessIterator>::type()); … … 176 179 std::vector<double>::const_iterator upper(accum_w.begin()); 177 180 double margin=1e-10; 178 while ( *upper <= w_bound+margin && upper!=accum_w.end())181 while (upper!=accum_w.end() && *upper <= w_bound+margin) 179 182 ++upper; 180 if (upper==accum_w.end()) 183 while (upper!=accum_w.begin() && 184 (upper==accum_w.end() || 185 trait.weight(first+(upper-accum_w.begin()))==0.0)) 181 186 --upper; 182 187 std::vector<double>::const_iterator lower(upper);
Note: See TracChangeset
for help on using the changeset viewer.