From 4f8a93975f33ed3ac7e9c7f4f8d8d3b1622a0178 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 11 Jan 2014 14:52:28 -0500 Subject: [PATCH] clarified example --- examples/matrix_ex.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/matrix_ex.cpp b/examples/matrix_ex.cpp index c1791b5c9..eefb32b0f 100644 --- a/examples/matrix_ex.cpp +++ b/examples/matrix_ex.cpp @@ -43,19 +43,19 @@ int main() // You may be wondering why someone would want to specify the size of a // matrix at compile time when you don't have to. The reason is two fold. // First, there is often a substantial performance improvement, especially - // for small matrices, because the compiler is able to perform loop - // unrolling if it knows the sizes of matrices. Second, the dlib::matrix - // object checks these compile time sizes to ensure that the matrices are - // being used correctly. For example, if you attempt to compile the - // expression y*y you will get a compiler error since that is not a legal - // matrix operation (the matrix dimensions don't make sense as a matrix - // multiplication). So if you know the size of a matrix at compile time - // then it is always a good idea to let the compiler know about it. + // for small matrices, because it enables a number of optimizations that + // otherwise would be impossible. Second, the dlib::matrix object checks + // these compile time sizes to ensure that the matrices are being used + // correctly. For example, if you attempt to compile the expression y*y you + // will get a compiler error since that is not a legal matrix operation (the + // matrix dimensions don't make sense as a matrix multiplication). So if + // you know the size of a matrix at compile time then it is always a good + // idea to let the compiler know about it. - // now we need to initialize the y and M matrices and we can do so like this: + // Now we need to initialize the y and M matrices and we can do so like this: M = 54.2, 7.4, 12.1, 1, 2, 3, 5.9, 0.05, 1;