Package jadex.extension.envsupport.math
Class Vector1Double
- java.lang.Object
-
- jadex.extension.envsupport.math.Vector1Double
-
-
Constructor Summary
Constructors Constructor Description Vector1Double()Creates a new vector.Vector1Double(double value)Creates a new Vector1Double
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IVector1add(IVector1 vector)Adds another vector to this vector, adding individual components.IVector1cbrt()Calculate the cube root.java.lang.Objectclone()Generates a deep clone of the vector.IVector1copy()Makes a copy of the vector without using the complex clone interface.IVector2createVector2(IVector1 sec)Create a vector2 from this and another vector.booleanequals(IVector1 vector)Compares the vector to another vector.booleanequals(java.lang.Object obj)Compares the vector to an objectjava.math.BigDecimalgetAsBigDecimal()Returns the vector as BigDecimal.doublegetAsDouble()Returns the vector as double.floatgetAsFloat()Returns the vector as float.intgetAsInteger()Returns the vector as integer.longgetAsLong()Returns the vector as long.IVector1getDistance(IVector1 vector)Returns the distance to another vectorstatic IVector1getVector1(java.lang.Double val)booleangreater(IVector1 vector)Tests if the vector is greater than another vector.inthashCode()Compute the hash code.booleanless(IVector1 vector)Tests if the vector is less than another vector.IVector1mod(IVector1 mod)Calculate the modulo.IVector1multiply(IVector1 vector)Performs a multiplication on the vector.IVector1negate()Negates the vector by negating its components.voidsetAsDouble(double x)IVector1sqrt()Calculate the square root.IVector1subtract(IVector1 vector)Subtracts another vector to this vector, subtracting individual components.java.lang.StringtoString()IVector1zero()Sets the vector component to zero.
-
-
-
Field Detail
-
ZERO
public static final IVector1 ZERO
Zero vector
-
-
Method Detail
-
add
public IVector1 add(IVector1 vector)
Description copied from interface:IVector1Adds another vector to this vector, adding individual components.
-
subtract
public IVector1 subtract(IVector1 vector)
Subtracts another vector to this vector, subtracting individual components.
-
multiply
public IVector1 multiply(IVector1 vector)
Description copied from interface:IVector1Performs a multiplication on the vector.
-
zero
public IVector1 zero()
Sets the vector component to zero.
-
negate
public IVector1 negate()
Description copied from interface:IVector1Negates the vector by negating its components.
-
sqrt
public IVector1 sqrt()
Calculate the square root.
-
getDistance
public IVector1 getDistance(IVector1 vector)
Description copied from interface:IVector1Returns the distance to another vector- Specified by:
getDistancein interfaceIVector1- Parameters:
vector- other vector- Returns:
- distance
-
getAsInteger
public int getAsInteger()
Description copied from interface:IVector1Returns the vector as integer.- Specified by:
getAsIntegerin interfaceIVector1- Returns:
- vector as integer
-
getAsLong
public long getAsLong()
Description copied from interface:IVector1Returns the vector as long.
-
getAsFloat
public float getAsFloat()
Description copied from interface:IVector1Returns the vector as float.- Specified by:
getAsFloatin interfaceIVector1- Returns:
- vector as float
-
getAsDouble
public double getAsDouble()
Description copied from interface:IVector1Returns the vector as double.- Specified by:
getAsDoublein interfaceIVector1- Returns:
- vector as double
-
setAsDouble
public void setAsDouble(double x)
-
getAsBigDecimal
public java.math.BigDecimal getAsBigDecimal()
Description copied from interface:IVector1Returns the vector as BigDecimal.- Specified by:
getAsBigDecimalin interfaceIVector1- Returns:
- vector as BigDecimal
-
copy
public IVector1 copy()
Description copied from interface:IVector1Makes a copy of the vector without using the complex clone interface.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from interface:IVector1Generates a deep clone of the vector.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:IVector1Compares the vector to an object
-
equals
public boolean equals(IVector1 vector)
Description copied from interface:IVector1Compares the vector to another vector. The vectors are equal if the components are equal.
-
hashCode
public int hashCode()
Compute the hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code.
-
greater
public boolean greater(IVector1 vector)
Description copied from interface:IVector1Tests if the vector is greater than another vector.
-
less
public boolean less(IVector1 vector)
Description copied from interface:IVector1Tests if the vector is less than another vector.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getVector1
public static IVector1 getVector1(java.lang.Double val)
-
createVector2
public IVector2 createVector2(IVector1 sec)
Create a vector2 from this and another vector.- Specified by:
createVector2in interfaceIVector1- Parameters:
sec- The second vector.
-
-