Navigation

Operators and Keywords

Function List:

C++ API

pcr.m File Reference


Functions

 if (nargin< 6||isempty(x0)) x
endif if (isnumeric(a)) r
endif if (isnumeric(m)) if(isempty(m)) p
endif resvec (1)
 while (resvec(iter-1) > tol *resvec(1)&&iter< maxit) if(isnumeric(m)) if(isempty(m)) s
 if (b_bot==0.0) breakdown
id q ()
 resvec (iter)
 if (iter >=maxit-2) flag

Variables

 function [x, flag, relres, iter, resvec]
else x = x0
else r = b - feval (a, x, varargin{:})
else p = m \ r
endif iter = 2
 b_bot_old = 1
 q_old = p_old = s_old = zeros (size (x))
else q = feval (a, p, varargin{:})
else s = m \ q
endif b_top = r' * s
 b_bot = q' * s
 break
endif lambda = b_top / b_bot
else t = feval (a, s, varargin{:})
endif alpha0 = (t'*s) / b_bot
 alpha1 = (t'*s_old) / b_bot_old
 p_temp = p
 q_temp = q
 s_old = s
 p_old = p_temp
endwhile flag = 0
 relres = resvec(iter-1) ./ resvec(1)

Function Documentation

if ( iter >=maxit 2  ) 

if ( b_bot  = =0.0  ) 

endif if ( isnumeric(m)   ) 

endif if ( isnumeric(a)   ) 

if (  ) 

id q (  )  [virtual]

resvec ( iter   ) 

endif resvec (  ) 

while ( resvec(iter-1)   ) 


Variable Documentation

endif alpha0 = (t'*s) / b_bot

b_bot = q' * s

b_bot_old = 1

endif b_top = r' * s

break

function[x, flag, relres, iter, resvec]

Initial value:

 pcr (a, b, tol, maxit, m, x0, varargin)

  breakdown = false

endif iter = 2

p = m \ r

p_temp = p

q = feval (a, p, varargin{:})

q_old = p_old = s_old = zeros (size (x))

q_temp = q

else r = b - feval (a, x, varargin{:})

relres = resvec(iter-1) ./ resvec(1)

endif else s = m \ q

s_old = s

else t = feval (a, s, varargin{:})

else x = x0