#include <termlist.h>
Definition at line 39 of file termlist.h.
Public Methods | |
| ModelTerm (void) | |
| ModelTerm (const ModelTerm &A) | |
| ~ModelTerm (void) | |
| const ModelTerm & | operator= (const ModelTerm &A) |
| int | partial_match (const std::string &effectname, FieldStruct *FS) |
| int | match (const std::string &termname, const std::string &sep, FieldStruct *FS) |
| void | copyfrom (const ModelTerm &A) |
| void | resize (const unsigned ne, const unsigned nt) |
| void | input (const std::string &str, FieldStruct *FS, const unsigned nf) |
| void | classi (const char c) |
| char | classi (void) const |
| unsigned | order (void) const |
| unsigned | ntrait (void) const |
| unsigned | size (void) const |
| unsigned | nlevel (void) const |
| unsigned | startaddr (void) const |
| void | variance (const doubleMatrix &A) |
| void | release (void) |
Public Attributes | |
| unsigned | numfact |
| unsigned | start |
| unsigned | numtrait |
| unsigned | numlevel |
| unsigned | base_effect |
| unsigned | corr_link |
| unsigned | pos_vec |
| Vector< int > | trait_map |
| unsigned | nt_vec |
| char | myclassi |
| Vector< int > | trait |
| Vector< int > | factorindx |
| Vector< unsigned > | addr |
| GeneticDist * | prior |
Friends | |
| class | TermList |
| class | Model |
| class | GLMM |
|
|
Definition at line 32 of file termlist.cpp. References addr, myclassi, numfact, numlevel, numtrait, prior, and start.
|
|
|
Definition at line 43 of file termlist.cpp. References addr, copyfrom(), myclassi, numfact, numlevel, numtrait, prior, and start.
|
|
|
Definition at line 69 of file termlist.h. References release().
00069 {release();}
|
|
|
Definition at line 78 of file termlist.h. References myclassi.
00078 {return myclassi;}
|
|
|
Definition at line 77 of file termlist.h. References myclassi. Referenced by matvec::GLMM::getVarEstimates(), matvec::Model::info(), and matvec::GLMM::info().
00077 {myclassi = c;}
|
|
|
Definition at line 61 of file termlist.cpp. References addr, base_effect, corr_link, factorindx, myclassi, nt_vec, numfact, numlevel, numtrait, pos_vec, prior, resize(), start, trait, and trait_map. Referenced by matvec::TermList::copyfrom(), ModelTerm(), and operator=().
00062 {
00063 if (this == &A) return;
00064 resize(A.numfact,A.numtrait);
00065 base_effect = A.base_effect;
00066 pos_vec = A.pos_vec;
00067 nt_vec = A.nt_vec;
00068 corr_link = A.corr_link;
00069 trait_map = A.trait_map;
00070 start = A.start;
00071 numlevel = A.numlevel;
00072 myclassi = A.myclassi;
00073 prior = A.prior;
00074 addr = A.addr;
00075 trait = A.trait;
00076 factorindx = A.factorindx;
00077 }
|
|
||||||||||||||||
|
Definition at line 137 of file termlist.cpp. References factorindx, matvec::fieldindex(), numtrait, and resize().
00138 {
00139 int k;
00140 std::string T(str),sep("* ");
00141 std::string::size_type begidx,endidx;
00142 std::vector<std::string> eff_name;
00143 /////////// T.split(ne,"* ");
00144 begidx = T.find_first_not_of(sep);
00145 while(begidx != std::string::npos) {
00146 endidx = T.find_first_of(sep,begidx);
00147 if (endidx == std::string::npos) endidx = T.length();
00148 eff_name.push_back(T.substr(begidx,endidx - begidx));
00149 begidx = T.find_first_not_of(sep,endidx);
00150 }
00151 unsigned ne = eff_name.size();
00152 resize(ne,numtrait);
00153 for (unsigned i=0; i<ne; i++) {
00154 k = fieldindex(eff_name[i],FS,nf); // it cannot found
00155 factorindx[i] = k;
00156 }
00157 }
|
|
||||||||||||||||
|
Definition at line 104 of file termlist.cpp. References factorindx, and numfact. Referenced by matvec::TermList::index().
00105 {
00106 std::string s(termname);
00107 std::string::size_type begidx,endidx;
00108 std::vector<std::string> tmpstr;
00109 ///// s.split(n,sep);
00110 begidx = s.find_first_not_of(sep);
00111 while(begidx != std::string::npos) {
00112 endidx = s.find_first_of(sep,begidx);
00113 if (endidx == std::string::npos) endidx = s.length();
00114 tmpstr.push_back(s.substr(begidx,endidx - begidx));
00115 begidx = s.find_first_not_of(sep,endidx);
00116 }
00117 unsigned n = tmpstr.size();
00118 if (numfact != n) return 0;
00119 int i,j, k=1;
00120 for (i=0; i<numfact; i++) {
00121 for (j=0; j<numfact; j++) if (tmpstr[i] == FS[factorindx[j]].name()) break;
00122 if (j == numfact) { k=0; break;}
00123 }
00124 return k;
00125 }
|
|
|
Definition at line 82 of file termlist.h. References numlevel.
00082 {return numlevel;}
|
|
|
Definition at line 80 of file termlist.h. References numtrait.
00080 {return numtrait;}
|
|
|
Definition at line 55 of file termlist.cpp. References copyfrom().
00056 {
00057 if (this != &A) copyfrom(A);
00058 return *this;
00059 }
|
|
|
Definition at line 79 of file termlist.h. References numfact. Referenced by matvec::TermList::maxorder(), and matvec::Model::prepare_data().
00079 {return numfact;}
|
|
||||||||||||
|
Definition at line 127 of file termlist.cpp. References factorindx, and numfact.
00128 {
00129 int i,k=-1;
00130 for (i=0; i<numfact; i++) {
00131 if (effectname == FS[factorindx[i]].name()) break;
00132 }
00133 if (i < numfact) k = i;
00134 return k;
00135 }
|
|
|
Definition at line 99 of file termlist.cpp. References numfact, and numtrait. Referenced by ~ModelTerm().
|
|
||||||||||||
|
Definition at line 79 of file termlist.cpp. References addr, factorindx, numfact, numtrait, matvec::Vector< int >::reserve(), matvec::Vector< unsigned >::resize(), matvec::Vector< int >::resize(), and trait. Referenced by copyfrom(), input(), and matvec::TermList::resize().
|
|
|
Definition at line 81 of file termlist.h. References numfact.
00081 {return numfact;}
|
|
|
Definition at line 83 of file termlist.h. References start.
00083 {return start;}
|
|
|
Definition at line 93 of file termlist.cpp. References prior, and matvec::GeneticDist::var_matrix().
00094 {
00095 doubleMatrix *var = prior->var_matrix();
00096 *var = A;
00097 }
|
|
|
Definition at line 42 of file termlist.h. |
|
|
Definition at line 41 of file termlist.h. |
|
|
Definition at line 40 of file termlist.h. |
|
|
Definition at line 64 of file termlist.h. |
|
|
Definition at line 46 of file termlist.h. Referenced by copyfrom(). |
|
|
Definition at line 49 of file termlist.h. Referenced by copyfrom(). |
|
|
Definition at line 63 of file termlist.h. Referenced by copyfrom(), matvec::Model::info(), matvec::GLMM::info(), input(), match(), partial_match(), matvec::Model::prepare_data(), and resize(). |
|
|
Definition at line 62 of file termlist.h. |
|
|
Definition at line 58 of file termlist.h. Referenced by copyfrom(). |
|
|
Definition at line 44 of file termlist.h. Referenced by copyfrom(), match(), ModelTerm(), order(), partial_match(), release(), resize(), and size(). |
|
|
Definition at line 44 of file termlist.h. |
|
|
Definition at line 44 of file termlist.h. Referenced by copyfrom(), input(), ModelTerm(), ntrait(), release(), and resize(). |
|
|
Definition at line 52 of file termlist.h. Referenced by copyfrom(). |
|
|
Definition at line 66 of file termlist.h. Referenced by copyfrom(), matvec::Model::copyfrom(), matvec::GLMM::getVarEstimates(), matvec::Model::info(), matvec::GLMM::info(), ModelTerm(), and variance(). |
|
|
Definition at line 44 of file termlist.h. |
|
|
Definition at line 63 of file termlist.h. |
|
|
Definition at line 55 of file termlist.h. Referenced by copyfrom(). |
1.2.16