Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
17
Добавлен:
09.02.2015
Размер:
239.1 Кб
Скачать

Xreginterprbf/cond

Reference page in Help browser

doc cond

<condest> - 1-norm condition number estimate.

CONDEST 1-norm condition number estimate.

C = CONDEST(A) computes a lower bound C for the 1-norm condition

number of a square matrix A.

C = CONDEST(A,T) changes T, a positive integer parameter equal to

the number of columns in an underlying iteration matrix. Increasing the

number of columns usually gives a better condition estimate but increases

the cost. The default is T = 2, which almost always gives an estimate

correct to within a factor 2.

[C,V] = CONDEST(A) also computes a vector V which is an approximate null

vector if C is large. V satisfies NORM(A*V,1) = NORM(A,1)*NORM(V,1)/C.

Note: CONDEST invokes RAND. If repeatable results are required, then

see RAND for details on how to set the default stream state.

CONDEST is based on the 1-norm condition estimator of Hager [1] and a

block oriented generalization of Hager's estimator given by Higham and

Tisseur [2]. The heart of the algorithm involves an iterative search

to estimate ||A^{-1}||_1 without computing A^{-1}. This is posed as the

convex, but nondifferentiable, optimization problem:

max ||A^{-1}x||_1 subject to ||x||_1 = 1.

See also normest1, cond, norm, rand.

Overloaded methods:

Xreginterprbf/condest

Reference page in Help browser

doc condest

<normest1> - 1-norm estimate.

NORMEST1 Estimate of 1-norm of matrix by block 1-norm power method.

C = NORMEST1(A) returns an estimate C of norm(A,1), where A is N-by-N.

A can be an explicit matrix or a function AFUN such that

FEVAL(@AFUN,FLAG,X) for the following values of

FLAG returns

'dim' N

'real' 1 if A is real, 0 otherwise

'notransp' A*X

'transp' A'*X

C = NORMEST1(A,T) changes the number of columns in the iteration matrix

from the default 2. Choosing T <= N/4 is recommended, otherwise it should

be cheaper to form the norm exactly from the elements of A, as is done

when N <= 4 or T == N. If T < 0 then ABS(T) columns are used and trace

information is printed. If T is given as the empty matrix ([]) then the

default T is used.

C = NORMEST1(A,T,X0) specifies a starting matrix X0 with columns of unit

1-norm and by default is random for T > 1. If X0 is given as the empty

matrix ([]) then the default X0 is used.

C = NORMEST1(AFUN,T,X0,P1,P2,...) passes extra inputs P1,P2,... to

FEVAL(@AFUN,FLAG,X,P1,P2,...).

[C,V] = NORMEST1(A,...) and [C,V,W] = NORMEST1(A,...) also return vectors

V and W such that W = A*V and NORM(W,1) = C*NORM(V,1).

[C,V,W,IT] = NORMEST1(A,...) also returns a vector IT such that

IT(1) is the number of iterations,

IT(2) is the number of products of N-by-N by N-by-T matrices.

On average, IT(2) = 4.

Note: NORMEST1 invokes RAND. If repeatable results are required, then

see RAND for details on how to set the default stream state.

See also condest, cond, norm, rand.

<chol> - Cholesky factorization.

CHOL Cholesky factorization.

CHOL(A) uses only the diagonal and upper triangle of A.

The lower triangle is assumed to be the (complex conjugate)

transpose of the upper triangle. If A is positive definite, then

R = CHOL(A) produces an upper triangular R so that R'*R = A.

If A is not positive definite, an error message is printed.

L = CHOL(A,'lower') uses only the diagonal and the lower triangle

of A to produce a lower triangular L so that L*L' = A. If

A is not positive definite, an error message is printed. When

A is sparse, this syntax of CHOL is typically faster.

[R,p] = CHOL(A), with two output arguments, never produces an

error message. If A is positive definite, then p is 0 and R

is the same as above. But if A is not positive definite, then

p is a positive integer.

When A is full, R is an upper triangular matrix of order q = p-1

so that R'*R = A(1:q,1:q).

When A is sparse, R is an upper triangular matrix of size q-by-n

so that the L-shaped region of the first q rows and first q

columns of R'*R agree with those of A.

[L,p] = CHOL(A,'lower'), functions as described above, only a lower

triangular matrix L is produced. That is, when A is full, L is a

lower triangular matrix of order q = p-1 so that L*L' = A(1:q,1:q).

When A is sparse, L is a lower triangular matrix of size n-by-q

so that the L-shaped region of the first q rows and first q columns

of L*L' agree with those of A.

[R,p,S] = CHOL(A), when A is sparse, returns a permutation matrix

S which is a preordering of A obtained by AMD. When p = 0, R is an

upper triangular matrix such that R'*R = S'*A*S. When p is not zero,

R is an upper triangular matrix of size q-by-n so that the L-shaped

region of the first q rows and first q columns of R'*R agree with

those of S'*A*S. The factor of S'*A*S tends to be sparser than the

factor of A.

[R,p,s] = CHOL(A,'vector') returns the permutation information as

a vector s such that A(s,s) = R'*R, when p = 0. The flag 'matrix'

may be used in place of 'vector' to obtain the default behavior.

[L,p,s] = CHOL(A,'lower','vector') uses only the diagonal and the

lower triangle of A and returns a lower triangular matrix L and

a permutation vector s such that A(s,s) = L*L', when p = 0.

As above, 'matrix' may be used in place of 'vector' to obtain a

permutation matrix.

For sparse A, CHOLMOD is used to compute the Cholesky factor.

See also amd, cholinc, cholupdate, ldl.

