Defines the Complex class.
The Complex class, just like the Polar class, is used by the Hypertree, ST and RGraph as a 2D point representation.
http://en.wikipedia.org/wiki/Complex_number
| Complex.js | Defines the Complex class. |
| Complex | A multi-purpose Complex Class with common methods. |
| Functions | |
| getc | Returns a complex number. |
| getp | Returns a Polar representation of this number. |
| set | Sets a number. |
| setc | Sets a complex number. |
| setp | Sets a polar number. |
| clone | Returns a copy of the current object. |
| toPolar | Transforms cartesian to polar coordinates. |
| norm | Calculates a Complex number norm. |
| squaredNorm | Calculates a Complex number squared norm. |
| add | Returns the result of adding two complex numbers. |
| prod | Returns the result of multiplying two Complex numbers. |
| conjugate | Returns the conjugate of this Complex number. |
| scale | Returns the result of scaling a Complex instance. |
| equals | Comparison method. |
| $add | Returns the result of adding two Complex numbers. |
| $prod | Returns the result of multiplying two Complex numbers. |
| $conjugate | Returns the conjugate for this Complex. |
| $scale | Returns the result of scaling a Complex instance. |
| $div | Returns the division of two Complex numbers. |
| isZero | Returns true if the number is zero. |
A multi-purpose Complex Class with common methods.
The Complex class, just like the Polar class, is used by the Hypertree, ST and RGraph as a 2D point representation.
http://en.wikipedia.org/wiki/Complex_number
| x | optional A Complex number real part. |
| y | optional A Complex number imaginary part. |
| Functions | |
| getc | Returns a complex number. |
| getp | Returns a Polar representation of this number. |
| set | Sets a number. |
| setc | Sets a complex number. |
| setp | Sets a polar number. |
| clone | Returns a copy of the current object. |
| toPolar | Transforms cartesian to polar coordinates. |
| norm | Calculates a Complex number norm. |
| squaredNorm | Calculates a Complex number squared norm. |
| add | Returns the result of adding two complex numbers. |
| prod | Returns the result of multiplying two Complex numbers. |
| conjugate | Returns the conjugate of this Complex number. |
| scale | Returns the result of scaling a Complex instance. |
| equals | Comparison method. |
| $add | Returns the result of adding two Complex numbers. |
| $prod | Returns the result of multiplying two Complex numbers. |
| $conjugate | Returns the conjugate for this Complex. |
| $scale | Returns the result of scaling a Complex instance. |
| $div | Returns the division of two Complex numbers. |
| isZero | Returns true if the number is zero. |
norm: function ()
Calculates a Complex number norm.
A real number representing the complex norm.
squaredNorm: function ()
Calculates a Complex number squared norm.
A real number representing the complex squared norm.
add: function( pos )
Returns the result of adding two complex numbers.
Does not alter the original object.
| pos | A Complex instance. |
The result of adding two complex numbers.
scale: function( factor )
Returns the result of scaling a Complex instance.
Does not alter the original object.
| factor | A scale factor. |
The result of scaling this complex to a factor.
$conjugate: function()
Returns the conjugate for this Complex.
Alters the original object.
The conjugate for this complex.
$scale: function( factor )
Returns the result of scaling a Complex instance.
Alters the original object.
| factor | A scale factor. |
The result of scaling this complex to a factor.
Returns a complex number.
getc: function()
Returns a Polar representation of this number.
getp: function( simple )
Sets a number.
set: function( c )
Sets a complex number.
setc: function( x, y )
Sets a polar number.
setp: function( theta, rho )
Returns a copy of the current object.
clone: function()
Transforms cartesian to polar coordinates.
toPolar: function( simple )
Calculates a Complex number norm.
norm: function ()
Calculates a Complex number squared norm.
squaredNorm: function ()
Returns the result of adding two complex numbers.
add: function( pos )
Returns the result of multiplying two Complex numbers.
prod: function( pos )
Returns the conjugate of this Complex number.
conjugate: function()
Returns the result of scaling a Complex instance.
scale: function( factor )
Comparison method.
equals: function( c )
Returns the result of adding two Complex numbers.
$add: function( pos )
Returns the result of multiplying two Complex numbers.
$prod:function( pos )
Returns the conjugate for this Complex.
$conjugate: function()
Returns the result of scaling a Complex instance.
$scale: function( factor )
Returns the division of two Complex numbers.
$div: function( pos )
Returns true if the number is zero.
isZero: function ()