Changes from tags/0.6.2 at r4334 to tags/0.6.3 at r4334
- Location:
- tags/0.6.3
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/0.6.3/NEWS
r4334 r4334 4 4 5 5 yat 0.6.x series from http://dev.thep.lu.se/yat/svn/branches/0.6-stable 6 7 Version 0.6.3 (released 21 December 2010) 8 9 - fixed overflow in statistics::Fisher (#638) 10 - fixed bug that double was hard-coded in function load<T>(6) (r2271) 11 12 A complete list of closed tickets can be found here [[br]] 13 http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.6.3 6 14 7 15 Version 0.6.2 (released 18 May 2010) -
tags/0.6.3/build_support/Makefile.am
r4334 r4334 53 53 -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ 54 54 -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \ 55 -e 's|@ECHO[@]|$(ECHO)|g' \56 55 -e 's|@VERSION[@]|$(VERSION)|g' \ 57 56 -e 's|@YAT_MAJOR_VERSION[@]|$(YAT_MAJOR_VERSION)|g' \ … … 67 66 yat-config: Makefile $(srcdir)/yat-config.in 68 67 @rm -f $@ $@.tmp 69 @ $(ECHO)"#! $(SHELL)" > $@.tmp70 @ $(ECHO)"# $@ generated by make from yat-config.in" >> $@.tmp68 @echo "#! $(SHELL)" > $@.tmp 69 @echo "# $@ generated by make from yat-config.in" >> $@.tmp 71 70 @$(edit) '$(srcdir)/$@.in' >>$@.tmp 72 71 @chmod +x $@.tmp 73 72 @chmod a-w $@.tmp 74 73 @mv $@.tmp $@ 75 @ $(ECHO)creating $@74 @echo creating $@ 76 75 77 76 yat.pc: Makefile $(srcdir)/yat.pc.in 78 77 @rm -f $@ $@.tmp 79 @ $(ECHO)"# $@ generated by make from yat.pc.in" > $@.tmp78 @echo "# $@ generated by make from yat.pc.in" > $@.tmp 80 79 @$(edit) '$(srcdir)/$@.in' >>$@.tmp 81 80 @chmod a-w $@.tmp 82 81 @mv $@.tmp $@ 83 @ $(ECHO)creating $@82 @echo creating $@ 84 83 85 84 install-exec-hook: -
tags/0.6.3/build_support/yat-config.in
r4334 r4334 93 93 case "$1" in 94 94 --prefix) 95 @ECHO@$prefix95 echo $prefix 96 96 exit 0 97 97 ;; 98 98 --bindir) 99 @ECHO@$bindir99 echo $bindir 100 100 exit 0 101 101 ;; 102 102 --includedir) 103 @ECHO@$includedir103 echo $includedir 104 104 exit 0 105 105 ;; 106 106 --libdir) 107 @ECHO@$libdir107 echo $libdir 108 108 exit 0 109 109 ;; 110 110 --cxx) 111 @ECHO@$CXX111 echo $CXX 112 112 exit 0 113 113 ;; 114 114 --cxxcpp) 115 @ECHO@$CXXCPP115 echo $CXXCPP 116 116 exit 0 117 117 ;; … … 165 165 ;; 166 166 --atleast-version=*) 167 optarg=` @ECHO@"$1" | sed 's/--atleast-version=//'`168 min_major=` @ECHO@"$optarg" | sed 's/\([0-9]*\).*/\1/'`167 optarg=`echo "$1" | sed 's/--atleast-version=//'` 168 min_major=`echo "$optarg" | sed 's/\([0-9]*\).*/\1/'` 169 169 if test "$optarg" = "$min_major"; then 170 170 min_minor="0"; 171 171 else 172 min_minor=` @ECHO@"$optarg" | sed 's/[0-9]*.\([0-9]*\).*/\1/'`172 min_minor=`echo "$optarg" | sed 's/[0-9]*.\([0-9]*\).*/\1/'` 173 173 fi 174 174 if test "$optarg" = "$min_major.$min_minor"; then 175 175 min_patch="0"; 176 176 else 177 min_patch=` @ECHO@"$optarg" | sed 's/[0-9]*.[0-9]*.\([0-9]*\).*/\1/'`177 min_patch=`echo "$optarg" | sed 's/[0-9]*.[0-9]*.\([0-9]*\).*/\1/'` 178 178 fi 179 179 if test "$optarg" = "$min_patch"; then … … 198 198 ;; 199 199 --version) 200 @ECHO@@VERSION@200 echo @VERSION@ 201 201 exit 0 202 202 ;; 203 203 --version-major) 204 @ECHO@@YAT_MAJOR_VERSION@204 echo @YAT_MAJOR_VERSION@ 205 205 exit 0 206 206 ;; 207 207 --version-minor) 208 @ECHO@@YAT_MINOR_VERSION@208 echo @YAT_MINOR_VERSION@ 209 209 exit 0 210 210 ;; 211 211 --version-patch) 212 @ECHO@@YAT_PATCH_VERSION@212 echo @YAT_PATCH_VERSION@ 213 213 exit 0 214 214 ;; … … 243 243 fi 244 244 done 245 @ECHO@$unique_flags245 echo $unique_flags 246 246 fi 247 247 -
tags/0.6.3/configure.ac
r4334 r4334 81 81 AC_PROG_SED 82 82 AC_PROG_LIBTOOL 83 # fall back to echo unless ECHO not already set (by libtool)84 AS_IF([test "x$ECHO" = x], [ECHO=echo])85 AC_SUBST(ECHO)86 83 87 84 AC_MSG_NOTICE(dnl -
tags/0.6.3/doc/Makefile.am
r4334 r4334 6 6 # Copyright (C) 2005 Peter Johansson 7 7 # Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson 8 # Copyright (C) 2009 Peter Johansson8 # Copyright (C) 2009, 2010 Peter Johansson 9 9 # 10 10 # This file is part of the yat library, http://dev.thep.lu.se/yat … … 79 79 80 80 $(DX_HTML_OUTPUT)/index.html: $(DOXYGEN_DEPS) 81 @(cat doxygen.config && $(ECHO)"INPUT = $(DOXYGEN_INPUT)" && \82 $(ECHO)GENERATE_HTML = YES) | $(DOXYGEN) -;81 @(cat doxygen.config && echo "INPUT = $(DOXYGEN_INPUT)" && \ 82 echo GENERATE_HTML = YES) | $(DOXYGEN) -; 83 83 84 84 $(DX_LATEX_OUTPUT)/refman.tex: $(DOXYGEN_DEPS) 85 @(cat doxygen.config && $(ECHO)"INPUT = $(DOXYGEN_INPUT)" && \86 $(ECHO)GENERATE_LATEX = YES) | $(DOXYGEN) -;85 @(cat doxygen.config && echo "INPUT = $(DOXYGEN_INPUT)" && \ 86 echo GENERATE_LATEX = YES) | $(DOXYGEN) -; 87 87 88 88 $(PACKAGE).dvi: $(DX_LATEX_OUTPUT)/refman.tex … … 132 132 test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)";\ 133 133 $(INSTALL_DATA) $(PACKAGE).dvi "$(DESTDIR)$(dvidir)/$(PACKAGE).dvi"; \ 134 $(ECHO)"$(INSTALL_DATA) $(PACKAGE).dvi $(DESTDIR)$(dvidir)/$(PACKAGE).dvi";\134 echo "$(INSTALL_DATA) $(PACKAGE).dvi $(DESTDIR)$(dvidir)/$(PACKAGE).dvi";\ 135 135 fi 136 136 … … 139 139 test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)";\ 140 140 $(INSTALL_DATA) $(PACKAGE).ps "$(DESTDIR)$(psdir)/$(PACKAGE).ps"; \ 141 $(ECHO)"$(INSTALL_DATA) $(PACKAGE).ps $(DESTDIR)$(psdir)/$(PACKAGE).ps";\141 echo "$(INSTALL_DATA) $(PACKAGE).ps $(DESTDIR)$(psdir)/$(PACKAGE).ps";\ 142 142 fi 143 143 … … 146 146 test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)";\ 147 147 $(INSTALL_DATA) $(PACKAGE).pdf "$(DESTDIR)$(pdfdir)/$(PACKAGE).pdf"; \ 148 $(ECHO)"$(INSTALL_DATA) $(PACKAGE).pdf $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf";\148 echo "$(INSTALL_DATA) $(PACKAGE).pdf $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf";\ 149 149 fi 150 150 -
tags/0.6.3/doc/doxygen.config.in
r4334 r4334 6 6 # Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson 7 7 # Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér 8 # Copyright (C) 2009 Peter Johansson8 # Copyright (C) 2009, 2010 Peter Johansson 9 9 # 10 10 # This file is part of the yat library, http://dev.thep.lu.se/yat … … 279 279 ALIASES += "bidirectional_iterator=<a href=\"http://www.sgi.com/tech/stl/BidirectionalIterator.html\">Bidirectional Iterator</a>" 280 280 ALIASES += "random_access_iterator=<a href=\"http://www.sgi.com/tech/stl/RandomAccessIterator.html\">Random Access Iterator</a>" 281 ALIASES += "boost_url=http://www.boost.org/doc/libs/1_35_0/libs" 281 282 282 283 # The ENABLED_SECTIONS tag can be used to enable conditional … … 558 559 # put in front of it. If left blank `latex' will be used as the default path. 559 560 560 LATEX_OUTPUT = @DX_LATEX_OUTPUT@561 LATEX_OUTPUT = 561 562 562 563 # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact … … 713 714 # way by setting EXPAND_ONLY_PREDEF to YES. 714 715 715 MACRO_EXPANSION = NO716 MACRO_EXPANSION = YES 716 717 717 718 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES … … 719 720 # PREDEFINED and EXPAND_AS_PREDEFINED tags. 720 721 721 EXPAND_ONLY_PREDEF = NO722 EXPAND_ONLY_PREDEF = YES 722 723 723 724 # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files … … 745 746 # omitted =1 is assumed. 746 747 747 PREDEFINED = 748 PREDEFINED = YAT_DEPRECATE= 748 749 749 750 # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then -
tags/0.6.3/m4/version.m4
r4334 r4334 28 28 m4_define([MINOR_VERSION], [6]) 29 29 # PATCH - Modify for every released patch 30 m4_define([PATCH_VERSION], [ 2])30 m4_define([PATCH_VERSION], [3]) 31 31 32 32 # DEV_BUILD - When rolling a tarball we set this to `false'. In … … 64 64 # yat-0.6.1 3:1:0 65 65 # yat-0.6.2 3:2:0 66 # yat-0.6.3 3:3:0 66 67 # 67 68 # *Accidently, the libtool number was not updated for yat 0.5 68 69 # 69 m4_define([YAT_LT_VERSION_INFO], [3: 2:0])70 m4_define([YAT_LT_VERSION_INFO], [3:3:0]) 70 71 71 72 ### -
tags/0.6.3/m4/yat.m4
r4334 r4334 111 111 AC_DEFUN([YAT_CHECK_YAT], 112 112 [ 113 AC_PREREQ([2.60]) dnl we use AC_FIND_YAT113 AC_PREREQ([2.60]) dnl we use YAT_FIND_YAT 114 114 ac_yat_check_yat_res="yes" 115 115 AC_REQUIRE([YAT_FIND_YAT]) dnl -
tags/0.6.3/test/commandline_test.cc
r4334 r4334 30 30 31 31 #include <cassert> 32 #include <cstdlib> 32 33 #include <fstream> 33 34 #include <stdexcept> -
tags/0.6.3/test/fisher_test.cc
r4334 r4334 2 2 3 3 /* 4 Copyright (C) 2008, 2009 Peter Johansson4 Copyright (C) 2008, 2009, 2010 Peter Johansson 5 5 6 6 This file is part of the yat library, http://dev.thep.lu.se/yat … … 20 20 */ 21 21 22 #include <climits> 23 22 24 #include "Suite.h" 23 25 … … 28 30 void test_p_value_approximative(test::Suite&); 29 31 void test_p_value_exact(test::Suite&); 32 void test_large_numbers(test::Suite&); 30 33 31 34 int main(int argc, char* argv[]) … … 65 68 } 66 69 test_p_value(suite); 70 test_large_numbers(suite); 67 71 return suite.return_value(); 68 72 } … … 116 120 117 121 } 122 123 void test_large_numbers(test::Suite& suite) 124 { 125 // skip test if unsigned int is 16 bit 126 if ((UINT_MAX >> 16) == 0) { 127 suite.out() << "skipping test_large_numbers\n"; 128 return; 129 } 130 131 statistics::Fisher f; 132 double oddsratio = f.oddsratio(1166,63326825-1166,1095,66074759-1095); 133 if (oddsratio<0.5 || oddsratio>2) { 134 suite.err() << "oddsratio: " << oddsratio << "\n"; 135 suite.err() << "expected ~ 1\n"; 136 suite.xadd(false); 137 } 138 suite.add(suite.equal_fix(f.p_value(), 0.0123, 0.0001)); 139 f.p_value_one_sided(); 140 } -
tags/0.6.3/yat/statistics/Fisher.cc
r4334 r4334 5 5 Copyright (C) 2005 Peter Johansson 6 6 Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson 7 Copyright (C) 2009 Peter Johansson7 Copyright (C) 2009, 2010 Peter Johansson 8 8 9 9 This file is part of the yat library, http://dev.thep.lu.se/yat … … 30 30 31 31 #include <algorithm> 32 #include <cassert> 32 33 33 34 namespace theplu { … … 64 65 void Fisher::expected(double& a, double& b, double& c, double& d) const 65 66 { 66 double N = a_+b_+c_+d_; 67 a =((a_+b_)*(a_+c_)) / N; 68 b =((a_+b_)*(b_+d_)) / N; 69 c =((c_+d_)*(a_+c_)) / N; 70 d =((c_+d_)*(b_+d_)) / N; 67 // use floting point arithmetic to avoid overflow 68 double a1 = a_; 69 double b1 = b_; 70 double c1 = c_; 71 double d1 = d_; 72 double N = a1 + b1 + c1 + d1; 73 a =((a1+b1)*(a1+c1)) / N; 74 b =((a1+b1)*(b1+d1)) / N; 75 c =((c1+d1)*(a1+c1)) / N; 76 d =((c1+d1)*(b1+d1)) / N; 71 77 } 72 78 … … 98 104 d_ = d; 99 105 100 oddsratio_=static_cast<double>(a*d)/static_cast<double>(b*c); 106 oddsratio_= (static_cast<double>(a) / static_cast<double>(b) * 107 static_cast<double>(d) / static_cast<double>(c) ); 101 108 return oddsratio_; 102 109 } … … 118 125 return p_value_approximative()/2.0; 119 126 } 127 // check for overflow 128 assert(c_ <= c_+d_ && d_ <= c_+d_); 129 assert(a_ <= a_+b_ && b_ <= a_+b_); 130 assert(a_ <= a_+c_ && c_ <= a_+c_); 131 120 132 return statistics::cdf_hypergeometric_P(c_, c_+d_, a_+b_, a_+c_); 121 133 } … … 147 159 } 148 160 149 150 161 }}} // of namespace statistics, yat, and theplu -
tags/0.6.3/yat/utility/PCA.h
r4334 r4334 10 10 Copyright (C) 2006 Jari Häkkinen 11 11 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 12 Copyright (C) 2010 Peter Johansson 12 13 13 14 This file is part of the yat library, http://dev.thep.lu.se/yat … … 43 44 this space, all Nx1 vectors will have dimension Mx1. Hence 44 45 the projection will have dimension MxM where each column is 45 a point in the new space. Also, it assumes that M>N. The opposite 46 problem is added in the functions: process_transposed_problem and 47 projection_transposed()... 46 a point in the new space. 47 48 \note Currently number of rows, N, must be larger (or equal) than 49 number of columns, M. 48 50 */ 49 51 class PCA … … 105 107 3: Calculate eigenvalues according to \n 106 108 \f$ \lambda_{ii} = s_{ii}/N_{rows} \f$ \n 107 4: Sort eigenvectors (from matrix V) according to descending eigenvalues\n108 109 */ 109 110 void process(void); -
tags/0.6.3/yat/utility/iterator_traits.h
r4334 r4334 229 229 230 230 Struct to check if iterator has mutable data. *Iter must have a 231 function data(). If that function returns double& ::value is231 function data(). If that function returns double& value is 232 232 true. 233 233 */ … … 247 247 248 248 Struct to check if iterator has mutable data. *Iter must have a 249 function data(). If that function returns double& ::value is249 function data(). If that function returns double& value is 250 250 true. 251 251 */ -
tags/0.6.3/yat/utility/utility.h
r4334 r4334 8 8 Copyright (C) 2006 Jari Häkkinen 9 9 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson 10 Copyright (C) 2009 Peter Johansson10 Copyright (C) 2009, 2010 Peter Johansson 11 11 12 12 This file is part of the yat library, http://dev.thep.lu.se/yat … … 262 262 continue; 263 263 matrix.resize(matrix.size()+1); 264 std::vector< double>& v=matrix.back();264 std::vector<T>& v=matrix.back(); 265 265 v.reserve(nof_columns); 266 266 std::stringstream ss(line);
Note: See TracChangeset
for help on using the changeset viewer.