Add matrix isNan function.
This commit is contained in:
@@ -252,6 +252,18 @@ namespace Aurora {
|
|||||||
return !mData || mInfo.empty();
|
return !mData || mInfo.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Matrix::isNan() const
|
||||||
|
{
|
||||||
|
for(size_t i=0; i<getDataSize(); ++i)
|
||||||
|
{
|
||||||
|
if(mData.get()[i] != NAN)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Matrix::isScalar() const {
|
bool Matrix::isScalar() const {
|
||||||
return (getDimSize(0) == 1 &&
|
return (getDimSize(0) == 1 &&
|
||||||
getDimSize(1) == 1 &&
|
getDimSize(1) == 1 &&
|
||||||
|
|||||||
@@ -178,6 +178,8 @@ namespace Aurora {
|
|||||||
*/
|
*/
|
||||||
bool isNull() const;
|
bool isNull() const;
|
||||||
|
|
||||||
|
bool isNan() const;
|
||||||
|
|
||||||
bool isVector() const;
|
bool isVector() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user