Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

10.2 abs()

PrototypesHeader File(s)
RWMathVec<double>
abs(const RWMathVec<double>&)
<rw/math/mathvec.h>
RWMathVec<float>
abs(const RWMathVec<float>&)
<rw/math/mathvec.h>
RWMathVec<int>
abs(const RWMathVec<int>&)
<rw/math/mathvec.h>
RWMathVec<double>
abs(const RWMathVec<DComplex>&)
<rw/math/mathvec.h>
RWMathVec<SChar>
abs(const RWMathVec<SChar>&)
<rw/math/mathvec.h>
RWGenMat<double>
abs(const RWGenMat<double>&)
<rw/math/genmat.h>
RWGenMat<float>
abs(const RWGenMat<float>&)
<rw/math/genmat.h>
RWGenMat<int>
abs(const RWGenMat<int>&)
<rw/math/genmat.h>
RWGenMat<double>
abs(const RWGenMat<DComplex>&)
<rw/math/genmat.h>
<rw/math/genmat.h>
RWGenMat<SChar>
abs(const RWGenMat<SChar>&)
<rw/math/genmat.h>
RWMathArray<double>
abs(const RWMathArray<double>&)
<rw/math/mtharray.h>
RWMathArray<float>
abs(const RWMathArray<float>&)
<rw/math/mtharray.h>
RWMathArray<int>
abs(const RWMathArray<int>&)
<rw/math/mtharray.h>
RWMathArray<double>
abs(const RWMathArray<DComplex>&)
<rw/math/mtharray.h>
<rw/math/mtharray.h>
RWMathArray<SChar>
abs(const RWMathArray<SChar>&)
<rw/math/mtharray.h>

10.2.1 Description

Returns the absolute values of each element. Note that the absolute value of a complex number is of type double. Therefore, if abs() is invoked for class RWMathVec<DComplex>, a vector of class RWMathVec<double> is returned.

10.2.2 Example Program

Program Output:


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.