mpv2
Class RepeatBlockMatrix

java.lang.Object
  extended by mpv2.AllMatrices
      extended by mpv2.RepeatBlockMatrix
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RepeatBlockMatrix
extends AllMatrices
implements java.lang.Cloneable, java.io.Serializable

This is a block (e.g. band) diagonal matrix where the block is the same each time it is repeated. The structure is like

     |---|                              or   |-------|
     | M ||---|                              |   M   | 
     |---|| M ||---|                         |-------|
          |---|| M | .                            |-------|
               |---|   .  |---|                   |   M   |
                          | M ||---|              |-------|
                          |---|| M |                     .
                               |---|                       .
The matrix M is repeated L times. Let M be of size N-by-K then for each repetition the matrix is translated K positions horisonotally and dN positions vertically or dK positions horisonotally and N positions vertically as illustrated above. That is dN==N or dK==K and 1 <= dN <= N and 1 <= dK <= K. The number of repetitions may be flexible, (L==0). The size (when L>0) of this matrix is (N+(L-1)*dN)-by-(K+(L-1)*dK).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class mpv2.AllMatrices
K, N
 
Constructor Summary
RepeatBlockMatrix(AllMatrices M, int vt, int ht, int rep)
          Construct a Block matrix with given matrix M.
 
Method Summary
 double get(int n, int k)
          Get a single element.
 void set(int n, int k, double s)
          Set a single element.
 
Methods inherited from class mpv2.AllMatrices
addColumn, chol, columnNorm0, columnNorm1, columnNorm2, columnNormInf, cond, det, eig, eqConstant, eqCopy, eqCopy, eqCopy, eqCopy, eqCopy, eqDifference, eqEProduct, eqEQuotient, eqIdentity, eqInverse, eqIProduct, eqNegate, eqOnes, eqPermuteColumns, eqPermuteRows, eqProduct, eqProduct, eqRandom, eqScaleColumns, eqScaleRows, eqSum, eqTProduct, eqTranspose, eqZeros, getAll, getAll, getColumn, getColumn, getColumnDimension, getK, getN, getRow, getRow, getRowDimension, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, getValue, innerProduct, lu, lup, norm1, norm2, normF, normInf, pluseqOuterProduct, print, print, print, print, qr, rank, setAll, setColumn, setRow, setValue, sumAll, svd, times, times, times, times, trace, transposeTimes, transposeTimes, transposeTimes, transposeTimes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeatBlockMatrix

public RepeatBlockMatrix(AllMatrices M,
                         int vt,
                         int ht,
                         int rep)
Construct a Block matrix with given matrix M.

Parameters:
M - a matrix of any kind.
vt - vertikal translation.
ht - horizontal translation.
rep - number of reprtitions, =0 if unspecified.
Method Detail

get

public double get(int n,
                  int k)
Get a single element. The method is forwarded to getValue(...) in the correct submatrix.

Specified by:
get in class AllMatrices
Parameters:
n - Row index.
k - Column index.
Returns:
A(n,k)

set

public void set(int n,
                int k,
                double s)
Set a single element. The method is forwarded to setValue(...) in the correct submatrix.

Specified by:
set in class AllMatrices
Parameters:
n - Row index.
k - Column index.
s - A(n,k).