Commit 0e02ea50 authored by Davis King's avatar Davis King

Added some missing comments and asserts.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402854
parent ea575d03
...@@ -1515,6 +1515,10 @@ convergence: ...@@ -1515,6 +1515,10 @@ convergence:
const matrix_exp<EXP>& m const matrix_exp<EXP>& m
) )
{ {
// You can only use this function with matrices that contain float or double values
COMPILE_TIME_ASSERT((is_same_type<typename EXP::type, float>::value ||
is_same_type<typename EXP::type, double>::value));
DLIB_ASSERT(m.nr() == m.nc(), DLIB_ASSERT(m.nr() == m.nc(),
"\tconst matrix real_eigenvalues()" "\tconst matrix real_eigenvalues()"
<< "\n\tYou have given an invalidly sized matrix" << "\n\tYou have given an invalidly sized matrix"
......
...@@ -132,6 +132,7 @@ namespace dlib ...@@ -132,6 +132,7 @@ namespace dlib
/*! /*!
requires requires
- m.nr() == m.nc() - m.nr() == m.nc()
- matrix_exp::type == float or double
ensures ensures
- returns a matrix E such that: - returns a matrix E such that:
- E.nr() == m.nr() - E.nr() == m.nr()
...@@ -216,6 +217,7 @@ namespace dlib ...@@ -216,6 +217,7 @@ namespace dlib
REQUIREMENTS ON matrix_exp_type REQUIREMENTS ON matrix_exp_type
must be some kind of matrix expression as defined in the must be some kind of matrix expression as defined in the
dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object) dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object)
The matrix type must also contain float or double values.
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents something that can compute an LU This object represents something that can compute an LU
...@@ -361,6 +363,7 @@ namespace dlib ...@@ -361,6 +363,7 @@ namespace dlib
REQUIREMENTS ON matrix_exp_type REQUIREMENTS ON matrix_exp_type
must be some kind of matrix expression as defined in the must be some kind of matrix expression as defined in the
dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object) dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object)
The matrix type must also contain float or double values.
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents something that can compute a cholesky This object represents something that can compute a cholesky
...@@ -453,6 +456,7 @@ namespace dlib ...@@ -453,6 +456,7 @@ namespace dlib
REQUIREMENTS ON matrix_exp_type REQUIREMENTS ON matrix_exp_type
must be some kind of matrix expression as defined in the must be some kind of matrix expression as defined in the
dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object) dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object)
The matrix type must also contain float or double values.
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents something that can compute a classical This object represents something that can compute a classical
...@@ -589,6 +593,7 @@ namespace dlib ...@@ -589,6 +593,7 @@ namespace dlib
REQUIREMENTS ON matrix_exp_type REQUIREMENTS ON matrix_exp_type
must be some kind of matrix expression as defined in the must be some kind of matrix expression as defined in the
dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object) dlib/matrix/matrix_abstract.h file. (e.g. a dlib::matrix object)
The matrix type must also contain float or double values.
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents something that can compute an eigenvalue This object represents something that can compute an eigenvalue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment