Changeset 620 for library/bdm/stat/exp_family.h
- Timestamp:
- 09/16/09 14:47:36 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/stat/exp_family.h
r613 r620 136 136 void from_setting (const Setting &root); 137 137 void validate() { 138 bdm_assert _debug (mu.length() == R.rows(), "parameters mismatch");138 bdm_assert (mu.length() == R.rows(), "mu and R parameters do not match"); 139 139 dim = mu.length(); 140 140 } … … 416 416 } 417 417 void validate() { 418 bdm_assert _debug(alpha.length() == beta.length(), "parameters do not match");418 bdm_assert (alpha.length() == beta.length(), "parameters do not match"); 419 419 dim = alpha.length(); 420 420 } … … 530 530 bdm_assert(high.length()==low.length(), "Incompatible high and low vectors"); 531 531 dim = high.length(); 532 bdm_assert _debug(min (distance) > 0.0, "bad support");532 bdm_assert (min (distance) > 0.0, "bad support"); 533 533 } 534 534 }; … … 558 558 559 559 //! Set \c A and \c R 560 void set_parameters (const mat &A0, const vec &mu0, const sq_T &R0) { 561 bdm_assert_debug (A0.rows() == mu0.length(), "mlnorm: A vs. mu mismatch"); 562 bdm_assert_debug (A0.rows() == R0.rows(), "mlnorm: A vs. R mismatch"); 563 560 void set_parameters (const mat &A0, const vec &mu0, const sq_T &R0) { 564 561 this->iepdf.set_parameters (zeros (A0.rows()), R0); 565 562 A = A0; … … 593 590 UI::get (R0, set, "R", UI::compulsory); 594 591 set_parameters (A, mu_const, R0); 592 validate(); 595 593 }; 594 void validate() { 595 bdm_assert (A.rows() == mu_const.length(), "mlnorm: A vs. mu mismatch"); 596 bdm_assert (A.rows() == _R().rows(), "mlnorm: A vs. R mismatch"); 597 598 } 596 599 }; 597 600 UIREGISTER2 (mlnorm,ldmat); … … 704 707 705 708 void validate() { 706 bdm_assert _debug(A.rows() == mu_const.length(), "mlstudent: A vs. mu mismatch");707 bdm_assert _debug(_R.rows() == A.rows(), "mlstudent: A vs. R mismatch");709 bdm_assert (A.rows() == mu_const.length(), "mlstudent: A vs. mu mismatch"); 710 bdm_assert (_R.rows() == A.rows(), "mlstudent: A vs. R mismatch"); 708 711 709 712 } … … 1156 1159 //! Set samples 1157 1160 void set_parameters (const Array<vec> &Av) { 1158 bdm_assert _debug(Av.size()>0,"Empty samples");1161 bdm_assert(Av.size()>0,"Empty samples"); 1159 1162 n = Av.size(); 1160 1163 epdf::set_parameters(Av(0).length()); … … 1322 1325 void enorm<sq_T>::marginal ( const RV &rvn, enorm<sq_T> &target ) const 1323 1326 { 1324 bdm_assert _debug(isnamed(), "rv description is not assigned");1327 bdm_assert (isnamed(), "rv description is not assigned"); 1325 1328 ivec irvn = rvn.dataind (rv); 1326 1329 … … 1345 1348 typedef mlnorm<sq_T> TMlnorm; 1346 1349 1347 bdm_assert _debug(isnamed(), "rvs are not assigned");1350 bdm_assert (isnamed(), "rvs are not assigned"); 1348 1351 TMlnorm &uptarget = dynamic_cast<TMlnorm &>(target); 1349 1352 1350 1353 RV rvc = rv.subt (rvn); 1351 bdm_assert _debug( (rvc._dsize() + rvn._dsize() == rv._dsize()), "wrong rvn");1354 bdm_assert ( (rvc._dsize() + rvn._dsize() == rv._dsize()), "wrong rvn"); 1352 1355 //Permutation vector of the new R 1353 1356 ivec irvn = rvn.dataind (rv);