[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: "[eigen] mailing list" <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Matrix power
- From: Dale Lukas Peterson <hazelnusse@xxxxxxxxx>
- Date: Tue, 18 Jun 2013 20:08:32 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rAPEVOIpiB4ugK6wgi1d8HAgc9NKHnNLWnR1ZhkDr5c=; b=dtwmkwijiw7R4769uFb+p97jnhG+a6veZa/fIadgOKbdUwrMVjbUTdoH0U7dPgp9RK eeTo1m8GcMxfDP4Sk3vWArU4OZPse/fccIAE+K7+lFsuZYseLgOaxymMbIxxUcMsaRby w49Th2xB33k0MOtv2xIXGBAQgeRwsok5gc4uxyxfi66Hq1tBhBw8QYPW9a3uYNjXX9U7 dVWRCKoQbK5MJw9+u8S8uHGhZZ1d9F5+YJqtC1Gyx5tH+oq4B5xPi8D4AnFitGx00Yr9 eZLz09sUYeIAouFV+8d8npDBDxpfVl5W2cRHfnGAhzBioGkvofmw8TXTZFtGJbCneNCF fN1A==
> // compile with
> // g++ -Wall -O2 -g -I/usr/include/eigen3 -o testpow testpow.cc
> #include <Eigen/Dense>
> #include <unsupported/Eigen/MatrixFunctions>
>
> int main()
> {
> Eigen::MatrixXd A(4, 4);
> A << 0, 0, 0, 0,
> 0, 0, 0, 0,
> 0, 0, 0.4115557167420392, -4.285896778479871,
> 0, 0, -4.285896778479871, 44.63286609452607;
>
> Eigen::MatrixXd A_sqrt = A.pow(0.5);
> }
A simpler test case that works is:
Eigen::MatrixXd A(2, 2);
A << 0, 0, 0, 1;
Yet a just barely more complicated case that does not work (i.e., it hangs) is:
Eigen::MatrixXd A(3, 3);
A << 0, 0, 0,
0, 0, 0,
0, 0, 1;
Maybe this will help with tracking down the bug.
Luke