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.


Method Index

 o add(Vector)
this = this + vec2
 o add(Vector, Vector)
this = vec1 + vec2
 o addScale(float, Vector)
this = this + a*vec2
 o addScale(float, Vector, Vector)
this = vec1 + a*vec2
 o copyFrom(Vector)
this = src (without reallocating this)
 o dot(Vector)
 o getSpace()
 o neg()
this = -this
 o neg(Vector)
this = -vec2
 o norm()
 o norm2()
 o scale(float)
this = a*this
 o scale(float, Vector)
this = a*vec
 o sub(Vector)
this = this - vec2
 o sub(Vector, Vector)
this = vec1 - vec2
 o zero()
this = 0 (the zero vector)

Methods

 o getSpace
 public abstract Space getSpace()
Returns:
The space of which this is a member.
 o neg
 public abstract void neg()
this = -this

 o neg
 public abstract void neg(Vector vec2)
this = -vec2

 o add
 public abstract void add(Vector vec2)
this = this + vec2

 o add
 public abstract void add(Vector vec1,
                          Vector vec2)
this = vec1 + vec2

 o addScale
 public abstract void addScale(float a,
                               Vector vec2)
this = this + a*vec2

 o addScale
 public abstract void addScale(float a,
                               Vector vec1,
                               Vector vec2)
this = vec1 + a*vec2

 o sub
 public abstract void sub(Vector vec2)
this = this - vec2

 o sub
 public abstract void sub(Vector vec1,
                          Vector vec2)
this = vec1 - vec2

 o scale
 public abstract void scale(float a)
this = a*this

 o scale
 public abstract void scale(float a,
                            Vector vec2)
this = a*vec

 o copyFrom
 public abstract void copyFrom(Vector src)
this = src (without reallocating this)

 o zero
 public abstract void zero()
this = 0 (the zero vector)

 o dot
 public abstract float dot(Vector vec2)
Returns:
< this, vec2 > (the inner product)
 o norm2
 public abstract float norm2()
Returns:
< this, this > ( = norm^2(this) )
 o norm
 public abstract float norm()
Returns:
sqrt( < this, this > ) ( = norm(this) )

All Packages  Class Hierarchy  This Package  Previous  Next  Index