toon-members
[Top][All Lists]

## [Toon-members] TooN/regressions complex.cc complex.txt

 From: Edward Rosten Subject: [Toon-members] TooN/regressions complex.cc complex.txt Date: Wed, 10 Feb 2010 15:24:18 +0000

```CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Edward Rosten <edrosten>        10/02/10 15:24:18

Modified files:
regressions    : complex.cc complex.txt

Log message:
Fixed/updated regression test for complex.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/regressions/complex.cc?cvsroot=toon&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/TooN/regressions/complex.txt?cvsroot=toon&r1=1.1&r2=1.2

Patches:
Index: complex.cc
===================================================================
RCS file: /cvsroot/toon/TooN/regressions/complex.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- complex.cc  1 Feb 2010 19:35:17 -0000       1.1
+++ complex.cc  10 Feb 2010 15:24:18 -0000      1.2
@@ -1,5 +1,5 @@
#include <complex>
-#include "regressions/regression.h"
+#include "TooN/regressions/regression.h"
#include <TooN/internal/planar_complex.hh>

int main()
@@ -34,4 +34,21 @@

cout << vec << endl;

+
+       // Matrix tests
+       Matrix<4,4,complex<double> > A;
+       A[0] = makeVector<complex<double> >(1.+i, 1.+6.*i, 3, 1.-i);
+       A[1] = makeVector<complex<double> >(3.+6.i, 9.+2.*i, 4, 6.-1.*i);
+       A[2] = makeVector<complex<double> >(1.+8.i, 2.*i, 2.-1.*i, 4.-1.*i);
+       A[3] = makeVector<complex<double> >(2.+1.*i, 1.+3.*i, 1, 12.-5.*i);
+
+       cout << A;
+       cout << A * vec<<endl;
+       cout << A.T() ;
+       cout << A * A ;
+
+       Vector<Dynamic, complex<double> > v3 = makeVector(1, 2, 3);
+       cout << v3 << endl;
+       cout << v3.size() << endl;
+
}

Index: complex.txt
===================================================================
RCS file: /cvsroot/toon/TooN/regressions/complex.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- complex.txt 1 Feb 2010 19:35:17 -0000       1.1
+++ complex.txt 10 Feb 2010 15:24:18 -0000      1.2
@@ -7,3 +7,23 @@
(2,6) (3,7) (4,8)
(3,7) (4,8)
(1,5) (2,6) (3,7) (28,10)
+
+(1,1) (1,6) (3,0) (1,-1)
+(3,6) (9,2) (4,0) (6,-1)
+(1,8) (0,2) (2,-1) (4,-1)
+(2,1) (1,3) (1,0) (12,-5)
+
+(9,27) (169,139) (84,40) (370,10)
+
+(1,1) (3,6) (1,8) (2,1)
+(1,6) (9,2) (0,2) (1,3)
+(3,-0) (4,-0) (2,-1) (1,-0)
+(1,-1) (6,-1) (4,-1) (12,-5)
+
+(-27,49) (-4,71) (14,23) (33,15)
+(29,105) (53,85) (59,21) (148,-40)
+(0,32) (-42,47) (10,27) (61,-19)
+(16,28) (26,75) (24,9) (135,-105)
+
+(1,0) (2,0) (3,0)
+3

```

reply via email to