org.shlublu.javax.math
Interface Vector

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
Vector3D, Vector2D

public interface Vector
extends java.lang.Cloneable

Creation : 2002/03/23 Interface dedicated to provide vector operations

Since:
0.5

Method Summary
 java.lang.Object clone()
          Return a Vector equals() to this one
 void divide(double d)
          Divide this vector
 boolean equals(java.lang.Object o)
          True if o is not null, from the Vector class without beeing from one of its subclass, and have the same coordinates in the same order than this.
 void equilibrate()
          Equilibrate this vector : each coordinate should be divided by the sum of the coordinates.
 void multiply(double d)
          Multiply this vector
 double norm()
          Get this vector's norm
 void normalize()
          Normalize this vector
Each v vector's coordinate should be divided by the v.norm()
 java.lang.String toString()
          Get this vector as a string
 

Method Detail

toString

public java.lang.String toString()
Get this vector as a string
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
True if o is not null, from the Vector class without beeing from one of its subclass, and have the same coordinates in the same order than
this
.
Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Return a Vector
equals()
to this one
Overrides:
clone in class java.lang.Object

norm

public double norm()
Get this vector's norm

normalize

public void normalize()
Normalize this vector
Each v vector's coordinate should be divided by the
v.norm()

equilibrate

public void equilibrate()
Equilibrate this vector : each coordinate should be divided by the sum of the coordinates.

multiply

public void multiply(double d)
Multiply this vector

divide

public void divide(double d)
Divide this vector