#include <session.h>
Definition at line 36 of file session.h.
Public Methods | |
| Session (void) | |
| ~Session (void) | |
| Session & | operator= (const Session &s) |
| void | initialize (const std::string &td) |
| void | clear (void) |
| std::string | mktemp (void) |
Public Attributes | |
| MTRand | mtr |
| int | rand_seed |
| int | warning |
| int | output_precision |
| int | output_line_width |
| double | epsilon |
Private Attributes | |
| std::string | tmpdir |
| std::vector< std::string > | tmpfile |
|
|
Definition at line 42 of file session.h. References tmpdir.
00042 : tmpdir("") { } |
|
|
Definition at line 43 of file session.h. References clear().
00043 { clear(); }
|
|
|
Definition at line 87 of file session.cpp. References tmpfile. Referenced by ~Session().
|
|
|
Definition at line 39 of file session.cpp. References epsilon, output_line_width, output_precision, rand_seed, tmpdir, and warning.
00040 {
00041
00042 tmpdir = d;
00043 #ifdef WIN32
00044 _fmode=O_BINARY;
00045 #endif
00046 DIR *dir = opendir(tmpdir.c_str());
00047 if (!dir) throw exception("Session::initialize(): " + d + ": No such directory");
00048 closedir(dir);
00049
00050
00051 warning = 1;
00052 rand_seed = -987654321;
00053 output_precision = 6;
00054 output_line_width = 80;
00055 epsilon = 1.0e-14; // was -14
00056 return;
00057 }
|
|
|
Definition at line 59 of file session.cpp. References tmpdir, and tmpfile. Referenced by matvec::Pedigree::copyfrom(), matvec::Data::Data(), matvec::Pedigree::input(), matvec::Model::out_lsmeans_to_stream(), matvec::Pedigree::Pedigree(), matvec::Plotter::plot(), and matvec::Plotter::Plotter().
00060 {
00061 if (tmpdir == "") throw exception("Session::mktemp(): session is not initialized");
00062 char *fname;
00063 #ifndef WIN32
00064 fname= new char [tmpdir.length() + 11];
00065 strcpy(fname,tmpdir.c_str());
00066 strcat(fname,"/mv.XXXXXX");
00067 #endif
00068
00069 int tfile;
00070 if (
00071 #ifdef WIN32
00072 !(fname=tempnam(tmpdir.c_str(),"mv."))
00073 #else
00074 mkstemp(fname)==-1
00075 #endif
00076 ) throw exception("Session::mktemp(): cannot make temporary filename");
00077 tmpfile.push_back(fname);
00078 #ifndef WIN32
00079 if(fname){
00080 delete [] fname;
00081 fname=0;
00082 }
00083 #endif
00084 return tmpfile.back();
00085 }
|
|
|
Definition at line 45 of file session.h. References tmpdir, and tmpfile.
|
|
|
|
Definition at line 38 of file session.h. Referenced by matvec::ranf(). |
|
|
Definition at line 39 of file session.h. Referenced by initialize(). |
|
|
|
Definition at line 39 of file session.h. Referenced by initialize(), and matvec::ran1(). |
|
|
Definition at line 52 of file session.h. Referenced by initialize(), mktemp(), operator=(), and Session(). |
|
|
|
|
|
Definition at line 39 of file session.h. Referenced by initialize(), matvec::GLMM::log_likelihood(), matvec::Population::mblup(), matvec::Population::mblup1(), matvec::Model::restricted_log_likelihood(), matvec::GLMM::restricted_log_likelihood(), matvec::Model::vce_emreml_multi_trait(), and matvec::Model::vce_emreml_single_trait(). |
1.2.16