18 using namespace NEWMAT;
41 Tracer et(
"Tenth test of Matrix package");
45 for (i=1;i<=8;i++)
for (j=i;j<=8;j++) U(i,j)=i+j*j+5;
47 for (i=1;i<=8;i++)
for (j=1;j<=6;j++) X(i,j)=i*j+1.0;
52 for (i=1;i<=8;i++)
for (j=i;j<=8;j++) UX(i,j)=i+j+1;
55 { X=UX; MU=U; Y=UY-MU.
i()*X;
Clean(Y,0.000000001);
Print(Y); }
60 { UY=U; UY=D.
i()*UY; Y=UY-X;
Clean(Y,0.00000001);
Print(Y); }
61 { UY=D.
i()*U; Y=UY-X;
Clean(Y,0.00000001);
Print(Y); }
67 for (i=1;i<=8;i++)
for (j=i;j<=8;j++) U(i,j)=i+j*j+5;
75 X1(1)=1; X1(2)=2; X1(3)=3; X1(4)=4;
76 X2(1)=1; X2(2)=10; X2(3)=100; X2(4)=1000;
80 A(1,1)=1; A(1,2)=3; A(1,3)=0; A(1,4)=0;
81 A(2,1)=3; A(2,2)=2; A(2,3)=5; A(2,4)=0;
82 A(3,1)=0; A(3,2)=5; A(3,3)=4; A(3,4)=1;
83 A(4,1)=0; A(4,2)=0; A(4,3)=1; A(4,4)=3;
90 U(1,1)=1; U(1,2)=2; U(1,3)=3; U(1,4)=4;
91 U(2,2)=8; U(2,3)=7; U(2,4)=6;
98 U1.
Row(1) << 1 << 2 << 3 << 4;
99 U1.
Row(2) << 8 << 7 << 6;
116 M << 8.613057e+00 << 8.693985e+00 << -2.322050e-01 << 0.000000e+00
117 << 8.693985e+00 << 8.793868e+00 << -2.346310e-01 << 0.000000e+00
118 << -2.322050e-01 << -2.346310e-01 << 6.264000e-03 << 0.000000e+00
119 << 0.000000e+00 << 0.000000e+00 << 0.000000e+00 << 3.282806e+03 ;
127 MI = LT.
t() * LT; Diff = MI * M - I;
void Inject(const GeneralMatrix &GM)
void Clean(Matrix &A, Real c)
GetSubMatrix Column(int f) const
TransposedMatrix t() const
static void process(const GeneralMatrix &A, const ColumnVector &X1, const ColumnVector &X2)
The usual rectangular matrix.
ReturnMatrix Cholesky(const SymmetricMatrix &S)
GetSubMatrix Row(int f) const
void Print(const Matrix &X)
The classes for matrices that can contain data are derived from this.