NumericalRecipes_Dist.cpp
上传用户:szb0815
上传日期:2007-06-13
资源大小:338k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #include <stdexcept>
- #pragma hdrstop
- #include "NumericalRecipes.h"
- /* Many parts of this program use routines from the Numerical Recipes library.
- The Numerical Recipes library does not permit distribution of their code. In order
- for Cluster to run and compile properly you must obtain and insert the following
- Numerical Recipes routines. I am working to rewrite all of this with public domain
- libraries. You can get NR routines from www.nr.com. Many academic institutions
- have site licenses. If you have questions about this, please contact me at
- eisen@genome.stanford.edu. If your institution has a license, I am happy to send
- you a copy of the intact version of this file */
- /* Routines needed:
- betacf
- betai
- crank
- erfcc
- gammln
- kendl1
- kstwo
- probks
- pythag
- select
- sort
- sort2
- spear
- svdcmp
- as well as all of the routines in nrutil.c
- */
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #define USE 1
- #undef IGNORE
- /* Trap sqrt domain errors and set value to 0 */
- int std::_matherr (struct math_exception *a)
- {
- if (a->type == DOMAIN)
- if (!strcmp(a->name,"sqrt")) {
- a->retval = 0;
- return 1;
- }
- return 0;
- }