Commit Graph

517 Commits

Author SHA1 Message Date
Davis King
0920c8f8d7 Reorganized the matrix_assign code a little and also added in
some stuff to allow me to bind whatever expressions I feel like
to optimized BLAS libraries.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402752
2008-12-23 20:38:25 +00:00
Davis King
7baab9fa30 updated the docs
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402751
2008-12-23 16:37:14 +00:00
Davis King
533b5beb8f Moved the matrix subexpression stuff into its own file.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402750
2008-12-23 16:10:14 +00:00
Davis King
9d42e9fae1 updated the matrix example program.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402749
2008-12-23 15:39:37 +00:00
Davis King
eb471442fb Added a column_major_layout for the matrix.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402748
2008-12-23 15:10:27 +00:00
Davis King
55f1fccaef updated spec
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402747
2008-12-23 12:57:15 +00:00
Davis King
a5871cdc69 More code cleanup.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402746
2008-12-22 17:56:50 +00:00
Davis King
659aef23d2 More code cleanup.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402745
2008-12-22 16:35:31 +00:00
Davis King
583866281c General cleanup (also added all the needed typedefs for layout_type).
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402744
2008-12-22 14:19:43 +00:00
Davis King
3335021349 updated the docs
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402743
2008-12-20 19:54:20 +00:00
Davis King
ded490dc9d Optimized the matrix multiply a little more.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402742
2008-12-19 21:54:52 +00:00
Davis King
7b53a1cb3f Updated the assign_matrix stuff so that it works again.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402741
2008-12-19 19:32:15 +00:00
Davis King
4f6f436e2a Switched the gui stuff over to the new 2D dlib::vector object.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402740
2008-12-19 18:51:06 +00:00
Davis King
7ae1d3a3e2 Clarified the vector spec and added some more tests.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402739
2008-12-19 18:26:31 +00:00
Davis King
77e5542373 Fixed compile error in gcc
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402738
2008-12-19 16:41:11 +00:00
Davis King
1f8cd9c371 Added a bunch of voodoo to appease the bugs in visual studio. Also added
promotions to the global operator* overloads for the vector.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402737
2008-12-19 16:29:59 +00:00
Davis King
5348ed7f95 - Made the vector class inherit from matrix
- Added code to make sure the vector class does the
    appropriate type promotion when vector objects
    with different types are used together.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402736
2008-12-19 15:31:49 +00:00
Davis King
8c9d6c128c Adding Steven Van Ingelgem's cmake patch to clean things up and add
shared builds.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402735
2008-12-19 13:05:39 +00:00
Davis King
818086a433 Added more constructors to the matrix expression objects so that various potential
errors are avoided entirely.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402734
2008-12-19 03:39:59 +00:00
Davis King
64b859d03e Added something to suppress warnings from visual studio.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402733
2008-12-19 02:55:25 +00:00
Davis King
dd08cc4fb2 Refactored a bunch of the matrix code into a cleaner form. I also added a
cost member to all the matrix expressions so that the complexity of an
expression can be measured and temporaries introduced when appropriate.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402732
2008-12-19 01:01:52 +00:00
Davis King
14121d9588 Added the is_convertible template.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402731
2008-12-19 00:39:24 +00:00
Davis King
098a1ce990 Added copy and paste support to the text_field and also cleaned up some
of the popup_menu stuff.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402730
2008-12-16 02:41:30 +00:00
Davis King
ce6e08e3f4 updated makefile
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402729
2008-12-15 02:14:04 +00:00
Davis King
1ab4152618 Changed the vector code so that it compiles in cygwin and visual studio.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402728
2008-12-15 01:53:28 +00:00
Davis King
aec7c84790 Cleaned up the vector and point classes. Now there is only one class, the vector,
class and it is capable of representing everything the old vector and point
class could.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402727
2008-12-14 21:18:29 +00:00
Davis King
3fc0a290c7 Made the matrix rounding functions a little more general. They
are now able to be called on integral types and just do nothing
in that case.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402726
2008-12-13 03:28:05 +00:00
Davis King
22770e2937 Fixed typo in a comment.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402725
2008-12-12 20:04:14 +00:00
Davis King
f672e45459 Cleaned up the PCA code slightly.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402724
2008-12-12 00:31:47 +00:00
Davis King
279e4d40f2 Added more stuff to the example.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402723
2008-12-12 00:16:25 +00:00
Davis King
0f89c0f601 - Changed the range() stuff so that it works with ranges of the form
range(1,5) as well as range(5,1)
  - Added overloads of colm(), rowm(), set_colm(), and set_rowm() that
    can work with ranges.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402722
2008-12-12 00:06:34 +00:00
Davis King
53ea098dc9 Cleaned up the matrix_assign() stuff a little more. Also added some stuff
particular to gcc to control how things get inlined.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402721
2008-12-11 04:18:37 +00:00
Davis King
dd83589a4c - Moved the matrix_assign() totally into the matrix_assign.h file
- Updated matrix regression tests.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402720
2008-12-11 03:30:46 +00:00
Davis King
c4512e6809 Updated the diag() spec.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402719
2008-12-11 03:15:43 +00:00
Davis King
f2f4e57497 Updated the matrix example.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402718
2008-12-11 03:13:46 +00:00
Davis King
1d2ecc9d4b Changed the comma based matrix assignment to use operator= instead
of operator<<.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402717
2008-12-11 03:13:19 +00:00
Davis King
4c0d826baa Split the matrix tests into two files to speed up compilation of the regression tests.
--HG--
rename : dlib/test/matrix.cpp => dlib/test/matrix2.cpp
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402716
2008-12-09 03:09:17 +00:00
Davis King
1797da9aed Fixed compiler warning
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402715
2008-12-09 03:03:46 +00:00
Davis King
acb0cae086 Updated the matrix example to use operator<< for matrix initialization.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402714
2008-12-09 02:54:49 +00:00
Davis King
3ad81a5a64 Added a more convenient way to initialize a matrix using the operator<<.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402713
2008-12-09 02:54:14 +00:00
Davis King
a9a073aae0 Added another matrix test.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402712
2008-12-08 01:43:10 +00:00
Davis King
b556ebf587 Simplified the matrix_assign() function a bit.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402711
2008-12-08 01:42:49 +00:00
Davis King
13f0b4338a Fixed typo in spec
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402710
2008-12-08 01:31:46 +00:00
Davis King
30dbb5d796 Added some code to cause the user to get a compiler error if they accidentally
try to combine a quantum gate with an integer.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402709
2008-12-06 21:53:05 +00:00
Davis King
36e7c35875 Fixed a bug in the apply_gate_to() function. Also clarified the spec.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402708
2008-12-06 21:27:39 +00:00
Davis King
3aef484e8a Changed code so that it compiles in gcc 4.3
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402707
2008-12-06 00:46:52 +00:00
Davis King
a1d0f3e4a5 Changed the code slightly to avoid warnings from gcc 4.3.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402706
2008-12-05 23:11:06 +00:00
Davis King
e0fac30c52 Fixed ohloh badge
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402705
2008-12-05 23:01:22 +00:00
Davis King
d55f589e6c Changed the matrix so that it isn't forced to use the one matrix_data object. Now
it has a template argument that lets you supply any kind of matrix layout object
you want.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402704
2008-12-05 03:09:22 +00:00
Davis King
dc85ffd1cc Changed the code to avoid a compiler warning from the Intel compiler.
--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402703
2008-12-04 22:12:09 +00:00