Changeset 896 for library/bdm/estim/arx.cpp
- Timestamp:
- 04/09/10 09:31:37 (14 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/arx.cpp
r883 r896 148 148 @param Eg0 a copy of prior GiW density before estimation 149 149 @param Egll likelihood of the current Eg 150 @param ind eces current indeces150 @param indices current indices 151 151 \return best likelihood in the structure below the given one 152 152 */ 153 double egiw_bestbelow ( egiw Eg, egiw Eg0, double Egll, ivec &ind eces ) { //parameter Eg is a copy!153 double egiw_bestbelow ( egiw Eg, egiw Eg0, double Egll, ivec &indices ) { //parameter Eg is a copy! 154 154 ldmat Vo = Eg._V(); //copy 155 155 ldmat Vo0 = Eg._V(); //copy … … 164 164 double belll = Egll; 165 165 166 ivec tmpind eces;167 ivec maxind eces = indeces;168 169 170 cout << "bb:(" << ind eces << ") ll=" << Egll << endl;166 ivec tmpindices; 167 ivec maxindices = indices; 168 169 170 cout << "bb:(" << indices << ") ll=" << Egll << endl; 171 171 172 172 //try to remove only one rv … … 186 186 // 187 187 if ( tmpll > Egll ) { //increase of the likelihood 188 tmpind eces = indeces;189 tmpind eces.del ( i );188 tmpindices = indices; 189 tmpindices.del ( i ); 190 190 //search for a better match in this substructure 191 belll = egiw_bestbelow ( Eg, Eg0, tmpll, tmpind eces );191 belll = egiw_bestbelow ( Eg, Eg0, tmpll, tmpindices ); 192 192 if ( belll > maxll ) { //better match found 193 193 maxll = belll; 194 maxind eces = tmpindeces;194 maxindices = tmpindices; 195 195 } 196 196 } 197 197 } 198 ind eces = maxindeces;198 indices = maxindices; 199 199 return maxll; 200 200 }