changeset 7201:76341ffda11e

[project @ 2007-11-27 18:23:48 by jwe]
author jwe
date Tue, 27 Nov 2007 18:23:48 +0000
parents 12a12ef1f1bc
children ffdbdf53665c
files scripts/linear-algebra/housh.m scripts/linear-algebra/krylov.m src/ov-intx.h
diffstat 3 files changed, 32 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/linear-algebra/housh.m	Tue Nov 27 05:51:46 2007 +0000
+++ b/scripts/linear-algebra/housh.m	Tue Nov 27 18:23:48 2007 +0000
@@ -19,15 +19,37 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {[@var{housv}, @var{beta}, @var{zer}] =} housh (@var{x}, @var{j}, @var{z})
-## Computes householder reflection vector housv to reflect x to be
-## jth column of identity, i.e., (I - beta*housv*housv')x =e(j)
-## inputs
-##   x: vector
-##   j: index into vector
-##   z: threshold for zero  (usually should be the number 0)
-## outputs: (see Golub and Van Loan)
-##   beta: If beta = 0, then no reflection need be applied (zer set to 0)
-##   housv: householder vector
+## Compute Householder reflection vector @var{housv} to reflect @var{x}
+## to be the jth column of identity, i.e.,
+##
+## @example
+## @group
+## (I - beta*housv*housv')x =  norm(x)*e(j) if x(1) < 0,
+## (I - beta*housv*housv')x = -norm(x)*e(j) if x(1) >= 0
+## @end group
+## @end example
+##
+## @noindent
+## Inputs
+##
+## @table @var
+## @item x
+## vector
+## @item j
+## index into vector
+## @item z
+## threshold for zero  (usually should be the number 0)
+## @end table
+##
+## @noindent
+## Outputs (see Golub and Van Loan):
+##
+## @table @var
+## @item beta
+## If beta = 0, then no reflection need be applied (zer set to 0)
+## @item housv
+## householder vector
+## @end table
 ## @end deftypefn
 
 ## Author: A. S. Hodel
--- a/scripts/linear-algebra/krylov.m	Tue Nov 27 05:51:46 2007 +0000
+++ b/scripts/linear-algebra/krylov.m	Tue Nov 27 18:23:48 2007 +0000
@@ -73,7 +73,7 @@
     error ("A(%d x %d) must be square", rows (A), columns (A));
   endif
 
-  [m, kb] = size(V);
+  [m, kb] = size (V);
   if (m != na)
     error("A(%d x %d), V(%d x %d): argument dimensions do not match",
 	  na, na, m, kb)
--- a/src/ov-intx.h	Tue Nov 27 05:51:46 2007 +0000
+++ b/src/ov-intx.h	Tue Nov 27 18:23:48 2007 +0000
@@ -365,7 +365,6 @@
 
   double scalar_value (bool = false) const { return scalar.double_value (); }
 
-
   Matrix
   matrix_value (bool = false) const
     {