|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.vecmath.GVector javax.robotics.vecmath.RVector
public class RVector
A double precision, general, dynamically-resizable, one-dimensional vector class. Index numbering begins with zero. This class extend printing functionality of GVector class.
Constructor Summary | |
---|---|
RVector(double... vector)
Constructs a new RVector from the specified array elements. |
|
RVector(double[] vector,
int length)
Constructs a new RVector of the specified length and initializes it by copying the specified number of elements from the specified array. |
|
RVector(javax.vecmath.GVector vector)
Constructs a new RVector from the specified GVector. |
|
RVector(int length)
Constructs a new RVector of the specified length with all vector elements initialized to 0. |
|
RVector(RVector vector)
Constructs a new RVector from the specified RVector. |
|
RVector(RVector3d vector)
Constructs a new RVector from the specified RVector3d. |
Method Summary | |
---|---|
void |
add(RVector... v)
Adds multiple vectors and puts the result in this vector. |
void |
addScale(double[] s,
RVector... v)
Adds multiple scaled vectors and puts the result in this vector. |
void |
append(double[] v)
Appends the input array to this vector. |
void |
append(RVector v)
Appends the input vector to this vector. |
void |
append(RVector3d v)
Appends the input vector to this vector. |
void |
get(double[] vector)
Gets this vector as array |
void |
mul(DMatrix D,
RVector v)
Multiplies diagonal matrix D times RVector v and places the result into this vector (this = D*v). |
void |
printf()
Prints to standard out |
void |
printf(java.io.PrintStream out)
Prints to PrintStream |
void |
printf(java.io.PrintStream out,
java.lang.String format)
Prints to PrintStream according to the format string |
void |
printf(java.lang.String format)
Prints to standard out according to the format string. |
void |
setValues(double... vector)
Sets this vector from varargs input. |
void |
split(RVector v1,
RVector v2)
Splits this vector in two new vectors. |
void |
split(RVector v1,
RVector v2,
RVector v3)
Splits this vector in three new vectors. |
java.lang.String |
toString()
Returns a string that contains the values of this RVector. |
java.lang.String |
toString(java.lang.String format)
Returns a string that contains the values of this RVector, according to the format string |
Methods inherited from class javax.vecmath.GVector |
---|
add, add, angle, clone, dot, epsilonEquals, equals, equals, getElement, getSize, hashCode, interpolate, interpolate, interpolate, interpolate, LUDBackSolve, mul, mul, negate, norm, normalize, normalize, normSquared, scale, scale, scaleAdd, set, set, set, set, set, set, set, setElement, setSize, sub, sub, SVDBackSolve, zero |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RVector(RVector vector)
vector
- The source RVector for this new RVector.public RVector(RVector3d vector)
vector
- The source RVector3d for this new RVector.public RVector(javax.vecmath.GVector vector)
vector
- The source GVector for this new RVector.public RVector(double... vector)
vector
- The values for the new RVector.public RVector(double[] vector, int length)
vector
- The array from which the values will be copied.length
- The number of elements of array to be copied in the new
RVector.public RVector(int length)
length
- The number of elements in this RVector.Method Detail |
---|
public void printf()
public void printf(java.lang.String format)
The format specifiers for numeric types have the following syntax:
%[width][.precision]conversion
width
is a non-negative decimal
integer indicating the minimum number of characters to be written to the
output. precision
is a non-negative
decimal integer usually used to restrict the number of characters. The
specific behavior depends on the conversion. conversion
is a character
indicating how the argument should be formatted. The set of valid
conversions for a given argument depends on the argument's data type.
Example: v.printf("%5.3f");
format
- The format stringPrintStream.format(java.lang.String, java.lang.Object[])
public void printf(java.io.PrintStream out)
PrintStream
out
- The PrintStream
object.public void printf(java.io.PrintStream out, java.lang.String format)
PrintStream
according to the format string
out
- The PrintStream
object.format
- The format string.printf(String)
public java.lang.String toString()
toString
in class javax.vecmath.GVector
public java.lang.String toString(java.lang.String format)
format
- The format string
printf(String)
public void get(double[] vector)
vector
- the arraypublic void append(RVector v)
v
- the input vector.public void append(double[] v)
v
- the input vector.public void append(RVector3d v)
v
- the input vector.public void split(RVector v1, RVector v2)
v1
- the first vector to be copied.v2
- the second vector to be copied.public void split(RVector v1, RVector v2, RVector v3)
v1
- the first vector to be copied.v2
- the second vector to be copied.v3
- the second vector to be copied.public void add(RVector... v)
v
- the input vectors separate by commapublic void addScale(double[] s, RVector... v)
s
- the array of scale factors.v
- the input vectors separate by comma.public void mul(DMatrix D, RVector v)
D
- The diagonal matrix in the multiplicationv
- The vector that is multipliedpublic void setValues(double... vector)
vector
- the elements of vector separated by comma.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |