All Packages Class Hierarchy This Package Previous Next Index
Interface jam.vector.Vector
- public interface interface Vector
- extends JamObject
A Vector is a mathematical vector with an inner product.
Warning: there is a potential conflict with
java.util.Vector.
One should avoid using import java.util.*;
Import object from java.util on an individual basis, and never
import java.util.Vector.
Instead use java.util.Vector in full where needed.
-
add(Vector)
- this = this + vec2
-
add(Vector, Vector)
- this = vec1 + vec2
-
addScale(float, Vector)
- this = this + a*vec2
-
addScale(float, Vector, Vector)
- this = vec1 + a*vec2
-
copyFrom(Vector)
- this = src (without reallocating this)
-
dot(Vector)
-
-
getSpace()
-
-
neg()
- this = -this
-
neg(Vector)
- this = -vec2
-
norm()
-
-
norm2()
-
-
scale(float)
- this = a*this
-
scale(float, Vector)
- this = a*vec
-
sub(Vector)
- this = this - vec2
-
sub(Vector, Vector)
- this = vec1 - vec2
-
zero()
- this = 0 (the zero vector)
getSpace
public abstract Space getSpace()
- Returns:
- The space of which this is a member.
neg
public abstract void neg()
- this = -this
neg
public abstract void neg(Vector vec2)
- this = -vec2
add
public abstract void add(Vector vec2)
- this = this + vec2
add
public abstract void add(Vector vec1,
Vector vec2)
- this = vec1 + vec2
addScale
public abstract void addScale(float a,
Vector vec2)
- this = this + a*vec2
addScale
public abstract void addScale(float a,
Vector vec1,
Vector vec2)
- this = vec1 + a*vec2
sub
public abstract void sub(Vector vec2)
- this = this - vec2
sub
public abstract void sub(Vector vec1,
Vector vec2)
- this = vec1 - vec2
scale
public abstract void scale(float a)
- this = a*this
scale
public abstract void scale(float a,
Vector vec2)
- this = a*vec
copyFrom
public abstract void copyFrom(Vector src)
- this = src (without reallocating this)
zero
public abstract void zero()
- this = 0 (the zero vector)
dot
public abstract float dot(Vector vec2)
- Returns:
- < this, vec2 > (the inner product)
norm2
public abstract float norm2()
- Returns:
- < this, this > ( = norm^2(this) )
norm
public abstract float norm()
- Returns:
- sqrt( < this, this > ) ( = norm(this) )
All Packages Class Hierarchy This Package Previous Next Index