34 static const double HMatrixContent[2*5] = {0, 0, 0, 1, 0,
37 static const TMatrixD HMatrix(2,5, HMatrixContent);
44 assert (v.GetNrows() == 5);
46 double* retValArray =(
double *)alloca(
sizeof(
double) * 2);
47 const double* VecArray = v.GetMatrixArray();
49 retValArray[0] = VecArray[3];
50 retValArray[1] = VecArray[4];
52 return TVectorD(2, retValArray);
57 assert (M.GetNcols() == 5);
59 double* retValArray =(
double *)alloca(
sizeof(
double) * 5*2);
60 const double* MatArray = M.GetMatrixArray();
62 for (
unsigned int i=0; i<5; ++i) {
63 retValArray[i*2] = MatArray[i*5 + 3];
64 retValArray[i*2 + 1] = MatArray[i*5 + 4];
67 return TMatrixD(5,2, retValArray);
72 assert (M.GetNcols() == 5);
74 double* retValArray =(
double *)alloca(
sizeof(
double) * M.GetNrows()*2);
75 const double* MatArray = M.GetMatrixArray();
77 for (
int i = 0; i < M.GetNrows(); ++i) {
78 retValArray[i*2] = MatArray[i*5 + 3];
79 retValArray[i*2 + 1] = MatArray[i*5 + 4];
82 return TMatrixD(M.GetNrows(),2, retValArray);
87 assert (M.GetNrows() == 5);
88 double* MatArray = M.GetMatrixArray();
94 double uu = MatArray[3*5 + 3];
95 double uv = MatArray[3*5 + 4];
96 double vv = MatArray[4*5 + 4];
99 MatArray = M.GetMatrixArray();
100 MatArray[0] = uu; MatArray[1] = uv;
101 MatArray[2] = uv; MatArray[3] = vv;