TMatixDは行列を扱う
{
gROOT->Reset();
TMatrixD m(3,3);
m[0][0] = 1.0;
m[0][1] = 2.0;
m[0][2] = 3.0;
m[1][0] = 4.0;
m[1][1] = 8.0;
m[1][2] = 6.0;
m[2][0] = 7.0;
m[2][1] = 8.0;
m[2][2] = 9.0;
Double_t det;
m.Invert(&det);
m.Print();
}
gROOT->Reset();
TMatrixD m(3,3);
m[0][0] = 1.0;
m[0][1] = 2.0;
m[0][2] = 3.0;
m[1][0] = 4.0;
m[1][1] = 8.0;
m[1][2] = 6.0;
m[2][0] = 7.0;
m[2][1] = 8.0;
m[2][2] = 9.0;
Double_t det;
m.Invert(&det);
m.Print();
}
0 Comments:
コメントを投稿
<< Home