Re: [eigen] Re: problem with local nested typedefs |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Hi,
On Thu, 28 Oct 2010 10:20:42 +0100, Patrick Sauer
<pat05.mlst@xxxxxxxxx> wrote:
Hi,
I am trying to access the triangularView method of an Eigen3 matrix
using the following code:
template< class Derived >
void get_view_local_td( MatrixBase& in )
{
typedef typename MatrixBase::Scalar Float;
typedef Matrix MatrixType;
MatrixType& ref = static_cast( in );
ref.triangularView();
}
Hi,
Someone more knowledgeable than me should correct me if I'm wrong
(and forgive my noobishness ☺ ), but I think that the proper way would
be
typedef typename internal::traits<Derived>::Scalar Float;
(with an up-to-date Eigen, i.e. after the ei → internal:: renaming).
Best regards,
Bernard