[mlpack-git] master: Add some backtracing output to CheckValues(). (a48de05)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:12:17 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit a48de053ac043d92b9e50aeb0c52f4baa500763c
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Jan 13 10:46:45 2015 -0500
Add some backtracing output to CheckValues().
>---------------------------------------------------------------
a48de053ac043d92b9e50aeb0c52f4baa500763c
.../matrix_completion/matrix_completion_impl.hpp | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp b/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp
index 1d8b8fd..12afff6 100644
--- a/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp
+++ b/src/mlpack/methods/matrix_completion/matrix_completion_impl.hpp
@@ -49,22 +49,20 @@ MatrixCompletion::MatrixCompletion(const size_t m,
void MatrixCompletion::CheckValues()
{
if (indices.n_rows != 2)
- Log::Fatal << "matrix of constraint indices does not have 2 rows"
- << std::endl;
+ Log::Fatal << "MatrixCompletion::CheckValues(): matrix of constraint indices does "
+ << "not have 2 rows!" << std::endl;
if (indices.n_cols != values.n_elem)
- Log::Fatal << "the number of constraint indices "
- << "(columns of constraint indices matrix) "
- << "does not match the number of constraint values "
- << "(length of constraint value vector)"
- << std::endl;
+ Log::Fatal << "MatrixCompletion::CheckValues(): the number of constraint indices "
+ << "(columns of constraint indices matrix) does not match the number of "
+ << "constraint values (length of constraint value vector)!" << std::endl;
for (size_t i = 0; i < values.n_elem; i++)
{
if (indices(0, i) >= m || indices(1, i) >= n)
- Log::Fatal << "indices (" << indices(0, i) << ", " << indices(1, i) << ")"
- << " are out of bounds for matrix of size " << m << " x " << "n"
- << std::endl;
+ Log::Fatal << "MatrixCompletion::CheckValues(): indices (" << indices(0, i) << ", "
+ << indices(1, i) << ") are out of bounds for matrix of size " << m << " x "
+ << "n!" << std::endl;
}
}
More information about the mlpack-git
mailing list