javax.robotics.vecmath
Class DMatrix

java.lang.Object
  extended by javax.vecmath.GVector
      extended by javax.robotics.vecmath.RVector
          extended by javax.robotics.vecmath.DMatrix
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class DMatrix
extends RVector

Diagonal Matrix, a double precision, general, dynamically-resizable, one-dimensional vector class. Index numbering begins with zero.

Since:
1.0.2
Version:
5/10/2005
Author:
Carmine Lia
See Also:
Serialized Form

Constructor Summary
DMatrix(DMatrix diag)
          Constructs a new diagonal matrix from another diagonal matrix.
DMatrix(double... diag)
          Constructs a new diagonal matrix from an array.
DMatrix(int size)
          Constructs a zero diagonal matrix size by size
DMatrix(Matrix diag)
          Constructs a new diagonal matrix from a diagonal of input matrix.
DMatrix(RVector diag)
          Constructs a new diagonal matrix from a vector.
 
Method Summary
 void get(Matrix M)
          Gets this diagonal matrix as generic matrix.
 void invert()
          Invert diagonal matrix in place.
 Matrix mul(Matrix M)
          Sets the value of return matrix to the result of multiplying this matrix with matrix M (this * M).
 
Methods inherited from class javax.robotics.vecmath.RVector
add, addScale, append, append, append, get, mul, printf, printf, printf, printf, setValues, split, split, toString, toString
 
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

DMatrix

public DMatrix(int size)
Constructs a zero diagonal matrix size by size

Parameters:
size - the dimension of matrix

DMatrix

public DMatrix(double... diag)
Constructs a new diagonal matrix from an array.

Parameters:
diag - the input array.

DMatrix

public DMatrix(RVector diag)
Constructs a new diagonal matrix from a vector.

Parameters:
diag - the input vector.

DMatrix

public DMatrix(DMatrix diag)
Constructs a new diagonal matrix from another diagonal matrix.

Parameters:
diag - the input diagonal matrix.

DMatrix

public DMatrix(Matrix diag)
Constructs a new diagonal matrix from a diagonal of input matrix.

Parameters:
diag - the input matrix.
Method Detail

get

public void get(Matrix M)
Gets this diagonal matrix as generic matrix.

Parameters:
M - the matrix to be copied

mul

public Matrix mul(Matrix M)
Sets the value of return matrix to the result of multiplying this matrix with matrix M (this * M).

Parameters:
M - the generic input matrix
Returns:
the product matrix

invert

public void invert()
Invert diagonal matrix in place.