Slightly improved messages from some asserts.

This commit is contained in:
Davis King 2012-05-06 10:09:59 -04:00
parent b0e4bcb69e
commit 2c45ab5e91
2 changed files with 5 additions and 1 deletions

View File

@ -135,6 +135,7 @@ namespace dlib
// make sure requires clause is not broken // make sure requires clause is not broken
DLIB_ASSERT(is_graph_labeling_problem(samples, labels), DLIB_ASSERT(is_graph_labeling_problem(samples, labels),
"\t void structural_graph_labeling_trainer::train()" "\t void structural_graph_labeling_trainer::train()"
<< "\n\t Invalid inputs were given to this function."
<< "\n\t samples.size(): " << samples.size() << "\n\t samples.size(): " << samples.size()
<< "\n\t labels.size(): " << labels.size() << "\n\t labels.size(): " << labels.size()
<< "\n\t this: " << this << "\n\t this: " << this

View File

@ -144,7 +144,10 @@ namespace dlib
// make sure requires clause is not broken // make sure requires clause is not broken
DLIB_ASSERT(is_graph_labeling_problem(samples, labels) == true, DLIB_ASSERT(is_graph_labeling_problem(samples, labels) == true,
"\t structural_svm_graph_labeling_problem::structural_svm_graph_labeling_problem()" "\t structural_svm_graph_labeling_problem::structural_svm_graph_labeling_problem()"
<< "\n\t invalid inputs were given to this function"); << "\n\t Invalid inputs were given to this function."
<< "\n\t samples.size(): " << samples.size()
<< "\n\t labels.size(): " << labels.size()
<< "\n\t this: " << this );
// figure out how many dimensions are in the node and edge vectors. // figure out how many dimensions are in the node and edge vectors.