vmm3d.pseudospherical

## Class ComplexVector2D

- java.lang.Object
- vmm3d.pseudospherical.ComplexVector2D

public class ComplexVector2Dextends Object

A 2D vector with components of type Complex named x, y.

### Field Summary

Fields Modifier and Type Field and Description `Complex`

**x**The first component of the vector.`Complex`

**y**The second component of the vector.

### Constructor Summary

Constructors Constructor and Description **ComplexVector2D**()Construct a vector with all components initially equal to zero.**ComplexVector2D**(Complex x, Complex y)Construct a vector that initially has coordinates (x,y).**ComplexVector2D**(ComplexVector2D v)Construct a vector that is initially a copy of a specified vector.

### Method Summary

Methods Modifier and Type Method and Description `Complex`

**dot**(ComplexVector2D v)Returns the Hermitian inner-prodct of this vector and v.`boolean`

**equals**(Object obj)Returns true`obj`

is a non-null object whose class in Vector2D and such that both coordinates of the vector`obj`

are the same as the coordinates of this vector.`ComplexVector2D`

**minus**(ComplexVector2D v)Returns the vector difference of this vector and v.`void`

**negate**()Multiplies each component of this vector by -1.`double`

**norm2**()Returns the norm square of the vector.`ComplexVector2D`

**plus**(ComplexVector2D v)Returns the vector sum of this vector and v.`ComplexVector2D`

**times**(Complex d)Returns the scalar product of this vector times d.`String`

**toString**()Returns a string representation of this vector of the form "(x,y)" where x, y are the numerical components of the vector.

### Field Detail

#### x

public Complex x

The first component of the vector.

#### y

public Complex y

The second component of the vector.

### Constructor Detail

#### ComplexVector2D

public ComplexVector2D()

Construct a vector with all components initially equal to zero.

#### ComplexVector2D

public ComplexVector2D(Complex x, Complex y)

Construct a vector that initially has coordinates (x,y).

#### ComplexVector2D

public ComplexVector2D(ComplexVector2D v)

Construct a vector that is initially a copy of a specified vector.- Parameters:
`v`

- the constructed vector is (v.x, v.y), or is (ZERO_C,ZERO_C) if v is null.

### Method Detail

#### equals

public boolean equals(Object obj)

Returns true`obj`

is a non-null object whose class in Vector2D and such that both coordinates of the vector`obj`

are the same as the coordinates of this vector.

#### negate

public void negate()

Multiplies each component of this vector by -1. This method modifies the vector.

#### plus

public ComplexVector2D plus(ComplexVector2D v)

Returns the vector sum of this vector and v. A new vector object is constructed to contain the result; neither input vector is modified.- Parameters:
`v`

- a non-null vector

#### minus

public ComplexVector2D minus(ComplexVector2D v)

Returns the vector difference of this vector and v. A new vector object is constructed to contain the result; neither input vector is modified.- Parameters:
`v`

- a non-null vector

#### dot

public Complex dot(ComplexVector2D v)

Returns the Hermitian inner-prodct of this vector and v.

#### times

public ComplexVector2D times(Complex d)

Returns the scalar product of this vector times d. A new vector object is constructed to contain the result; the vector is not modified.- Parameters:
`d`

- the scalar that is to be multiplied times this vector

#### norm2

public double norm2()

Returns the norm square of the vector. The norm is calculated by sqrt(|x|^2+|y|^2)

**SCaVis 1.8 © jWork.org**