Re: [eigen] Bug in the Cholesky/Core module? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Quoting Timothy Hunter <tjhunter@xxxxxxxxxxxx>:
A1=(A1.transpose()*A1).eval();
Just a side note: the eval() here is in fact redundant (but it also
does not slow down things, it just does nothing).
In Eigen, the Product expression has the EvalBeforeAssigning flag.
This means that whenever you do a = b*c; it is equivalent to a =
(b*c).eval(); . So it is perfectly safe to do a = a*a; as there are no
aliasing problems.
When you call eval() on a matrix (for example on an expression that
had already been evaluated), it does nothing and just returns a const
reference.
Cheers,
Benoit
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.