Added some comments about setting the matrix size at runtime.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402548
This commit is contained in:
Davis King 2008-10-08 23:42:24 +00:00
parent d8ddd8db3f
commit 41c9c2a202
3 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,8 @@ double sinc(double x)
int main() int main()
{ {
// Here we declare that our samples will be 2 dimensional column vectors. // Here we declare that our samples will be 2 dimensional column vectors.
// (Note that if you don't know the dimensionality of your vectors at compile time
// you can change the 2 to a 0 and then set the size at runtime)
typedef matrix<double,2,1> sample_type; typedef matrix<double,2,1> sample_type;
// Now we are making a typedef for the kind of kernel we want to use. I picked the // Now we are making a typedef for the kind of kernel we want to use. I picked the

View File

@ -30,6 +30,8 @@ using namespace dlib;
int main() int main()
{ {
// Here we declare that our samples will be 2 dimensional column vectors. // Here we declare that our samples will be 2 dimensional column vectors.
// (Note that if you don't know the dimensionality of your vectors at compile time
// you can change the 2 to a 0 and then set the size at runtime)
typedef matrix<double,2,1> sample_type; typedef matrix<double,2,1> sample_type;
// Now we are making a typedef for the kind of kernel we want to use. I picked the // Now we are making a typedef for the kind of kernel we want to use. I picked the

View File

@ -29,6 +29,8 @@ int main()
// Here we declare that our samples will be 1 dimensional column vectors. The reason for // Here we declare that our samples will be 1 dimensional column vectors. The reason for
// using a matrix here is that in general you can use N dimensional vectors as inputs to the // using a matrix here is that in general you can use N dimensional vectors as inputs to the
// krls object. But here we only have 1 dimension to make the example simple. // krls object. But here we only have 1 dimension to make the example simple.
// (Note that if you don't know the dimensionality of your vectors at compile time
// you can change the first number to a 0 and then set the size at runtime)
typedef matrix<double,1,1> sample_type; typedef matrix<double,1,1> sample_type;
// Now we are making a typedef for the kind of kernel we want to use. I picked the // Now we are making a typedef for the kind of kernel we want to use. I picked the