edu.jhu.ece.iacl.jist.structures.vector
Class VectorN

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.vector.VectorN
All Implemented Interfaces:
VectorX, java.lang.Cloneable

public class VectorN
extends java.lang.Object
implements VectorX

The Class VectorN.


Constructor Summary
VectorN(int size)
          Instantiates a new vector n.
VectorN(java.lang.Number[] nums)
          Instantiates a new vector n.
 
Method Summary
 VectorN add(double a)
          Adds the.
 VectorN add(VectorX v)
          Adds the.
 VectorN clone()
          Clone.
 VectorN div(double a)
          Div.
 VectorN div(VectorX v)
          Div.
 java.lang.Number get(int i)
          Gets the.
 java.lang.Number getW()
          Gets the w.
 java.lang.Number getX()
          Gets the x.
 java.lang.Number getY()
          Gets the y.
 java.lang.Number getZ()
          Gets the z.
 java.lang.Number mag()
          Mag.
 VectorN mul(double a)
          Mul.
 VectorN mul(VectorX v)
          Mul.
 VectorN normalize()
          Normalize.
 void set(java.lang.Number value, int i)
          Sets the.
 void setW(java.lang.Number w)
          Sets the w.
 void setX(java.lang.Number x)
          Sets the x.
 void setY(java.lang.Number y)
          Sets the y.
 void setZ(java.lang.Number z)
          Sets the z.
 int size()
          Size.
 VectorN sub(double a)
          Sub.
 VectorN sub(VectorX v)
          Sub.
 java.lang.Number[] toArray()
          To array.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VectorN

public VectorN(int size)
Instantiates a new vector n.

Parameters:
size - the size

VectorN

public VectorN(java.lang.Number[] nums)
Instantiates a new vector n.

Parameters:
nums - the nums
Method Detail

toArray

public java.lang.Number[] toArray()
Description copied from interface: VectorX
To array.

Specified by:
toArray in interface VectorX
Returns:
the number[]

size

public int size()
Description copied from interface: VectorX
Size.

Specified by:
size in interface VectorX
Returns:
the int

get

public java.lang.Number get(int i)
Description copied from interface: VectorX
Gets the.

Specified by:
get in interface VectorX
Parameters:
i - the i
Returns:
the number

getX

public java.lang.Number getX()
Description copied from interface: VectorX
Gets the x.

Specified by:
getX in interface VectorX
Returns:
the x

getY

public java.lang.Number getY()
Description copied from interface: VectorX
Gets the y.

Specified by:
getY in interface VectorX
Returns:
the y

getZ

public java.lang.Number getZ()
Description copied from interface: VectorX
Gets the z.

Specified by:
getZ in interface VectorX
Returns:
the z

getW

public java.lang.Number getW()
Description copied from interface: VectorX
Gets the w.

Specified by:
getW in interface VectorX
Returns:
the w

mag

public java.lang.Number mag()
Description copied from interface: VectorX
Mag.

Specified by:
mag in interface VectorX
Returns:
the number

setX

public void setX(java.lang.Number x)
Description copied from interface: VectorX
Sets the x.

Specified by:
setX in interface VectorX
Parameters:
x - the new x

setY

public void setY(java.lang.Number y)
Description copied from interface: VectorX
Sets the y.

Specified by:
setY in interface VectorX
Parameters:
y - the new y

setZ

public void setZ(java.lang.Number z)
Description copied from interface: VectorX
Sets the z.

Specified by:
setZ in interface VectorX
Parameters:
z - the new z

setW

public void setW(java.lang.Number w)
Description copied from interface: VectorX
Sets the w.

Specified by:
setW in interface VectorX
Parameters:
w - the new w

set

public void set(java.lang.Number value,
                int i)
Description copied from interface: VectorX
Sets the.

Specified by:
set in interface VectorX
Parameters:
value - the value
i - the i

add

public VectorN add(double a)
Description copied from interface: VectorX
Adds the.

Specified by:
add in interface VectorX
Parameters:
a - the a
Returns:
the vector x

sub

public VectorN sub(double a)
Description copied from interface: VectorX
Sub.

Specified by:
sub in interface VectorX
Parameters:
a - the a
Returns:
the vector x

mul

public VectorN mul(double a)
Description copied from interface: VectorX
Mul.

Specified by:
mul in interface VectorX
Parameters:
a - the a
Returns:
the vector x

div

public VectorN div(double a)
Description copied from interface: VectorX
Div.

Specified by:
div in interface VectorX
Parameters:
a - the a
Returns:
the vector x

add

public VectorN add(VectorX v)
Description copied from interface: VectorX
Adds the.

Specified by:
add in interface VectorX
Parameters:
v - the v
Returns:
the vector x

sub

public VectorN sub(VectorX v)
Description copied from interface: VectorX
Sub.

Specified by:
sub in interface VectorX
Parameters:
v - the v
Returns:
the vector x

mul

public VectorN mul(VectorX v)
Description copied from interface: VectorX
Mul.

Specified by:
mul in interface VectorX
Parameters:
v - the v
Returns:
the vector x

div

public VectorN div(VectorX v)
Description copied from interface: VectorX
Div.

Specified by:
div in interface VectorX
Parameters:
v - the v
Returns:
the vector x

normalize

public VectorN normalize()
Description copied from interface: VectorX
Normalize.

Specified by:
normalize in interface VectorX
Returns:
the vector x

clone

public VectorN clone()
Description copied from interface: VectorX
Clone.

Specified by:
clone in interface VectorX
Overrides:
clone in class java.lang.Object
Returns:
the vector x

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object