SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative
Class IterativeSolver.Problem

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.IterativeSolver.Problem
Enclosing interface:
IterativeSolver

public static class IterativeSolver.Problem
extends java.lang.Object

This class models the problem of solving a system of linear equations (Ax = b) using an iterative method.


Constructor Summary
IterativeSolver.Problem(Matrix A, Vector b)
          Create the problem of solving Ax = b.
 
Method Summary
 Matrix A()
          Get the coefficient matrix of the problem.
 Vector b()
          Get the right-hand side vector of the problem.
 Vector initialGuess()
          Get the initial guess of the solution for the problem.
 IterativeSolver.Problem initialGuess(Vector initialGuess)
          Override the initial guess of the solution.
 Preconditioner leftPreconditioner()
          Get the left preconditioner.
 IterativeSolver.Problem leftPreconditioner(Preconditioner preconditioner)
          Override the left preconditioner.
 int maxIteration()
          Get the specified maximum number of iterations.
 IterativeSolver.Problem maxIteration(int maxIteration)
          Override the maximum count of iterations.
 Preconditioner rightPreconditioner()
          Get the right preconditioner.
 IterativeSolver.Problem rightPreconditioner(Preconditioner preconditioner)
          Override the right preconditioner.
 Tolerance tolerance()
          Get the specified Tolerance instance.
 IterativeSolver.Problem tolerance(Tolerance tolerance)
          Override the tolerance instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterativeSolver.Problem

public IterativeSolver.Problem(Matrix A,
                               Vector b)
Create the problem of solving Ax = b.

The default values of other optional parameters are:

Parameters:
A - the n-by-n coefficient matrix
b - the right-hand side n-vector
Method Detail

A

public Matrix A()
Get the coefficient matrix of the problem.

Returns:
the coefficient matrix

b

public Vector b()
Get the right-hand side vector of the problem.

Returns:
the right-hand side

maxIteration

public IterativeSolver.Problem maxIteration(int maxIteration)
Override the maximum count of iterations.

Parameters:
maxIteration - the maximum count of iterations
Returns:
the new problem with the overriden maximum count of iterations

maxIteration

public int maxIteration()
Get the specified maximum number of iterations.

Returns:
the maximum number of iterations

tolerance

public IterativeSolver.Problem tolerance(Tolerance tolerance)
Override the tolerance instance.

Parameters:
tolerance - the criteria which determines when the solution converges and the iteration stops
Returns:
the new problem with the overriden tolerance

tolerance

public Tolerance tolerance()
Get the specified Tolerance instance.

Returns:
the Tolerance instance

initialGuess

public IterativeSolver.Problem initialGuess(Vector initialGuess)
Override the initial guess of the solution.

Parameters:
initialGuess - the initial guess of the solution
Returns:
the new problem with the overriden initial guess

initialGuess

public Vector initialGuess()
Get the initial guess of the solution for the problem.

Returns:
the initial guess

leftPreconditioner

public IterativeSolver.Problem leftPreconditioner(Preconditioner preconditioner)
Override the left preconditioner. If right-preconditioning is used, leave this as its default value - IdentityPreconditioner.

Parameters:
preconditioner - the preconditioner
Returns:
the new problem with the overriden left preconditioner

leftPreconditioner

public Preconditioner leftPreconditioner()
Get the left preconditioner.

Returns:
the left preconditioner

rightPreconditioner

public IterativeSolver.Problem rightPreconditioner(Preconditioner preconditioner)
Override the right preconditioner. If left-preconditioning is used, leave this as its default value - IdentityPreconditioner.

Parameters:
preconditioner - the preconditioner
Returns:
the new problem with the overriden right preconditioner

rightPreconditioner

public Preconditioner rightPreconditioner()
Get the right preconditioner.

Returns:
the right preconditioner

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.