Mod_squared_cpp: Absolute Value or Modulus of a Complex Number Squared.

Description Usage Arguments Details Value Examples

View source: R/RcppExports.R

Description

Computes the squared value of the Modulus.

Usage

1

Arguments

x

A cx_vec.

Details

Consider a complex number defined as: z = x + i y with real x and y, The modulus is defined as: r = Mod(z) = sqrt(x^2 + y^2) This function will return: r^2 = Mod≤ft(z\right)^2 = x^2 + y^2

Value

A vec containing the modulus squared for each element.

Examples

1
Mod_squared_cpp(c(1+.5i, 2+1i, 5+9i))

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.