|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.crwth.systems.Vector
|
+--org.crwth.systems.systems1d.Vector1d
| Field Summary | |
protected double |
epsilon
|
protected double |
X
|
| Constructor Summary | |
Vector1d()
|
|
Vector1d(double x)
|
|
Vector1d(Vector vector)
|
|
Vector1d(Vector1d vector)
|
|
| Method Summary | |
void |
add(Vector vector)
Adds a Vector to this Vector. |
void |
add(Vector1d vector)
Adds one Vector to another. |
boolean |
equals(Vector vector)
Returns whether two Vectors are equal. |
boolean |
equals(Vector1d vector)
A refined implementation of equals(). |
int |
getDimension()
Returns the dimension of the object -- 1. |
double |
getDistance(Vector vector)
Returns the distance to a Vector. |
double |
getDistance(Vector1d vector)
A refined implementation of getDistance(). |
Vector |
getInverse()
Returns a Vector that is inverted along all axes to this object, maintaining the same magnitude. |
double |
getMagnitude()
Returns the magnitude of the object. |
Vector |
getNormal()
Returns a normal Vector to this Vector; that is, a Vector of magnitude 1 in the same direction as the object. |
Vector |
getVector(Vector vector)
Returns a Vector from the object to the endpoint of vector. |
Vector |
getVector(Vector1d vector)
A refined implementation of getVector(). |
double |
getX()
Returns the X coordinate of the object. |
void |
invert()
Inverts the object along all axes. |
void |
normalize()
Sets the object's magnitude to 1. |
void |
setMagnitude(double magnitude)
Sets the magnitude of the object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected double X
protected double epsilon
| Constructor Detail |
public Vector1d()
public Vector1d(double x)
public Vector1d(Vector vector)
throws WrongDimensionException
public Vector1d(Vector1d vector)
| Method Detail |
public void add(Vector vector)
throws WrongDimensionException
add in class Vectorvector - the Vector to add to the object.
WrongDimensionException - if vector has a mismatched dimension.public void add(Vector1d vector)
vector - the Vector to add to the object.public int getDimension()
getDimension in class Vector
public double getDistance(Vector vector)
throws WrongDimensionException
getDistance in class Vectorvector - the vector.
vector
WrongDimensionException - if vector has a mismatched dimension.public double getDistance(Vector1d vector)
getDistance().
vector - the other vector.
vectorpublic void invert()
invert in class Vectorpublic Vector getInverse()
getInverse in class Vectorpublic void setMagnitude(double magnitude)
setMagnitude in class Vectormagnitude - the new magnitude.public double getMagnitude()
getMagnitude in class Vectorpublic void normalize()
setMagnitude(1.0).
normalize in class Vectorpublic Vector getNormal()
getNormal in class Vector
public Vector getVector(Vector vector)
throws WrongDimensionException
vector.
getVector in class Vectorvector - the Vector to calculate to.
vector.
WrongDimensionException - if vector has a mismatched dimension.public Vector getVector(Vector1d vector)
getVector().
vector - the Vector to calculate to.
vector.public double getX()
public boolean equals(Vector vector)
throws WrongDimensionException
equals in class Vectorvector - the Vector to compare this object to.
vector is equal to the object.
WrongDimensionException - if vector has the wrong dimension.public boolean equals(Vector1d vector)
equals().
vector - the Vector to compare this object to.
vector is equal to the object.public String toString()
toString in class Vector
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||