Skip to content
Snippets Groups Projects
Commit 57f4af36 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Update margins for feature Node domain checks

get spurious errors with 1e-15
parent d64131d2
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ FeatureNode::FeatureNode(int feat_ind, std::string expr, std::vector<double> val
_domain(domain),
_expr(expr)
{
if((*std::max_element(value.begin(), value.end()) - 1e-15 > _domain) || (*std::min_element(value.begin(), value.end()) + 1e-15 < _domain))
if((*std::max_element(value.begin(), value.end()) > _domain + 1e-5) || (*std::min_element(value.begin(), value.end()) < _domain - 1e-5))
{
std::cout << (*std::max_element(value.begin(), value.end())) << '\t' << (*std::min_element(value.begin(), value.end())) << std::endl;
throw std::logic_error("The feature " + expr + " has values outside of the domain of " + _domain.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment