|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJsVect
Constructor Summary | |
JsVect(double[] values)
Construtor for Js Vects |
|
JsVect(int size)
Construtor for Js Vects |
Method Summary | |
JsVect |
add(JsVect v2)
Add two vectors of arbitrary dimension |
JsVect |
com(int a,
int b,
JsVect v2)
Compute a vector linear combination of two double precision vectors of arbitrary dimension |
double |
dist(JsVect v2)
Return the distance between two vectors of arbitrary dimension |
double |
dot(JsVect v2)
Compute the dot product of two vectors of arbitrary dimension |
int |
getSize()
Construtor for Js Vects |
double[] |
getVect()
Construtor for Js Vects |
double |
getVect(int i)
Construtor for Js Vects |
JsVect |
hat()
Find the unit vector along an arbitrary vector |
JsVect |
negate()
Find the unit vector along an arbitrary vector |
double |
norm()
Compute the magnitude of a double precision vector of arbitrary dimension |
double |
rel(JsVect v2)
Return the relative difference between two vectors of general dimension. |
JsVect |
scl(double scale)
Multiply a scalar and a double precision vector of arbitrary dimension. |
double |
sep(JsVect v2)
finds the separation angle in radians between two double precision vectors of arbitrary dimension. |
void |
setVect(int i,
double value)
Construtor for Js Vects |
JsVect |
sub(JsVect v2)
Sub two vectors of arbitrary dimension |
boolean |
zero()
Indicate whether a vector is the zero vector |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JsVect(int size)
size
- size of the vectorpublic JsVect(double[] values)
Method Detail |
public void setVect(int i, double value)
value
- the value to setpublic double getVect(int i)
public int getSize()
public double[] getVect()
public JsVect add(JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public double dist(JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public double dot(JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public JsVect hat() throws java.lang.Exception
java.lang.Exception
public JsVect com(int a, int b, JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public JsVect negate() throws java.lang.Exception
java.lang.Exception
public double norm() throws java.lang.Exception
java.lang.Exception
public double rel(JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public JsVect scl(double scale) throws java.lang.Exception
java.lang.Exception
public double sep(JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public JsVect sub(JsVect v2) throws java.lang.Exception
v2
- the vector to be added
java.lang.Exception
public boolean zero() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |