LINEAR++ library: AFF to LAPACK

◆ transposeNxM()

TDmatrix linear::op::transposeNxM ( const TDmatrix::Tcoc &  A)

calculate transpose of NxM matrix.

Definition at line 44 of file transpose.cc.

References checkNxM().

Referenced by main(), and test().

45  {
46  const int dim1=0;
47  const int dim2=1;
48  checkNxM(A);
49  TDmatrix C(aff::Shaper(A.f(dim2),A.l(dim2))(A.f(dim1),A.l(dim1)));
50  for (int i=C.f(dim1); i<= C.l(dim1); ++i)
51  {
52  for (int j=C.f(dim2); j<= C.l(dim2); ++j)
53  {
54  C(i,j)=A(j,i);
55  }
56  }
57  return(C);
58  }
aff::Array< double > TDmatrix
Definition: matrix.h:46
void checkNxM(const TDmatrix::Tcoc &A)
check expected libaff array shape for NxM matrix.
Definition: checknxn.cc:44
Here is the call graph for this function:
Here is the caller graph for this function: