[pure-lang-svn] SF.net SVN: pure-lang:[863] pure/trunk
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-09-25 10:53:00
|
Revision: 863
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=863&view=rev
Author: agraef
Date: 2008-09-25 10:52:57 +0000 (Thu, 25 Sep 2008)
Log Message:
-----------
Cosmetic changes.
Modified Paths:
--------------
pure/trunk/examples/gauss.pure
pure/trunk/pure.1.in
Modified: pure/trunk/examples/gauss.pure
===================================================================
--- pure/trunk/examples/gauss.pure 2008-09-25 10:48:21 UTC (rev 862)
+++ pure/trunk/examples/gauss.pure 2008-09-25 10:52:57 UTC (rev 863)
@@ -26,7 +26,8 @@
i and p accordingly and return the result. */
step (p,i,x) j
-= if max_x>0 then
+= if max_x==0 then p,i,x
+ else
// updated row permutation and index:
transp i max_i p, i+1,
{// the top rows of the matrix remain unchanged:
@@ -35,7 +36,6 @@
{x!(i,l)/x!(i,j) | l=0..m-1};
// subtract suitable multiples of the pivot row:
{x!(k,l)-x!(k,j)*x!(i,l)/x!(i,j) | k=i+1..n-1; l=0..m-1}}
- else p,i,x
when
n,m = dim x; max_i, max_x = pivot i (col x j);
x = if max_x>0 then swap x i max_i else x;
Modified: pure/trunk/pure.1.in
===================================================================
--- pure/trunk/pure.1.in 2008-09-25 10:48:21 UTC (rev 862)
+++ pure/trunk/pure.1.in 2008-09-25 10:52:57 UTC (rev 863)
@@ -1261,7 +1261,8 @@
// One pivoting and elimination step in column j of the matrix:
step (p,i,x) j
-= \fBif\fP max_x>0 \fBthen\fP
+= \fBif\fP max_x==0 \fBthen\fP p,i,x
+ \fBelse\fP
// updated row permutation and index:
transp i max_i p, i+1,
{// the top rows of the matrix remain unchanged:
@@ -1270,7 +1271,6 @@
{x!(i,l)/x!(i,j) | l=0..m-1};
// subtract suitable multiples of the pivot row:
{x!(k,l)-x!(k,j)*x!(i,l)/x!(i,j) | k=i+1..n-1; l=0..m-1}}
- \fBelse\fP p,i,x
\fBwhen\fP
n,m = dim x; max_i, max_x = pivot i (col x j);
x = \fBif\fP max_x>0 \fBthen\fP swap x i max_i \fBelse\fP x;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|