<<<<<<<<<<<<<<<<<

lu_solver(numer) Numerical Analysis lu_solver(numer)

NAME

lu_solver - Linear system solver

DESCRIPTION

The lu_solver class provides the solution of system of linear equations.

SUPERCLASS

object

INSTANCE VARIABLES

matrix is the matrix of linear system.

vector is the right side column vector of the linear system.

solution is the solution vector of the linear system.

index is the permutation index in LU decomposition method. See Numerical Recipes in C, by W.H.Press, et all, Cambridge University Press, 1988.

lu is the decomposed matrix. See previous reference.

vv is the implicit scaling vector in LU decomposition method. See previous reference.

m_dimension is the dimension of the matrix.

v_dimension is the dimension of the vector, should be equal to the m_dimension.

d_flag is the decomposition flag. It is set to false (0) when a new matrix is specified and is set to true (1) when decompose! method is performed.

s_flag is the solution flag. It is set to false (0) when new matrix or vector is specified and is set to true (1) when solve! method is performed.

MESSAGES

decompose! performs LU decomposition of the matrix.

d_flag? returns the d_flag value.

index? returns the index vector.

lu? returns the lu (LU decomposed) matrix.

matrix? returns the matrix of linear system.

matrix=argument sets the matrix instance variable.

m_dimension?

returns m_dimension. solve! solves the linear system.

solution? returns the solution vector.

s_flag? returns the s_flag.

vector=arguments sets the vector of the linear system.

vector? returns the vector.

vv? returns the vv vector.

v_dimension? returns the v_dimension.

EXAMPLES

lu_solver new: my_solver

matrix = (1,2,3,4,5,6,7,8,9)

vector= (10,11,12)

solve!

print:solution

my_solver: solution= (-0.999999,-7.000003,8.333335)

vector= (11,12,13)

solve!

print:solution

my_solver: solution= (0.000000,-10.000001,10.333334)

matrix=(1,2,3,4)

vector= (5,6)

solve!

print:solution;

my_solver: solution= (-4.000000,4.500000)

SEE ALSO

rk4_solver, rk4_stepper, rk_shooter, rkqc_stepper, rkqc_solver.


Please send comments and suggestions to
consult@rpi.edu