This forum has been archived. All content is frozen. Please use KDE Discuss instead.

hasnan(m), isnan(m)

Tags: None
(comma "," separated)
eudoxos
Registered Member
Posts
36
Karma
0

hasnan(m), isnan(m)

Tue Jul 26, 2011 11:34 am
Hi, I use repeatedly a simple predicate to find out whether a given matrix contains NaNs, and whether it contains non-NaNs (hasnan, isnan). Should be such functions considered for addition to eigen's dense base class? If so, can I do something about it? Cheers! v.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: hasnan(m), isnan(m)

Wed Jul 27, 2011 7:17 am
Note that hasNan() could just be a shortcut for (A!=A).any() for arrays, and (M.array()!=M.array()).any() for matrices. That said, a dedicated unary functor would be more efficient, and yes I'd be welcome to add such functions.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]