de.jtem.jtao
Class TaoMat

java.lang.Object
  extended by de.jtem.jpetsc.PrimitivNative
      extended by de.jtem.jpetsc.Native
          extended by de.jtem.jtao.TaoMat

public class TaoMat
extends Native


Nested Class Summary
static class TaoMat.GetDimensionsResult
          Result class for getDimensions()
 
Field Summary
 
Fields inherited from class de.jtem.jpetsc.PrimitivNative
destroyNative
 
Method Summary
 void addDiagonal(TaoVec tv)
          Adds the elements of the vector to the diagonal of this matrix.
 void colScale(TaoVec scale)
          Scales the columns of this matrix.
 void d_Fischer(TaoVec tx, TaoVec tf, TaoVec tl, TaoVec tu, TaoVec tt1, TaoVec tt2, TaoVec tda, TaoVec tdb)
          Calculates an element of the B-subdifferential of the
Fischer-Burmeister function for complementarity problems.
 void d_SFischer(TaoVec tx, TaoVec tf, TaoVec tl, TaoVec tu, double mu, TaoVec tt1, TaoVec tt2, TaoVec tda, TaoVec tdb, TaoVec tdm)
          Calculates an element of the B-subdifferential of the
smoothed Fischer-Burmeister function for complementarity problems.
 void getDiagonal(TaoVec tv)
          Inserts the diagonal elements of this matrix into the vector.
 TaoMat.GetDimensionsResult getDimensions()
          Gets the dimensions of the rowspace and columnspace of this matrix.
 void multiply(TaoVec tx, TaoVec ty)
          Computes ty = this * tx.
 void multiplyTranspose(TaoVec tx, TaoVec ty)
          Multiplies the transpose of this matrix by a TaoVec.
protected  void nativeCreate()
           
 double norm1()
          Computes the 1-norm of the matrix.
 void presolve()
          Prepares to solve a linear system with this matrix by
doing some initial setup (e.g., computing parts of a preconditioner,
such as matrix factorization).
 void rowScale(TaoVec scale)
          Scales the rows of this matrix.
 void setDiagonal(TaoVec tv)
          Sets the diagonal elements of this matrix with the elements
of the vector.
 void shiftDiagonal(double c)
          Adds this constant to the diagonal elements of this matrix.
 boolean solve(TaoVec tb, TaoVec tx)
          Solves the linear system $this tx = tb$.
static void TaoMatDestroy(TaoMat TM)
          Destroys the TaoMat object.
 void view()
          Views the contents of this matrix.
 
Methods inherited from class de.jtem.jpetsc.PrimitivNative
finalize, getNativeObjectToString, load, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

nativeCreate

protected void nativeCreate()
Specified by:
nativeCreate in class Native

TaoMatDestroy

public static void TaoMatDestroy(TaoMat TM)
Destroys the TaoMat object.

Parameters:
TM - the matrix

getDimensions

public TaoMat.GetDimensionsResult getDimensions()
Gets the dimensions of the rowspace and columnspace of this matrix.

Returns:
TaoMat.GetDimensionsResult

multiply

public void multiply(TaoVec tx,
                     TaoVec ty)
Computes ty = this * tx.

Parameters:
tx - the vector to be multiplied by this matrix.
ty -
See Also:
TaoMat, MultiplyAdd, TaoMat, MultiplyTranspose

multiplyTranspose

public void multiplyTranspose(TaoVec tx,
                              TaoVec ty)
Multiplies the transpose of this matrix by a TaoVec.

Parameters:
tx - the vector to be multiplied by this matrix.
ty -
See Also:
TaoMat, Multiply, TaoMat, MultiplyTransposeAdd

setDiagonal

public void setDiagonal(TaoVec tv)
Sets the diagonal elements of this matrix with the elements
of the vector.

Parameters:
tv - the vector containing the diagonal elements
See Also:
TaoMat, AddDiagonal, TaoMat, ShiftDiagonal

addDiagonal

public void addDiagonal(TaoVec tv)
Adds the elements of the vector to the diagonal of this matrix.

Parameters:
tv - the vector containing the diagonal elements
See Also:
TaoMat, SetDiagonal, TaoMat, ShiftDiagonal

getDiagonal

public void getDiagonal(TaoVec tv)
Inserts the diagonal elements of this matrix into the vector.

Parameters:
tv -
See Also:
TaoMat, SetDiagonal

shiftDiagonal

public void shiftDiagonal(double c)
Adds this constant to the diagonal elements of this matrix.

Parameters:
c - the constant
See Also:
TaoMat, SetDiagonal, TaoMat, AddDiagonal

presolve

public void presolve()
Prepares to solve a linear system with this matrix by
doing some initial setup (e.g., computing parts of a preconditioner,
such as matrix factorization).

See Also:
TaoMat, Solve

solve

public boolean solve(TaoVec tb,
                     TaoVec tx)
Solves the linear system $this tx = tb$.

Parameters:
tb - right hand side
tx -
Returns:
TAO_TRUE if solved to prescribed accuracy and TAO_FALSE otherwise
See Also:
TaoApplication, GetLinearSolver, TaoMat, Presolve

rowScale

public void rowScale(TaoVec scale)
Scales the rows of this matrix.

Parameters:
scale - the scaling parameters

colScale

public void colScale(TaoVec scale)
Scales the columns of this matrix.

Parameters:
scale - the scaling parameters

d_Fischer

public void d_Fischer(TaoVec tx,
                      TaoVec tf,
                      TaoVec tl,
                      TaoVec tu,
                      TaoVec tt1,
                      TaoVec tt2,
                      TaoVec tda,
                      TaoVec tdb)
Calculates an element of the B-subdifferential of the
Fischer-Burmeister function for complementarity problems.

Parameters:
tx - current point
tf - function evaluated at tx
tl - lower bounds
tu - upper bounds
tt1 - work vector
tt2 - work vector
tda -
tdb -
See Also:
TaoVec, Fischer

d_SFischer

public void d_SFischer(TaoVec tx,
                       TaoVec tf,
                       TaoVec tl,
                       TaoVec tu,
                       double mu,
                       TaoVec tt1,
                       TaoVec tt2,
                       TaoVec tda,
                       TaoVec tdb,
                       TaoVec tdm)
Calculates an element of the B-subdifferential of the
smoothed Fischer-Burmeister function for complementarity problems.

Parameters:
tx - current point
tf - function evaluated at tx
tl - lower bounds
tu - upper bounds
mu - smoothing parameter
tt1 - work vector
tt2 - work vector
tda -
tdb -
tdm -
See Also:
TaoVec, SFischer

view

public void view()
Views the contents of this matrix.


norm1

public double norm1()
Computes the 1-norm of the matrix.

Returns:
matrix 1-norm value