首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::norm(std::complex)

Defined in header <complex>

?

?

template< class T > T norm( const complex<T>& z );

(1)

?

long double norm( long double z );

(2)

(since C++11)

template< class DoubleOrInteger > double norm( DoubleOrInteger z );

(3)

(since C++11)

float norm( float z );

(4)

(since C++11)

返回复数的平方大小。z...

%28,因为C++11%提供了29附加过载float,,,double,,,long double,以及所有整数类型,它们被视为零虚分量的复数。

参数

z

-

complex value

返回值

平方震级z...

注记

此函数计算的范数也称为场范数绝对平方...

欧氏范数提供复数的std::abs计算成本更高。在某些情况下,它可能被替换为std::norm,例如,如果abs(z1) > abs(z2)然后norm(z1) > norm(z2)...

另见

abs(std::complex)

returns the magnitude of a complex number (function template)

conj

returns the complex conjugate (function template)

polar

constructs a complex number from magnitude and phase angle (function template)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com