Revision 1239

trunk/src/linad99/fvar.hpp (revision 1239)
5936 5936
			  dvariable yp1, dvariable ypn);
5937 5937
   vcubic_spline_function(const dvector & _x, const dvar_vector & _y,
5938 5938
			  dvariable yp1);
5939
   dvariable operator () (double u);
5939
   dvariable operator   () (double u);
5940 5940
   dvar_vector operator () (const dvector & u);
5941 5941
   dvar_vector operator () (const dvar_vector & u);
5942 5942
};
trunk/src/linad99/ufstream.cpp (revision 1239)
10 10
 */
11 11
#include "fvar.hpp"
12 12

  
13

  
13 14
void uistream::sss(void){}
14 15
void uostream::sss(void){}
15 16

  
......
38 39
#if defined(__TURBOC__) || defined(__GNUDOS__) || defined(__MSVC32__) || defined (__WAT32__)
39 40
uostream::uostream(const char* name, int  m, int prot)
40 41
#  if defined(__GNU_NEWER__)
41
    :ofstream(name, std::ios::binary | std::_Ios_Openmode(m))
42
    :ofstream(name, std::ios::binary | std::ios::openmode(m))
43
    // :ofstream(name, std::ios::binary | std::_Ios_Openmode(m))
42 44
#  elif defined(__MSC_NEWER__) || (__BORLANDC__  > 0x0550)
43 45
    :ofstream(name, std::ios::binary | m)
44 46
#  else
......
80 82
#else
81 83
#  if defined(linux)
82 84
#    if (__GNUC__  >= 3)
83
       ofstream::open(name, std::_Ios_Openmode(m));
85
       ofstream::open(name, std::ios::openmode(m));
86
       // ofstream::open(name, std::_Ios_Openmode(m));
84 87
#    else
85 88
       ofstream::open(name, m);
86 89
#    endif
trunk/src/tools99/cifstrem.cpp (revision 1239)
82 82
 #if defined(__SUNPRO_CC)
83 83
 : ifstream(fn, ios::in | open_m) , file_name(fn)
84 84
 #else
85
 : ifstream(fn, ios::in | std::_Ios_Openmode(open_m)) , file_name(fn)
85
 : ifstream(fn, ios::in | std::ios::openmode(open_m)) , file_name(fn)
86
 // : ifstream(fn, ios::in | std::_Ios_Openmode(open_m)) , file_name(fn)
86 87
 #endif
87 88
#elif defined (__ZTC__)
88 89
 : ios(&buffer), ifstream(fn, ios::in | open_m) , file_name(fn)
trunk/contrib/statslib/dnorm.cpp (revision 1239)
1 1
#include "statsLib.h"
2 2
#include <admodel.h>
3
#include <df1b2fun.h>
4
#include <adrndeff.h> 
3 5

  
4 6
/**
5 7
* 
......
11 13
* 
12 14
* 
13 15
* This file contains the negative loglikelihood 
14
* functions for the normal distribution. The function
16
* functions for the normal distribution and is implemented to be consistent
17
* with the statistical program R with log=TRUE. The function
15 18
* dnorm is overloaded to accomodate single variables and vectors. 
19
*
20
* There are also overloaded versions where the user can specify the likelihood (i.e., log=FALSE)
16 21
* 
17
* The function is implemented as:
22
* The function is implemented as the negative log of the normal density function:
18 23
* \f[
19 24
*  0.5\ln(2 \pi) + \ln(\sigma) + 0.5\frac{(x-\mu)^2}{\sigma^2}
20 25
* \f]
......
51 56
	return 0.5*log(2.*M_PI)+log(std)+0.5*square(x-mu)/(std*std);
52 57
}
53 58

  
59
dvariable dnorm( const prevariable& x, const double& mu, const double& std, bool bLog=true )
60
{
61

  
62
	if( std<=0 ) 
63
	{
64
		cerr<<"Standard deviation is less than or equal to zero in "
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff