kalman
Class CvMat

java.lang.Object
  extended by kalman.CvMat

public class CvMat
extends java.lang.Object

A matrix type class.

The data matrix - elements are referenced using methods getData(x, y) and setData(x, y, value). That is conventional referencing of aray.
(implementation detail in fact: return data[y][x];)

For the number of dimensions there are:
Number of columns getWidth() (use alias x, i)
Number of rows getHeight() (use alias y, j)
Note: There are no setters except the constructor.

Methods setXY = in situ modifies the value of the matrix. Compare:

See Also:
cvSetIdentity(value), identity(value)

Constructor Summary
CvMat(int width, int height)
          Constructor set the data dimensios and initializes the (2-dimensional) matrix.
 
Method Summary
 void cvGEMM(CvMat src1, CvMat src2, double alpha, CvMat src3, double beta, int tABC)
          The function cvGEMM performs generalized matrix multiplication: dst = alpha*op(src1)*op(src2) + beta*op(src3), where op(X) is X or XT All the matrices should have the same data type and the coordinated sizes.
 CvMat cvSetIdentity(float value)
          Initializes scaled identity matrix.
 CvMat cvSetValues(float value)
          Set the value for each element of the matrix.
 float getData(int x, int y)
          Getter.
 int getHeight()
          Getter.
 int getWidth()
          Getter.
 CvMat identity(float value)
          Returns new initialized scaled identity matrix.
 float setData(int x, int y, float value)
          Setter.
 java.lang.String toString()
          Overloads the Object toString() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CvMat

public CvMat(int width,
             int height)
Constructor set the data dimensios and initializes the (2-dimensional) matrix.

Parameters:
cols -
rows -
Method Detail

toString

public java.lang.String toString()
Overloads the Object toString() method.

Overrides:
toString in class java.lang.Object
Returns:
String tab-separated rows on separate lines

cvSetValues

public CvMat cvSetValues(float value)
Set the value for each element of the matrix. Note that Java inilializes the array after new is created to 0.

Parameters:
value - The value to assign to the elements.

cvSetIdentity

public CvMat cvSetIdentity(float value)
Initializes scaled identity matrix.

Parameters:
value - The value to assign to the diagonal elements.

identity

public CvMat identity(float value)
Returns new initialized scaled identity matrix.

Parameters:
value - The value to assign to the diagonal elements.
Returns:
CvMat of the same size. Doesnt chande object data.

cvGEMM

public void cvGEMM(CvMat src1,
                   CvMat src2,
                   double alpha,
                   CvMat src3,
                   double beta,
                   int tABC)
The function cvGEMM performs generalized matrix multiplication:
dst = alpha*op(src1)*op(src2) + beta*op(src3), where op(X) is X or XT
All the matrices should have the same data type and the coordinated sizes. Real (// TODO: or complex) floating-point matrices are supported.

Additional operations are to be done in such way:

 #define cvMatMulAdd( src1, src2, src3, dst ) cvGEMM( src1, src2, 1, src3, 1, dst, 0 )
 #define cvMatMul( src1, src2, dst ) cvMatMulAdd( src1, src2, 0, dst )
 
dst
The destination array.
tABC
The operation flags that can be 0 or combination of the following values:
CV_GEMM_A_T - transpose src1
CV_GEMM_B_T - transpose src2
CV_GEMM_C_T - transpose src3
for example, CV_GEMM_A_T+CV_GEMM_C_T corresponds to
alpha*src1T*src2 + beta*srcT

Parameters:
src1 - The first source array.
src2 - The second source array.
alpha -
src3 - The third source array (shift). Can be NULL, if there is no shift.
beta -
tABC -

getData

public float getData(int x,
                     int y)
Getter.

Parameters:
x -
y -
Returns:
value

setData

public float setData(int x,
                     int y,
                     float value)
Setter.

Parameters:
x -
y -
value -
Returns:
value

getWidth

public int getWidth()
Getter.

Returns:
width of the matrix.

getHeight

public int getHeight()
Getter.

Returns:
height of the matrix.