jadex.application.space.envsupport.math
Interface IVector1

All Known Implementing Classes:
Vector1Double, Vector1Int, Vector1Long

public interface IVector1


Method Summary
 IVector1 add(IVector1 vector)
          Adds another vector to this vector, adding individual components.
 Object clone()
          Generates a deep clone of the vector.
 IVector1 copy()
          Makes a copy of the vector without using the complex clone interface.
 IVector2 createVector2(IVector1 sec)
          Create a vector2 from this and another vector.
 boolean equals(IVector1 vector)
          Compares the vector to another vector.
 boolean equals(Object obj)
          Compares the vector to an object
 BigDecimal getAsBigDecimal()
          Returns the vector as BigDecimal.
 double getAsDouble()
          Returns the vector as double.
 float getAsFloat()
          Returns the vector as float.
 int getAsInteger()
          Returns the vector as integer.
 long getAsLong()
          Returns the vector as long.
 IVector1 getDistance(IVector1 vector)
          Returns the distance to another vector
 boolean greater(IVector1 vector)
          Tests if the vector is greater than another vector.
 boolean less(IVector1 vector)
          Tests if the vector is less than another vector.
 IVector1 mod(IVector1 mod)
          Calculate the modulo.
 IVector1 multiply(IVector1 vector)
          Performs a multiplication on the vector.
 IVector1 negate()
          Negates the vector by negating its components.
 IVector1 sqrt()
          Calculate the square root.
 IVector1 subtract(IVector1 vector)
          Subtracts another vector to this vector, subtracting individual components.
 IVector1 zero()
          Sets the vector component to zero.
 

Method Detail

add

IVector1 add(IVector1 vector)
Adds another vector to this vector, adding individual components.

Parameters:
vector - the vector to add to this vector
Returns:
a reference to the called vector (NOT a copy)

subtract

IVector1 subtract(IVector1 vector)
Subtracts another vector to this vector, subtracting individual components.

Parameters:
vector - the vector to subtract from this vector
Returns:
a reference to the called vector (NOT a copy)

multiply

IVector1 multiply(IVector1 vector)
Performs a multiplication on the vector.

Parameters:
vector - vector
Returns:
a reference to the called vector (NOT a copy)

zero

IVector1 zero()
Sets the vector component to zero.

Returns:
a reference to the called vector (NOT a copy)

negate

IVector1 negate()
Negates the vector by negating its components.

Returns:
a reference to the called vector (NOT a copy)

sqrt

IVector1 sqrt()
Calculate the square root.

Returns:
The square root.

mod

IVector1 mod(IVector1 mod)
Calculate the modulo.

Returns:
The modulo value.

getDistance

IVector1 getDistance(IVector1 vector)
Returns the distance to another vector

Parameters:
vector - other vector
Returns:
distance

getAsInteger

int getAsInteger()
Returns the vector as integer.

Returns:
vector as integer

getAsLong

long getAsLong()
Returns the vector as long.

Returns:
vector as long

getAsFloat

float getAsFloat()
Returns the vector as float.

Returns:
vector as float

getAsDouble

double getAsDouble()
Returns the vector as double.

Returns:
vector as double

getAsBigDecimal

BigDecimal getAsBigDecimal()
Returns the vector as BigDecimal.

Returns:
vector as BigDecimal

copy

IVector1 copy()
Makes a copy of the vector without using the complex clone interface.

Returns:
copy of the vector

clone

Object clone()
             throws CloneNotSupportedException
Generates a deep clone of the vector.

Returns:
clone of this vector
Throws:
CloneNotSupportedException

equals

boolean equals(Object obj)
Compares the vector to an object

Overrides:
equals in class Object
Parameters:
obj - the object
Returns:
always returns false unless the object is an IVector2, in which case it is equivalent to equals(IVector vector)

equals

boolean equals(IVector1 vector)
Compares the vector to another vector. The vectors are equal if the components are equal.

Parameters:
vector - the other vector
Returns:
true if the vectors are equal

greater

boolean greater(IVector1 vector)
Tests if the vector is greater than another vector.

Parameters:
vector - the other vector
Returns:
true if the vector is greater than the given vector.

less

boolean less(IVector1 vector)
Tests if the vector is less than another vector.

Parameters:
vector - the other vector
Returns:
true if the vector is less than the given vector.

createVector2

IVector2 createVector2(IVector1 sec)
Create a vector2 from this and another vector.

Parameters:
sec - The second vector.


Copyright © 2010. All Rights Reserved.