Overloaded methods:

codistributed/chol

Reference page in Help browser

doc chol

<cholinc> - Incomplete Cholesky factorization.

CHOLINC Sparse Incomplete Cholesky and Cholesky-Infinity factorizations.

CHOLINC produces two different kinds of incomplete Cholesky factorizations

-- the drop tolerance and the 0 level of fill-in factorizations. These

factors may be useful as preconditioners for a symmetric positive definite

system of linear equations being solved by an iterative method such as PCG

(Preconditioned Conjugate Gradients).

R = CHOLINC(X,DROPTOL) performs the incomplete Cholesky factorization of

X, with drop tolerance DROPTOL.

R = CHOLINC(X,OPTS) allows additional options to the incomplete Cholesky

factorization. OPTS is a structure with up to three fields:

DROPTOL --- the drop tolerance of the incomplete factorization

MICHOL --- modified incomplete Cholesky

RDIAG --- replace zeros on the diagonal of R

Only the fields of interest need to be set.

DROPTOL is a non-negative scalar used as the drop tolerance for the

incomplete Cholesky factorization. This factorization is computed by

performing the incomplete LU factorization with the pivot threshold option

set to 0 (which forces diagonal pivoting) and then scaling the rows of the

incomplete upper triangular factor, U, by the square root of the

diagonal entries in that column. Since the nonzero entries U(I,J) are

bounded below by DROPTOL*NORM(X(:,J)) (see LUINC), the nonzero

entries R(I,J) are bounded below by DROPTOL*NORM(X(:,J))/R(I,I).

Setting DROPTOL = 0 produces the complete Cholesky factorization,

which is the default.

MICHOL stands for modified incomplete Cholesky factorization. Its

value is either 0 (unmodified, the default) or 1 (modified). This

performs the modified incomplete LU factorization of X and then scales

the returned upper triangular factor as described above.

RDIAG is either 0 or 1. If it is 1, any zero diagonal entries

of the upper triangular factor R are replaced by the square root of

the local drop tolerance in an attempt to avoid a singular factor. The

default is 0.

Example:

A = delsq(numgrid('C',25));

nnz(A)

nnz(chol(A))

nnz(cholinc(A,1e-3))

This shows that A has 2063 nonzeros, its complete Cholesky factorization

has 8513 nonzeros, and its incomplete Cholesky factorization with a

drop tolerance of 1e-3 has 4835 nonzeros.

R = CHOLINC(X,'0') produces the incomplete Cholesky factor of a real

symmetric positive definite sparse matrix with 0 level of fill-in (i.e. no

fill-in). The upper triangular R has the same sparsity pattern as

triu(X), although R may be zero in some positions where X is nonzero due

to cancellation. The lower triangle of X is assumed to be the transpose

of the upper. Note that the positive definiteness of X does not guarantee

the existence of a factor with the required sparsity. An error message

results if the factorization is not possible. R'*R agrees with X over its

sparsity pattern.

[R,p] = CHOLINC(X,'0'), with two output arguments, never produces an

error message. If R exists, then p is 0. But if the incomplete

factor does not exist, then p is a positive integer and R is an upper

triangular matrix of size q-by-n where q = p-1 so that the sparsity

pattern of R is that of the q-by-n upper triangle of X. R'*R agrees with

X over the sparsity pattern of its first q rows and first q columns.

Example:

A = delsq(numgrid('N',10));

R = cholinc(A,'0');

isequal(spones(R), spones(triu(A)))

A(8,8) = 0;

[R2,p] = cholinc(A,'0');

isequal(spones(R2), spones(triu(A(1:p-1,:))))

D = (R'*R) .* spones(A) - A;

D has entries of the order of eps.

R = CHOLINC(X,'inf') produces the Cholesky-Infinity factorization. This

factorization is based on the Cholesky factorization, and handles real

positive semi-definite matrices as well. It may be useful for finding

some sort of solution to systems which arise in primal-dual interior-point

method problems. When a zero pivot is encountered in the ordinary

Cholesky factorization, the diagonal of the Cholesky-Infinity factor is set

to Inf and the rest of that row is set to 0. This is designed to force a 0

in the corresponding entry of the solution vector in the associated system

of linear equations. In practice, X is assumed to be positive

semi-definite so even negative pivots are replaced by Inf.

Example: This symmetric sparse matrix is singular, so the Cholesky

factorization fails at the zero pivot in the third row. But cholinc

succeeds in computing all rows of the Cholesky-Infinity factorization.

S = sparse([ 1 0 3 0;

0 25 0 30;

3 0 9 0;

0 30 0 661 ]);

[R,p] = chol(S);

Rinf = cholinc(S,'inf');

CHOLINC works only for sparse matrices.

See also chol, luinc, pcg.

Reference page in Help browser

doc cholinc

<ldl> - Block LDL' factorization.

LDL Block LDL' factorization for Hermitian indefinite matrices.

Assuming that A is a Hermitian matrix (that is, A == A'),

[L,D] = LDL(A) stores a block diagonal matrix D and a "psychologically

lower triangular matrix" (i.e. a product of unit lower triangular and

permutation matrices) in L so that A = L*D*L'. The block diagonal matrix

D has 1x1 and 2x2 blocks on its diagonal. This syntax is not valid for

sparse A.

[L,D,P] = LDL(A) returns unit lower triangular matrix L, block diagonal D,

and permutation matrix P so that P'*A*P = L*D*L'. This is equivalent

to [L,D,P] = LDL(A,'matrix').

[L,D,p] = LDL(A,'vector') returns the permutation information as a

Соседние файлы в папке Библиотеки Matlab