Dear Brook,

you can do things like
  Eigen::MatrixXd::Scalar d;
or
  Eigen::MatrixXd M;
  decltype(M)::Scalar d;
Is this what you are looking for?

Alternatively, you can try Eigen::internal::traits<EigenType>::Scalar,
which is supported by many Eigen type. You can see examples of use of
Eigen::internal::traits in many places, e.g. SolverBase.h

Best regards,
Adrien

On Mon, May 25, 2020 at 3:31 AM Brook Milligan <[email protected]> wrote:

> I am trying to discover if Eigen provides any meta functions for deducing
> types associated with the main Eigen types, e.g., arrays, matrices, etc.
> For example, is there any way to determine what the scalar type associated
> with a matrix is?
>
> I am not seeing any way to do this in the documentation, but perhaps I
> just have not found it yet.  It is certainly not highlighted.
>
> Thanks for your help.
>
> Cheers,
> Brook
>
>
>
>

Reply via email to