freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freepooma-devel] A question about code for computation of Tensor determ


From: ali rostai
Subject: [Freepooma-devel] A question about code for computation of Tensor determinant
Date: Tue, 26 Jan 2010 10:26:44 +0330

Hi,

In file "Tiny/TensorOperators.h" the following code has
been used for computation of Tensor determinant.
-------------------------------------------------
// Partial specializations for D={1,2,3}
template<class T, class E>
inline T
det(const Tensor<3,T,E>& t)
{
  T result;
  result =
    t(0,0)*(t(1,1)*t(2,2) - t(1,2)*t(2,1)) +
    t(0,1)*(t(1,2)*t(2,0) - t(1,0)*t(2,2)) +
    t(0,2)*(t(1,0)*t(2,1) - t(1,1)*t(2,0));
  return result;
}
---------------------------------------------------
as I know the t(0,0) is a runtime call,
why  the member function template "getIJ()" has not been
used? I mean a code like this
t.getIJ<0,0>()

Regards
Ali Roustaei


reply via email to

[Prev in Thread] Current Thread [Next in Thread]