Exemplo n.º 1
0
	inline void check_PSD (Bayes_base::Float rcond, const char* error_description) const
	/* Checks a the reciprocal condition number
	 * Generates a Bayes_filter_exception if value represents a NON PSD matrix
	 * Inverting condition provides a test for IEC 559 NaN values
	 */
	{	if (!(rcond >= 0))
			Bayes_base::error (Numeric_exception (error_description));
	}
Exemplo n.º 2
0
	void init_GqG() const
	/* initialise predict given a change to q,G
	 *  Implementation: Update rootq
	 */
	{
		first_init = false;
		for (FM::Vec::const_iterator qi = this->q.begin(); qi != this->q.end(); ++qi) {
			if (*qi < 0)
				error (Numeric_exception("Negative q in init_GqG"));
			rootq[qi.index()] = std::sqrt(*qi);
		}
	}