add abs for PIVector2D<complexd>
git-svn-id: svn://db.shs.com.ru/pip@853 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -107,4 +107,13 @@ inline PIVector<double> abs(const PIVector<complexd> & v) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
inline PIVector2D<double> abs(const PIVector2D<complexd> & v) {
|
||||
PIVector2D<double> result(v.rows(), v.cols());
|
||||
for (uint i = 0; i < v.rows(); i++)
|
||||
for (uint j = 0; j < v.cols(); j++)
|
||||
result[i][j] = abs(v.element(i,j));
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // PIMATHCOMPLEX_H
|
||||
|
||||
Reference in New Issue
Block a user