aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-09-20 06:29:26 +0000
committerdos-reis <gdr@axiomatics.org>2011-09-20 06:29:26 +0000
commit255be06767355e3b41acd75990c6b90270b8f2bd (patch)
tree0a032d40d7cb2213e206d70beb23dc74ccf4a230 /src/algebra
parent12c856f9901ef3d6d82fb99855ecdf3e0b91484b (diff)
downloadopen-axiom-255be06767355e3b41acd75990c6b90270b8f2bd.tar.gz
* algebra/asp.spad.pamphlet: Remove.
* algebra/c02.spad.pamphlet: Likewise. * algebra/c05.spad.pamphlet: Likewise. * algebra/c06.spad.pamphlet: Likewise. * algebra/d01.spad.pamphlet: Likewise. * algebra/d02.spad.pamphlet: Likewise. * algebra/d03.spad.pamphlet: Likewise. * algebra/e01.spad.pamphlet: Likewise. * algebra/e02.spad.pamphlet: Likewise. * algebra/e04.spad.pamphlet: Likewise. * algebra/f01.spad.pamphlet: Likewise. * algebra/f02.spad.pamphlet: Likewise. * algebra/f04.spad.pamphlet: Likewise. * algebra/f07.spad.pamphlet: Likewise. * algebra/s.spad.pamphlet: Likewise. * algebra/d01Package.spad.pamphlet: Likewise. * algebra/d02Package.spad.pamphlet: Likewise. * algebra/d03Package.spad.pamphlet: Likewise. * algebra/e04Package.spad.pamphlet: Likewise. * algebra/d01agents.spad.pamphlet: Likewise. * algebra/d01routine.spad.pamphlet: Likewise. * algebra/d01transform.spad.pamphlet: Likewise. * algebra/d01weights.spad.pamphlet: Likewise. * algebra/d02agents.spad.pamphlet: Likewise. * algebra/d02routine.spad.pamphlet: Likewise. * algebra/d03agents.spad.pamphlet: Likewise. * algebra/d03routine.spad.pamphlet: Likewise. * algebra/e04agents.spad.pamphlet: Likewise. * algebra/e04routine.spad.pamphlet: Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.in56
-rw-r--r--src/algebra/c02.spad.pamphlet131
-rw-r--r--src/algebra/c05.spad.pamphlet176
-rw-r--r--src/algebra/c06.spad.pamphlet339
-rw-r--r--src/algebra/d01.spad.pamphlet447
-rw-r--r--src/algebra/d01Package.spad.pamphlet559
-rw-r--r--src/algebra/d01agents.spad.pamphlet428
-rw-r--r--src/algebra/d01routine.spad.pamphlet746
-rw-r--r--src/algebra/d01transform.spad.pamphlet212
-rw-r--r--src/algebra/d01weights.spad.pamphlet309
-rw-r--r--src/algebra/d02.spad.pamphlet483
-rw-r--r--src/algebra/d02Package.spad.pamphlet457
-rw-r--r--src/algebra/d02agents.spad.pamphlet423
-rw-r--r--src/algebra/d02routine.spad.pamphlet424
-rw-r--r--src/algebra/d03.spad.pamphlet196
-rw-r--r--src/algebra/d03Package.spad.pamphlet307
-rw-r--r--src/algebra/d03agents.spad.pamphlet150
-rw-r--r--src/algebra/d03routine.spad.pamphlet164
-rw-r--r--src/algebra/e01.spad.pamphlet329
-rw-r--r--src/algebra/e02.spad.pamphlet588
-rw-r--r--src/algebra/e04.spad.pamphlet398
-rw-r--r--src/algebra/e04Package.spad.pamphlet448
-rw-r--r--src/algebra/e04agents.spad.pamphlet311
-rw-r--r--src/algebra/e04routine.spad.pamphlet687
-rw-r--r--src/algebra/exposed.lsp.pamphlet85
-rw-r--r--src/algebra/f01.spad.pamphlet343
-rw-r--r--src/algebra/f02.spad.pamphlet565
-rw-r--r--src/algebra/f04.spad.pamphlet408
-rw-r--r--src/algebra/f07.spad.pamphlet182
29 files changed, 19 insertions, 10332 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index dd588899..cb018420 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -1092,7 +1092,6 @@ axiom_algebra_layer_8_nrlibs = \
axiom_algebra_layer_8_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_8)))
-$(OUT)/ODEIFTBL.$(FASLEXT): $(OUT)/TABLE.$(FASLEXT) $(OUT)/INTABL.$(FASLEXT)
$(OUT)/FT.$(FASLEXT): $(OUT)/FST.$(FASLEXT)
axiom_algebra_layer_9 = \
@@ -1102,7 +1101,7 @@ axiom_algebra_layer_9 = \
OMLO ORTHPOL PRODUCT PADICCT PMPRED PMASS \
PTFUNC2 RATRET RADUTIL UPXS2 \
XFALG ZLINDEP BBTREE TABLE INTABL \
- ODEIFTBL NIPROB ODEPROB OPTPROB \
+ NIPROB ODEPROB OPTPROB \
PDEPROB SIG FMONCAT FST
@@ -1112,8 +1111,6 @@ axiom_algebra_layer_9_nrlibs = \
axiom_algebra_layer_9_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_9)))
-$(OUT)/D01GBFA.$(FASLEXT): $(OUT)/RESULT.$(FASLEXT) $(OUT)/ANY.$(FASLEXT) \
- $(OUT)/SEX.$(FASLEXT) $(OUT)/HASHTBL.$(FASLEXT)
$(OUT)/ANY.$(FASLEXT): $(OUT)/SEX.$(FASLEXT)
$(OUT)/SEX.$(FASLEXT): $(OUT)/SEXOF.$(FASLEXT)
@@ -1134,7 +1131,7 @@ $(OUT)/PATLRES.$(FASLEXT): $(OUT)/PATRES.$(FASLEXT)
axiom_algebra_layer_10 = \
RESULT BFUNCT BPADIC ANY \
SEXOF CRAPACK DEQUEUE DLIST \
- DRAWCX D01GBFA D02EJFA D03FAFA \
+ DRAWCX \
DRAWPT FAMR FAMR- FLASORT \
FLAGG2 FGROUP FM FM1 \
FPC FPC- FMONOID INDE \
@@ -1172,7 +1169,7 @@ $(OUT)/ARRAY2.$(FASLEXT): $(OUT)/IFARRAY.$(FASLEXT)
axiom_algebra_layer_11 = \
APPLYORE ARRAY1 ARRAY12 ARRAY2 \
ASTACK COMBINAT \
- CSTTOOLS D01FCFA E04MBFA FARRAY \
+ CSTTOOLS FARRAY \
FLALG GALUTIL HEAP \
IARRAY2 IFARRAY INTCAT INTHEORY \
IRREDFFX LFCAT LODOCAT LODOCAT- \
@@ -1210,8 +1207,7 @@ axiom_algebra_layer_13 = \
ASSOCEQ CARTEN CLIF CLIP \
UPOLYC UPOLYC- \
COORDSYS DBASE DHMATRIX DIOSP \
- D02BBFA D02BHFA \
- D02CJFA FAXF FAXF- FFPOLY2 \
+ FAXF FAXF- FFPOLY2 \
FNLA GRAY HB IRSN \
MCALCFN MHROWRED NUMODE NUMQUAD \
ODESYS ODETOOLS ORDFUNS PERMAN \
@@ -1236,11 +1232,8 @@ axiom_algebra_layer_14 = \
BPADICRT BRILL CDEN CHVAR \
COMMUPC CONTFRAC CVMP CYCLOTOM \
CYCLES DDFACT DECIMAL DISPLAY DMP \
- DPMO DPOLCAT DPOLCAT- D01AJFA \
- D01AKFA D01ALFA D01AMFA D01APFA \
- D01AQFA EMR EQ ERROR \
- EVALCYC E04DGFA E04FDFA E04GCFA \
- E04JAFA FACUTIL FF FFCG \
+ DPMO DPOLCAT DPOLCAT- EMR EQ ERROR \
+ EVALCYC FACUTIL FF FFCG \
FFCGX FFHOM FFNB FFNBX \
FFPOLY FFX FFSLPE FGLMICPK \
FILE FINAALG FINAALG- FINRALG \
@@ -1285,7 +1278,7 @@ axiom_algebra_layer_14 = \
UPXSCAT UPSQFREE VIEWDEF VIEW2D \
WEIER WP \
EQTBL GSTBL \
- INTFTBL STBL STRTBL\
+ STBL STRTBL\
SYMS SYMTAB \
IOBCON
@@ -1350,7 +1343,7 @@ axiom_algebra_layer_17_objects = \
$(OUT)/PSETCAT.$(FASLEXT): $(OUT)/RPOLCAT.$(FASLEXT)
axiom_algebra_layer_18 = \
- INTPACK IPF CATCTOR DOMCTOR CTORCALL \
+ IPF CATCTOR DOMCTOR CTORCALL \
KAFILE PATRES TBCMPPK PSETCAT PSETCAT- \
RPOLCAT RPOLCAT-
@@ -1368,8 +1361,7 @@ axiom_algebra_layer_19 = \
ACPLOT ANTISYM ATTRBUT \
COMPCAT \
COMPCAT- DRAW DRAWCFUN DROPT \
- DROPT0 D01ANFA D01ASFA D03AGNT \
- EP E04AGNT FCPAK1 FEXPR \
+ DROPT0 EP FCPAK1 FEXPR \
FFCAT FFCAT- FFCGP FFNBP \
FFP FLOAT FPARFRAC FR \
FRNAALG FRNAALG- EXPR \
@@ -1377,12 +1369,10 @@ axiom_algebra_layer_19 = \
IDEAL INFORM INFORM1 IPRNTPK \
IR ISUPS LIB \
LMDICT LODOOPS MKFLCFN \
- MSET M3D NAGC02 NAGC05 \
- NAGC06 NAGD03 NAGE01 NAGE02 \
- NAGE04 NAGF07 NAGS NAGSP \
+ MSET M3D \
NREP NUMFMT OC OC- \
- ODEPACK ODERAT \
- OPTPACK PATTERN OVAR \
+ ODERAT \
+ PATTERN OVAR \
PMKERNEL PMSYM PRIMELT \
QALGSET2 QEQUAT RECLOS REP1 \
QUATCAT QUATCAT- RFFACT \
@@ -1408,9 +1398,9 @@ axiom_algebra_layer_20 = \
AF ALGFACT ALGFF ALGMANIP ALGMFACT ALGPKG \
ALGSC AN APPRULE CINTSLPE COMPFACT COMPLEX \
COMPLPAT CMPLXRT CPMATCH CRFP \
- CTRIGMNP D01WGTS D02AGNT D03EEFA \
+ CTRIGMNP \
DBLRESP DERHAM DFSFUN DRAWCURV \
- E04NAFA E04UCFA EF EFSTRUC \
+ EF EFSTRUC \
ELFUTS ESTOOLS EXPEXPAN EXPRODE \
EXPRTUBE EXPR2 FC FDIVCAT \
FDIVCAT- FDIV2 FFCAT2 FLOATCP \
@@ -1423,11 +1413,10 @@ axiom_algebra_layer_20 = \
INTHERAL INTPAF INTPM INTTOOLS \
ITRIGMNP JORDAN KOVACIC LF \
LIE LODOF LSQM \
- MCMPLX MULTFACT NAGD01 NAGD02 \
- NAGF01 NAGF02 NAGF04 NCEP \
+ MCMPLX MULTFACT NCEP \
NLINSOL NSMP NUMERIC OCT \
OCTCT2 ODEPAL ODERTRIC PADE \
- PAN2EXPR PDEPACK PFO PFOQ \
+ PAN2EXPR PFO PFOQ \
PICOERCE PMASSFS PMFS PMPREDFS \
PSETPK QUAT QUATCT2 RADFF \
RDEEF RDEEFS RDIV RSETCAT \
@@ -1449,7 +1438,7 @@ $(OUT)/SULS.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/SUPXS.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
axiom_algebra_layer_21 = \
- DEFINTEF DFINTTLS DEFINTRF D01TRNS \
+ DEFINTEF DFINTTLS DEFINTRF \
EFULS ESCONT EXPR2UPS \
FDIV FSCINT FSINT FS2EXPXP \
GSERIES HELLFDIV INVLAPLA IR2F \
@@ -1465,7 +1454,7 @@ axiom_algebra_layer_21_objects = \
$(addprefix $(OUT)/, \
$(addsuffix .$(FASLEXT),$(axiom_algebra_layer_21)))
axiom_algebra_layer_22 = \
- COMBF D01AGNT FSPRMELT \
+ COMBF FSPRMELT \
INBFF LODO LODO1 LODO2 \
NTSCAT REGSET RGCHAIN RSETGCD \
RSDCMPK SFRTCAT SIGNEF SNTSCAT \
@@ -1499,12 +1488,7 @@ axiom_algebra_layer_user = \
QQUTAST DEFAST MACROAST SPADXPT SPADAST PARAMAST \
INBFILE OUTBFILE IOBFILE RGBCMDL RGBCSPC STEPAST \
CTOR IP4ADDR NETCLT INETCLTS \
- FMC FMFUN FORTFN FVC FVFUN ASP34 \
- ASP1 ASP10 ASP24 ASP4 ASP50 ASP6 \
- ASP73 ASP27 ASP28 ASP33 ASP49 ASP7 \
- ASP78 ASP9 ASP12 ASP55 ASP8 ASP19 \
- ASP20 ASP30 ASP31 ASP35 ASP41 ASP42 \
- ASP74 ASP77 ASP80 ASP29 IRFORM COMPILER \
+ FMC FMFUN FORTFN FVC FVFUN IRFORM COMPILER \
ITFORM ELABOR TALGOP YDIAGRAM LINELT DBASIS \
LINFORM LINBASIS JVMOP JVMCFACC JVMFDACC JVMMDACC \
JVMCSTTG
@@ -1579,8 +1563,6 @@ $(OUT)/NETCLT.$(FASLEXT): $(OUT)/IOBCON.$(FASLEXT)
$(OUT)/INETCLTS.$(FASLEXT): $(OUT)/NETCLT.$(FASLEXT)
-$(OUT)/ASP34.$(FASLEXT): $(OUT)/FMC.$(FASLEXT)
-
$(OUT)/IRFORM.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT)
$(OUT)/COMPILER.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) $(OUT)/ENV.$(FASLEXT)
$(OUT)/ITFORM.$(FASLEXT): $(OUT)/IRFORM.$(FASLEXT)
diff --git a/src/algebra/c02.spad.pamphlet b/src/algebra/c02.spad.pamphlet
deleted file mode 100644
index f20f2e9f..00000000
--- a/src/algebra/c02.spad.pamphlet
+++ /dev/null
@@ -1,131 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra c02.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGC02 NagPolynomialRootsPackage}
-<<package NAGC02 NagPolynomialRootsPackage>>=
-)abbrev package NAGC02 NagPolynomialRootsPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:27 1994
-++Description:
-++This package uses the NAG Library to compute the zeros of a
-++polynomial with real or complex coefficients.
-++See \downlink{Manual Page}{manpageXXc02}.
-
-NagPolynomialRootsPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- c02aff : (Matrix DoubleFloat,Integer,Boolean,Integer) -> Result
- ++ c02aff(a,n,scale,ifail)
- ++ finds all the roots of a complex polynomial equation,
- ++ using a variant of Laguerre's Method.
- ++ See \downlink{Manual Page}{manpageXXc02aff}.
- c02agf : (Matrix DoubleFloat,Integer,Boolean,Integer) -> Result
- ++ c02agf(a,n,scale,ifail)
- ++ finds all the roots of a real polynomial equation, using a
- ++ variant of Laguerre's Method.
- ++ See \downlink{Manual Page}{manpageXXc02agf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Matrix DoubleFloat
- import Any
- import Record
- import Integer
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Integer)
- import AnyFunctions1(Boolean)
- macro I == Integer
-
-
- c02aff(aArg:Matrix DoubleFloat,nArg:Integer,scaleArg:Boolean,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c02aff",_
- ["n"::S,"scale"::S,"ifail"::S,"a"::S,"z"::S,"w"::S]$Lisp,_
- ["z"::S,"w"::S]$Lisp,_
- [["double"::S,["a"::S,2$Lisp,["+"::S,"n"::S,1@I]$Lisp]$Lisp_
- ,["z"::S,2$Lisp,"n"::S]$Lisp,["w"::S,["*"::S,["+"::S,"n"::S,1@I]$Lisp,4$Lisp]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ,["logical"::S,"scale"::S]$Lisp_
- ]$Lisp,_
- ["z"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,scaleArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-
-
- c02agf(aArg:Matrix DoubleFloat,nArg:Integer,scaleArg:Boolean,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c02agf",_
- ["n"::S,"scale"::S,"ifail"::S,"a"::S,"z"::S,"w"::S]$Lisp,_
- ["z"::S,"w"::S]$Lisp,_
- [["double"::S,["a"::S,["+"::S,"n"::S,1@I]$Lisp]$Lisp_
- ,["z"::S,2$Lisp,"n"::S]$Lisp,["w"::S,["*"::S,["+"::S,"n"::S,1@I]$Lisp,2$Lisp]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ,["logical"::S,"scale"::S]$Lisp_
- ]$Lisp,_
- ["z"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,scaleArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGC02 NagPolynomialRootsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/c05.spad.pamphlet b/src/algebra/c05.spad.pamphlet
deleted file mode 100644
index 70a9a4f9..00000000
--- a/src/algebra/c05.spad.pamphlet
+++ /dev/null
@@ -1,176 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra c05.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGC05 NagRootFindingPackage}
-<<package NAGC05 NagRootFindingPackage>>=
-)abbrev package NAGC05 NagRootFindingPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:28 1994
-++Description:
-++This package uses the NAG Library to calculate real zeros of
-++continuous real functions of one or more variables. (Complex
-++equations must be expressed in terms of the equivalent larger
-++system of real equations.)
-++See \downlink{Manual Page}{manpageXXc05}.
-
-NagRootFindingPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- c05adf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
- Integer,Union(fn:FileName,fp:Asp1(F))) -> Result
- ++ c05adf(a,b,eps,eta,ifail,f)
- ++ locates a zero of a continuous function in a given
- ++ interval by a combination of the methods of linear interpolation,
- ++ extrapolation and bisection.
- ++ See \downlink{Manual Page}{manpageXXc05adf}.
- c05nbf : (Integer,Integer,Matrix DoubleFloat,DoubleFloat,_
- Integer,Union(fn:FileName,fp:Asp6(FCN))) -> Result
- ++ c05nbf(n,lwa,x,xtol,ifail,fcn)
- ++ is an easy-to-use routine to find a solution of a system
- ++ of nonlinear equations by a modification of the Powell hybrid
- ++ method.
- ++ See \downlink{Manual Page}{manpageXXc05nbf}.
- c05pbf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- DoubleFloat,Integer,Union(fn:FileName,fp:Asp35(FCN))) -> Result
- ++ c05pbf(n,ldfjac,lwa,x,xtol,ifail,fcn)
- ++ is an easy-to-use routine to find a solution of a system
- ++ of nonlinear equations by a modification of the Powell hybrid
- ++ method. The user must provide the Jacobian.
- ++ See \downlink{Manual Page}{manpageXXc05pbf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import FortranPackage
- import Union(fn:FileName,fp:Asp1(F))
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Integer)
-
-
- c05adf(aArg:DoubleFloat,bArg:DoubleFloat,epsArg:DoubleFloat,_
- etaArg:DoubleFloat,ifailArg:Integer,fArg:Union(fn:FileName,fp:Asp1(F))): Result ==
- pushFortranOutputStack(fFilename := aspFilename "f")$FOP
- if fArg case fn
- then outputAsFortran(fArg.fn)
- else outputAsFortran(fArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fFilename]$Lisp,_
- "c05adf",_
- ["a"::S,"b"::S,"eps"::S,"eta"::S,"x"::S_
- ,"ifail"::S,"f"::S]$Lisp,_
- ["x"::S,"f"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"eps"::S,"eta"::S_
- ,"x"::S,"f"::S]$Lisp_
- ,["integer"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,epsArg::Any,etaArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c05nbf(nArg:Integer,lwaArg:Integer,xArg:Matrix DoubleFloat,_
- xtolArg:DoubleFloat,ifailArg:Integer,fcnArg:Union(fn:FileName,fp:Asp6(FCN))): Result ==
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fcnFilename]$Lisp,_
- "c05nbf",_
- ["n"::S,"lwa"::S,"xtol"::S,"ifail"::S,"fcn"::S_
- ,"fvec"::S,"x"::S,"wa"::S]$Lisp,_
- ["fvec"::S,"wa"::S,"fcn"::S]$Lisp,_
- [["double"::S,["fvec"::S,"n"::S]$Lisp,["x"::S,"n"::S]$Lisp_
- ,"xtol"::S,["wa"::S,"lwa"::S]$Lisp,"fcn"::S]$Lisp_
- ,["integer"::S,"n"::S,"lwa"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["fvec"::S,"x"::S,"xtol"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,lwaArg::Any,xtolArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c05pbf(nArg:Integer,ldfjacArg:Integer,lwaArg:Integer,_
- xArg:Matrix DoubleFloat,xtolArg:DoubleFloat,ifailArg:Integer,_
- fcnArg:Union(fn:FileName,fp:Asp35(FCN))): Result ==
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fcnFilename]$Lisp,_
- "c05pbf",_
- ["n"::S,"ldfjac"::S,"lwa"::S,"xtol"::S,"ifail"::S_
- ,"fcn"::S,"fvec"::S,"fjac"::S,"x"::S,"wa"::S]$Lisp,_
- ["fvec"::S,"fjac"::S,"wa"::S,"fcn"::S]$Lisp,_
- [["double"::S,["fvec"::S,"n"::S]$Lisp,["fjac"::S,"ldfjac"::S,"n"::S]$Lisp_
- ,["x"::S,"n"::S]$Lisp,"xtol"::S,["wa"::S,"lwa"::S]$Lisp,"fcn"::S]$Lisp_
- ,["integer"::S,"n"::S,"ldfjac"::S,"lwa"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["fvec"::S,"fjac"::S,"x"::S,"xtol"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ldfjacArg::Any,lwaArg::Any,xtolArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGC05 NagRootFindingPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/c06.spad.pamphlet b/src/algebra/c06.spad.pamphlet
deleted file mode 100644
index 939d5294..00000000
--- a/src/algebra/c06.spad.pamphlet
+++ /dev/null
@@ -1,339 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra c06.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGC06 NagSeriesSummationPackage}
-<<package NAGC06 NagSeriesSummationPackage>>=
-)abbrev package NAGC06 NagSeriesSummationPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:30 1994
-++Description:
-++This package uses the NAG Library to calculate the discrete Fourier
-++transform of a sequence of real or complex data values, and
-++applies it to calculate convolutions and correlations.
-++See \downlink{Manual Page}{manpageXXc06}.
-
-NagSeriesSummationPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- c06eaf : (Integer,Matrix DoubleFloat,Integer) -> Result
- ++ c06eaf(n,x,ifail)
- ++ calculates the discrete Fourier transform of a sequence of
- ++ n real data values. (No extra workspace required.)
- ++ See \downlink{Manual Page}{manpageXXc06eaf}.
- c06ebf : (Integer,Matrix DoubleFloat,Integer) -> Result
- ++ c06ebf(n,x,ifail)
- ++ calculates the discrete Fourier transform of a Hermitian
- ++ sequence of n complex data values. (No extra workspace required.)
- ++ See \downlink{Manual Page}{manpageXXc06ebf}.
- c06ecf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ c06ecf(n,x,y,ifail)
- ++ calculates the discrete Fourier transform of a sequence of
- ++ n complex data values. (No extra workspace required.)
- ++ See \downlink{Manual Page}{manpageXXc06ecf}.
- c06ekf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Integer) -> Result
- ++ c06ekf(job,n,x,y,ifail)
- ++ calculates the circular convolution of two
- ++ real vectors of period n. No extra workspace is required.
- ++ See \downlink{Manual Page}{manpageXXc06ekf}.
- c06fpf : (Integer,Integer,String,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ c06fpf(m,n,init,x,trig,ifail)
- ++ computes the discrete Fourier transforms of m sequences,
- ++ each containing n real data values. This routine is designed to
- ++ be particularly efficient on vector processors.
- ++ See \downlink{Manual Page}{manpageXXc06fpf}.
- c06fqf : (Integer,Integer,String,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ c06fqf(m,n,init,x,trig,ifail)
- ++ computes the discrete Fourier transforms of m Hermitian
- ++ sequences, each containing n complex data values. This routine is
- ++ designed to be particularly efficient on vector processors.
- ++ See \downlink{Manual Page}{manpageXXc06fqf}.
- c06frf : (Integer,Integer,String,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ c06frf(m,n,init,x,y,trig,ifail)
- ++ computes the discrete Fourier transforms of m sequences,
- ++ each containing n complex data values. This routine is designed
- ++ to be particularly efficient on vector processors.
- ++ See \downlink{Manual Page}{manpageXXc06frf}.
- c06fuf : (Integer,Integer,String,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ c06fuf(m,n,init,x,y,trigm,trign,ifail)
- ++ computes the two-dimensional discrete Fourier transform of
- ++ a bivariate sequence of complex data values. This routine is
- ++ designed to be particularly efficient on vector processors.
- ++ See \downlink{Manual Page}{manpageXXc06fuf}.
- c06gbf : (Integer,Matrix DoubleFloat,Integer) -> Result
- ++ c06gbf(n,x,ifail)
- ++ forms the complex conjugate of n
- ++ data values.
- ++ See \downlink{Manual Page}{manpageXXc06gbf}.
- c06gcf : (Integer,Matrix DoubleFloat,Integer) -> Result
- ++ c06gcf(n,y,ifail)
- ++ forms the complex conjugate of a sequence of n data
- ++ values.
- ++ See \downlink{Manual Page}{manpageXXc06gcf}.
- c06gqf : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ c06gqf(m,n,x,ifail)
- ++ forms the complex conjugates,
- ++ each containing n data values.
- ++ See \downlink{Manual Page}{manpageXXc06gqf}.
- c06gsf : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ c06gsf(m,n,x,ifail)
- ++ takes m Hermitian sequences, each containing n data
- ++ values, and forms the real and imaginary parts of the m
- ++ corresponding complex sequences.
- ++ See \downlink{Manual Page}{manpageXXc06gsf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(String)
- import AnyFunctions1(Matrix DoubleFloat)
-
-
- c06eaf(nArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06eaf",_
- ["n"::S,"ifail"::S,"x"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-
- c06ebf(nArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06ebf",_
- ["n"::S,"ifail"::S,"x"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06ecf(nArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06ecf",_
- ["n"::S,"ifail"::S,"x"::S,"y"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["y"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"y"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,xArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06ekf(jobArg:Integer,nArg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06ekf",_
- ["job"::S,"n"::S,"ifail"::S,"x"::S,"y"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["y"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"job"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"y"::S,"ifail"::S]$Lisp,_
- [([jobArg::Any,nArg::Any,ifailArg::Any,xArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06fpf(mArg:Integer,nArg:Integer,initArg:String,_
- xArg:Matrix DoubleFloat,trigArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06fpf",_
- ["m"::S,"n"::S,"init"::S,"ifail"::S,"x"::S,"trig"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["x"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp_
- ,["trig"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["work"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ,["character"::S,"init"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"trig"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,initArg::Any,ifailArg::Any,xArg::Any,trigArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06fqf(mArg:Integer,nArg:Integer,initArg:String,_
- xArg:Matrix DoubleFloat,trigArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06fqf",_
- ["m"::S,"n"::S,"init"::S,"ifail"::S,"x"::S,"trig"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["x"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp_
- ,["trig"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["work"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ,["character"::S,"init"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"trig"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,initArg::Any,ifailArg::Any,xArg::Any,trigArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06frf(mArg:Integer,nArg:Integer,initArg:String,_
- xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,trigArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06frf",_
- ["m"::S,"n"::S,"init"::S,"ifail"::S,"x"::S,"y"::S,"trig"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["x"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp_
- ,["y"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp,["trig"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["work"::S,["*"::S,["*"::S,2$Lisp,"m"::S]$Lisp,"n"::S]$Lisp]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ,["character"::S,"init"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"y"::S,"trig"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,initArg::Any,ifailArg::Any,xArg::Any,yArg::Any,trigArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06fuf(mArg:Integer,nArg:Integer,initArg:String,_
- xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,trigmArg:Matrix DoubleFloat,_
- trignArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06fuf",_
- ["m"::S,"n"::S,"init"::S,"ifail"::S,"x"::S,"y"::S,"trigm"::S,"trign"::S,"work"::S_
- ]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["x"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp_
- ,["y"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp,["trigm"::S,["*"::S,2$Lisp,"m"::S]$Lisp]$Lisp,["trign"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp_
- ,["work"::S,["*"::S,["*"::S,2$Lisp,"m"::S]$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ,["character"::S,"init"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"y"::S,"trigm"::S,"trign"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,initArg::Any,ifailArg::Any,xArg::Any,yArg::Any,trigmArg::Any,trignArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06gbf(nArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06gbf",_
- ["n"::S,"ifail"::S,"x"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06gcf(nArg:Integer,yArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06gcf",_
- ["n"::S,"ifail"::S,"y"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["y"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["y"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06gqf(mArg:Integer,nArg:Integer,xArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06gqf",_
- ["m"::S,"n"::S,"ifail"::S,"x"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["x"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- c06gsf(mArg:Integer,nArg:Integer,xArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "c06gsf",_
- ["m"::S,"n"::S,"ifail"::S,"x"::S,"u"::S,"v"::S]$Lisp,_
- ["u"::S,"v"::S]$Lisp,_
- [["double"::S,["x"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp_
- ,["u"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp,["v"::S,["*"::S,"m"::S,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["u"::S,"v"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGC06 NagSeriesSummationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d01.spad.pamphlet b/src/algebra/d01.spad.pamphlet
deleted file mode 100644
index 0226aba8..00000000
--- a/src/algebra/d01.spad.pamphlet
+++ /dev/null
@@ -1,447 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d01.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGD01 NagIntegrationPackage}
-<<package NAGD01 NagIntegrationPackage>>=
-)abbrev package NAGD01 NagIntegrationPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:37 1994
-++Description:
-++This package uses the NAG Library to calculate the numerical value of
-++definite integrals in one or more dimensions and to evaluate
-++weights and abscissae of integration rules.
-++See \downlink{Manual Page}{manpageXXd01}.
-
-NagIntegrationPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- d01ajf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
- Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(F))) -> Result
- ++ d01ajf(a,b,epsabs,epsrel,lw,liw,ifail,f)
- ++ is a general-purpose integrator which calculates an
- ++ approximation to the integral of a function f(x) over a finite
- ++ interval [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01ajf}.
- d01akf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
- Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(F))) -> Result
- ++ d01akf(a,b,epsabs,epsrel,lw,liw,ifail,f)
- ++ is an adaptive integrator, especially suited to
- ++ oscillating, non-singular integrands, which calculates an
- ++ approximation to the integral of a function f(x) over a finite
- ++ interval [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01akf}.
- d01alf : (DoubleFloat,DoubleFloat,Integer,Matrix DoubleFloat,_
- DoubleFloat,DoubleFloat,Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(F))) -> Result
- ++ d01alf(a,b,npts,points,epsabs,epsrel,lw,liw,ifail,f)
- ++ is a general purpose integrator which calculates an
- ++ approximation to the integral of a function f(x) over a finite
- ++ interval [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01alf}.
- d01amf : (DoubleFloat,Integer,DoubleFloat,DoubleFloat,_
- Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(F))) -> Result
- ++ d01amf(bound,inf,epsabs,epsrel,lw,liw,ifail,f)
- ++ calculates an approximation to the integral of a function
- ++ f(x) over an infinite or semi-infinite interval [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01amf}.
- d01anf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer,_
- DoubleFloat,DoubleFloat,Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(G))) -> Result
- ++ d01anf(a,b,omega,key,epsabs,epsrel,lw,liw,ifail,g)
- ++ calculates an approximation to the sine or the cosine
- ++ transform of a function g over [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01anf}.
- d01apf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
- Integer,DoubleFloat,DoubleFloat,Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(G))) -> Result
- ++ d01apf(a,b,alfa,beta,key,epsabs,epsrel,lw,liw,ifail,g)
- ++ is an adaptive integrator which calculates an
- ++ approximation to the integral of a function g(x)w(x) over a
- ++ finite interval [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01apf}.
- d01aqf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
- DoubleFloat,Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(G))) -> Result
- ++ d01aqf(a,b,c,epsabs,epsrel,lw,liw,ifail,g)
- ++ calculates an approximation to the Hilbert transform of a
- ++ function g(x) over [a,b]:
- ++ See \downlink{Manual Page}{manpageXXd01aqf}.
- d01asf : (DoubleFloat,DoubleFloat,Integer,DoubleFloat,_
- Integer,Integer,Integer,Integer,Union(fn:FileName,fp:Asp1(G))) -> Result
- ++ d01asf(a,omega,key,epsabs,limlst,lw,liw,ifail,g)
- ++ calculates an approximation to the sine or the cosine
- ++ transform of a function g over [a,infty):
- ++ See \downlink{Manual Page}{manpageXXd01asf}.
- d01bbf : (DoubleFloat,DoubleFloat,Integer,Integer,_
- Integer,Integer) -> Result
- ++ d01bbf(a,b,itype,n,gtype,ifail)
- ++ returns the weight appropriate to a
- ++ Gaussian quadrature.
- ++ The formulae provided are Gauss-Legendre, Gauss-Rational, Gauss-
- ++ Laguerre and Gauss-Hermite.
- ++ See \downlink{Manual Page}{manpageXXd01bbf}.
- d01fcf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer,_
- DoubleFloat,Integer,Integer,Integer,Union(fn:FileName,fp:Asp4(FUNCTN))) -> Result
- ++ d01fcf(ndim,a,b,maxpts,eps,lenwrk,minpts,ifail,functn)
- ++ attempts to evaluate a multi-dimensional integral (up to
- ++ 15 dimensions), with constant and finite limits, to a specified
- ++ relative accuracy, using an adaptive subdivision strategy.
- ++ See \downlink{Manual Page}{manpageXXd01fcf}.
- d01gaf : (Matrix DoubleFloat,Matrix DoubleFloat,Integer,Integer) -> Result
- ++ d01gaf(x,y,n,ifail)
- ++ integrates a function which is specified numerically at
- ++ four or more points, over the whole of its specified range, using
- ++ third-order finite-difference formulae with error estimates,
- ++ according to a method due to Gill and Miller.
- ++ See \downlink{Manual Page}{manpageXXd01gaf}.
- d01gbf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer,_
- DoubleFloat,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp4(FUNCTN))) -> Result
- ++ d01gbf(ndim,a,b,maxcls,eps,lenwrk,mincls,wrkstr,ifail,functn)
- ++ returns an approximation to the integral of a function
- ++ over a hyper-rectangular region, using a Monte Carlo method. An
- ++ approximate relative error estimate is also returned. This
- ++ routine is suitable for low accuracy work.
- ++ See \downlink{Manual Page}{manpageXXd01gbf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import FortranPackage
- import Union(fn:FileName,fp:Asp1(F))
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Integer)
- import AnyFunctions1(Matrix DoubleFloat)
-
-
- d01ajf(aArg:DoubleFloat,bArg:DoubleFloat,epsabsArg:DoubleFloat,_
- epsrelArg:DoubleFloat,lwArg:Integer,liwArg:Integer,_
- ifailArg:Integer,fArg:Union(fn:FileName,fp:Asp1(F))): Result ==
- pushFortranOutputStack(fFilename := aspFilename "f")$FOP
- if fArg case fn
- then outputAsFortran(fArg.fn)
- else outputAsFortran(fArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fFilename]$Lisp,_
- "d01ajf",_
- ["a"::S,"b"::S,"epsabs"::S,"epsrel"::S,"lw"::S_
- ,"liw"::S,"result"::S,"abserr"::S,"ifail"::S,"f"::S_
- ,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"f"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"epsabs"::S,"epsrel"::S_
- ,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"f"::S]$Lisp_
- ,["integer"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01akf(aArg:DoubleFloat,bArg:DoubleFloat,epsabsArg:DoubleFloat,_
- epsrelArg:DoubleFloat,lwArg:Integer,liwArg:Integer,_
- ifailArg:Integer,fArg:Union(fn:FileName,fp:Asp1(F))): Result ==
- pushFortranOutputStack(fFilename := aspFilename "f")$FOP
- if fArg case fn
- then outputAsFortran(fArg.fn)
- else outputAsFortran(fArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fFilename]$Lisp,_
- "d01akf",_
- ["a"::S,"b"::S,"epsabs"::S,"epsrel"::S,"lw"::S_
- ,"liw"::S,"result"::S,"abserr"::S,"ifail"::S,"f"::S_
- ,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"f"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"epsabs"::S,"epsrel"::S_
- ,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"f"::S]$Lisp_
- ,["integer"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01alf(aArg:DoubleFloat,bArg:DoubleFloat,nptsArg:Integer,_
- pointsArg:Matrix DoubleFloat,epsabsArg:DoubleFloat,epsrelArg:DoubleFloat,_
- lwArg:Integer,liwArg:Integer,ifailArg:Integer,_
- fArg:Union(fn:FileName,fp:Asp1(F))): Result ==
- pushFortranOutputStack(fFilename := aspFilename "f")$FOP
- if fArg case fn
- then outputAsFortran(fArg.fn)
- else outputAsFortran(fArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fFilename]$Lisp,_
- "d01alf",_
- ["a"::S,"b"::S,"npts"::S,"epsabs"::S,"epsrel"::S_
- ,"lw"::S,"liw"::S,"result"::S,"abserr"::S,"ifail"::S_
- ,"f"::S,"points"::S,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"f"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,["points"::S,"*"::S]$Lisp_
- ,"epsabs"::S,"epsrel"::S,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"f"::S]$Lisp_
- ,["integer"::S,"npts"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,nptsArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any,pointsArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01amf(boundArg:DoubleFloat,infArg:Integer,epsabsArg:DoubleFloat,_
- epsrelArg:DoubleFloat,lwArg:Integer,liwArg:Integer,_
- ifailArg:Integer,fArg:Union(fn:FileName,fp:Asp1(F))): Result ==
- pushFortranOutputStack(fFilename := aspFilename "f")$FOP
- if fArg case fn
- then outputAsFortran(fArg.fn)
- else outputAsFortran(fArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fFilename]$Lisp,_
- "d01amf",_
- ["bound"::S,"inf"::S,"epsabs"::S,"epsrel"::S,"lw"::S_
- ,"liw"::S,"result"::S,"abserr"::S,"ifail"::S,"f"::S_
- ,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"f"::S]$Lisp,_
- [["double"::S,"bound"::S,"epsabs"::S,"epsrel"::S_
- ,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"f"::S]$Lisp_
- ,["integer"::S,"inf"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([boundArg::Any,infArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01anf(aArg:DoubleFloat,bArg:DoubleFloat,omegaArg:DoubleFloat,_
- keyArg:Integer,epsabsArg:DoubleFloat,epsrelArg:DoubleFloat,_
- lwArg:Integer,liwArg:Integer,ifailArg:Integer,_
- gArg:Union(fn:FileName,fp:Asp1(G))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename]$Lisp,_
- "d01anf",_
- ["a"::S,"b"::S,"omega"::S,"key"::S,"epsabs"::S_
- ,"epsrel"::S,"lw"::S,"liw"::S,"result"::S,"abserr"::S_
- ,"ifail"::S,"g"::S,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"g"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"omega"::S,"epsabs"::S_
- ,"epsrel"::S,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"g"::S]$Lisp_
- ,["integer"::S,"key"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,omegaArg::Any,keyArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01apf(aArg:DoubleFloat,bArg:DoubleFloat,alfaArg:DoubleFloat,_
- betaArg:DoubleFloat,keyArg:Integer,epsabsArg:DoubleFloat,_
- epsrelArg:DoubleFloat,lwArg:Integer,liwArg:Integer,_
- ifailArg:Integer,gArg:Union(fn:FileName,fp:Asp1(G))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename]$Lisp,_
- "d01apf",_
- ["a"::S,"b"::S,"alfa"::S,"beta"::S,"key"::S_
- ,"epsabs"::S,"epsrel"::S,"lw"::S,"liw"::S,"result"::S_
- ,"abserr"::S,"ifail"::S,"g"::S,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"g"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"alfa"::S,"beta"::S_
- ,"epsabs"::S,"epsrel"::S,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"g"::S]$Lisp_
- ,["integer"::S,"key"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,alfaArg::Any,betaArg::Any,keyArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01aqf(aArg:DoubleFloat,bArg:DoubleFloat,cArg:DoubleFloat,_
- epsabsArg:DoubleFloat,epsrelArg:DoubleFloat,lwArg:Integer,_
- liwArg:Integer,ifailArg:Integer,gArg:Union(fn:FileName,fp:Asp1(G))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename]$Lisp,_
- "d01aqf",_
- ["a"::S,"b"::S,"c"::S,"epsabs"::S,"epsrel"::S_
- ,"lw"::S,"liw"::S,"result"::S,"abserr"::S,"ifail"::S_
- ,"g"::S,"w"::S,"iw"::S]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"g"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"c"::S,"epsabs"::S_
- ,"epsrel"::S,"result"::S,"abserr"::S,["w"::S,"lw"::S]$Lisp,"g"::S]$Lisp_
- ,["integer"::S,"lw"::S,"liw"::S,["iw"::S,"liw"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"w"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,cArg::Any,epsabsArg::Any,epsrelArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01asf(aArg:DoubleFloat,omegaArg:DoubleFloat,keyArg:Integer,_
- epsabsArg:DoubleFloat,limlstArg:Integer,lwArg:Integer,_
- liwArg:Integer,ifailArg:Integer,gArg:Union(fn:FileName,fp:Asp1(G))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename]$Lisp,_
- "d01asf",_
- ["a"::S,"omega"::S,"key"::S,"epsabs"::S,"limlst"::S_
- ,"lw"::S,"liw"::S,"result"::S,"abserr"::S,"lst"::S_
- ,"ifail"::S,"g"::S,"erlst"::S,"rslst"::S,"ierlst"::S,"iw"::S,"w"::S_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"lst"::S,"erlst"::S,"rslst"::S,"ierlst"::S,"iw"::S,"w"::S,"g"::S]$Lisp,_
- [["double"::S,"a"::S,"omega"::S,"epsabs"::S_
- ,"result"::S,"abserr"::S,["erlst"::S,"limlst"::S]$Lisp,["rslst"::S,"limlst"::S]$Lisp,["w"::S,"lw"::S]$Lisp,"g"::S]$Lisp_
- ,["integer"::S,"key"::S,"limlst"::S,"lw"::S_
- ,"liw"::S,"lst"::S,["ierlst"::S,"limlst"::S]$Lisp,["iw"::S,"liw"::S]$Lisp,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"abserr"::S,"lst"::S,"erlst"::S,"rslst"::S,"ierlst"::S,"iw"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,omegaArg::Any,keyArg::Any,epsabsArg::Any,limlstArg::Any,lwArg::Any,liwArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01bbf(aArg:DoubleFloat,bArg:DoubleFloat,itypeArg:Integer,_
- nArg:Integer,gtypeArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "d01bbf",_
- ["a"::S,"b"::S,"itype"::S,"n"::S,"gtype"::S_
- ,"ifail"::S,"weight"::S,"abscis"::S]$Lisp,_
- ["weight"::S,"abscis"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,["weight"::S,"n"::S]$Lisp_
- ,["abscis"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"itype"::S,"n"::S,"gtype"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["weight"::S,"abscis"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,itypeArg::Any,nArg::Any,gtypeArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01fcf(ndimArg:Integer,aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,_
- maxptsArg:Integer,epsArg:DoubleFloat,lenwrkArg:Integer,_
- minptsArg:Integer,ifailArg:Integer,functnArg:Union(fn:FileName,fp:Asp4(FUNCTN))): Result ==
- pushFortranOutputStack(functnFilename := aspFilename "functn")$FOP
- if functnArg case fn
- then outputAsFortran(functnArg.fn)
- else outputAsFortran(functnArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([functnFilename]$Lisp,_
- "d01fcf",_
- ["ndim"::S,"maxpts"::S,"eps"::S,"lenwrk"::S,"acc"::S_
- ,"finval"::S,"minpts"::S,"ifail"::S,"functn"::S,"a"::S,"b"::S,"wrkstr"::S]$Lisp,_
- ["acc"::S,"finval"::S,"wrkstr"::S,"functn"::S]$Lisp,_
- [["double"::S,["a"::S,"ndim"::S]$Lisp,["b"::S,"ndim"::S]$Lisp_
- ,"eps"::S,"acc"::S,"finval"::S,["wrkstr"::S,"lenwrk"::S]$Lisp,"functn"::S]$Lisp_
- ,["integer"::S,"ndim"::S,"maxpts"::S,"lenwrk"::S_
- ,"minpts"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["acc"::S,"finval"::S,"minpts"::S,"ifail"::S]$Lisp,_
- [([ndimArg::Any,maxptsArg::Any,epsArg::Any,lenwrkArg::Any,minptsArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01gaf(xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,nArg:Integer,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "d01gaf",_
- ["n"::S,"ans"::S,"er"::S,"ifail"::S,"x"::S,"y"::S]$Lisp,_
- ["ans"::S,"er"::S]$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["y"::S,"n"::S]$Lisp_
- ,"ans"::S,"er"::S]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["ans"::S,"er"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,xArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d01gbf(ndimArg:Integer,aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,_
- maxclsArg:Integer,epsArg:DoubleFloat,lenwrkArg:Integer,_
- minclsArg:Integer,wrkstrArg:Matrix DoubleFloat,ifailArg:Integer,_
- functnArg:Union(fn:FileName,fp:Asp4(FUNCTN))): Result ==
- pushFortranOutputStack(functnFilename := aspFilename "functn")$FOP
- if functnArg case fn
- then outputAsFortran(functnArg.fn)
- else outputAsFortran(functnArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([functnFilename]$Lisp,_
- "d01gbf",_
- ["ndim"::S,"maxcls"::S,"eps"::S,"lenwrk"::S,"acc"::S_
- ,"finest"::S,"mincls"::S,"ifail"::S,"functn"::S,"a"::S,"b"::S,"wrkstr"::S]$Lisp,_
- ["acc"::S,"finest"::S,"functn"::S]$Lisp,_
- [["double"::S,["a"::S,"ndim"::S]$Lisp,["b"::S,"ndim"::S]$Lisp_
- ,"eps"::S,"acc"::S,"finest"::S,["wrkstr"::S,"lenwrk"::S]$Lisp,"functn"::S]$Lisp_
- ,["integer"::S,"ndim"::S,"maxcls"::S,"lenwrk"::S_
- ,"mincls"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["acc"::S,"finest"::S,"mincls"::S,"wrkstr"::S,"ifail"::S]$Lisp,_
- [([ndimArg::Any,maxclsArg::Any,epsArg::Any,lenwrkArg::Any,minclsArg::Any,ifailArg::Any,aArg::Any,bArg::Any,wrkstrArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGD01 NagIntegrationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d01Package.spad.pamphlet b/src/algebra/d01Package.spad.pamphlet
deleted file mode 100644
index 131e00be..00000000
--- a/src/algebra/d01Package.spad.pamphlet
+++ /dev/null
@@ -1,559 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d01Package.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package INTPACK AnnaNumericalIntegrationPackage}
-<<package INTPACK AnnaNumericalIntegrationPackage>>=
-)abbrev package INTPACK AnnaNumericalIntegrationPackage
-++ Author: Brian Dupee
-++ Date Created: August 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: integrate, measure
-++ Related Constructors: Result, RoutinesTable
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ \axiomType{AnnaNumericalIntegrationPackage} is a \axiom{package}
-++ of functions for the \axiom{category} \axiomType{NumericalIntegrationCategory}
-++ with \axiom{measure}, and \axiom{integrate}.
-EDF ==> Expression DoubleFloat
-DF ==> DoubleFloat
-EF ==> Expression Float
-F ==> Float
-INT ==> Integer
-SOCDF ==> Segment OrderedCompletion DoubleFloat
-OCDF ==> OrderedCompletion DoubleFloat
-SBOCF ==> SegmentBinding OrderedCompletion Float
-LSOCF ==> List Segment OrderedCompletion Float
-SOCF ==> Segment OrderedCompletion Float
-OCF ==> OrderedCompletion Float
-LS ==> List Symbol
-S ==> Symbol
-LST ==> List String
-ST ==> String
-RT ==> RoutinesTable
-NIA ==> Record(var:S, fn:EDF, range:SOCDF, abserr:DF, relerr:DF)
-MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
-IFL ==> List(Record(ifail:Integer,instruction:String))
-Entry ==> Record(chapter:String, type:String, domainName: String,
- defaultMin:F, measure:F, failList:IFL, explList:List String)
-Measure ==> Record(measure:F, name:ST, explanations:LST, extra:Result)
-
-
-AnnaNumericalIntegrationPackage(): with
-
- integrate: (EF,SOCF,F,F,RT) -> Result
- ++ integrate(exp, a..b, epsrel, routines) is a top level ANNA function
- ++ to integrate an expression, {\tt exp}, over a given range {\tt a}
- ++ to {\tt b} to the required absolute and relative accuracy using
- ++ the routines available in the RoutinesTable provided.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory}
- ++ to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
- integrate: NumericalIntegrationProblem -> Result
- ++ integrate(IntegrationProblem) is a top level ANNA function
- ++ to integrate an expression over a given range or ranges
- ++ to the required absolute and relative accuracy.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
-
- integrate: (EF,SOCF,F,F) -> Result
- ++ integrate(exp, a..b, epsabs, epsrel) is a top level ANNA function
- ++ to integrate an expression, {\tt exp}, over a given range {\tt a}
- ++ to {\tt b} to the required absolute and relative accuracy.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
-
- integrate: (EF,SOCF,F) -> Result
- ++ integrate(exp, a..b, epsrel) is a top level ANNA
- ++ function to integrate an expression, {\tt exp}, over a given
- ++ range {\tt a} to {\tt b} to the required relative accuracy.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
- ++
- ++ If epsrel = 0, a default absolute accuracy is used.
-
- integrate: (EF,SOCF) -> Result
- ++ integrate(exp, a..b) is a top
- ++ level ANNA function to integrate an expression, {\tt exp},
- ++ over a given range {\tt a} to {\tt b}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
- ++
- ++ Default values for the absolute and relative error are used.
-
- integrate:(EF,LSOCF) -> Result
- ++ integrate(exp, [a..b,c..d,...]) is a top
- ++ level ANNA function to integrate a multivariate expression, {\tt exp},
- ++ over a given set of ranges.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
- ++
- ++ Default values for the absolute and relative error are used.
-
- integrate:(EF,LSOCF,F) -> Result
- ++ integrate(exp, [a..b,c..d,...], epsrel) is a top
- ++ level ANNA function to integrate a multivariate expression, {\tt exp},
- ++ over a given set of ranges to the required relative
- ++ accuracy.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
- ++
- ++ If epsrel = 0, a default absolute accuracy is used.
-
- integrate:(EF,LSOCF,F,F) -> Result
- ++ integrate(exp, [a..b,c..d,...], epsabs, epsrel) is a top
- ++ level ANNA function to integrate a multivariate expression, {\tt exp},
- ++ over a given set of ranges to the required absolute and relative
- ++ accuracy.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
-
- integrate:(EF,LSOCF,F,F,RT) -> Result
- ++ integrate(exp, [a..b,c..d,...], epsabs, epsrel, routines) is a top
- ++ level ANNA function to integrate a multivariate expression, {\tt exp},
- ++ over a given set of ranges to the required absolute and relative
- ++ accuracy, using the routines available in the RoutinesTable provided.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.
-
- measure:NumericalIntegrationProblem -> Measure
- ++ measure(prob) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine for solving the numerical integration
- ++ problem defined by \axiom{prob}.
- ++
- ++ It calls each \axiom{domain} of \axiom{category}
- ++ \axiomType{NumericalIntegrationCategory} in turn to calculate all measures
- ++ and returns the best
- ++ i.e. the name of the most appropriate domain and any other relevant
- ++ information.
- measure:(NumericalIntegrationProblem,RT) -> Measure
- ++ measure(prob,R) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical integration
- ++ problem defined by \axiom{prob}.
- ++
- ++ It calls each \axiom{domain} listed in \axiom{R} of \axiom{category}
- ++ \axiomType{NumericalIntegrationCategory} in turn to calculate all measures
- ++ and returns the best
- ++ i.e. the name of the most appropriate domain and any other relevant
- ++ information.
- integrate:(EF,SBOCF,ST) -> Union(Result,"failed")
- ++ integrate(exp, x = a..b, "numerical") is a top level ANNA function to
- ++ integrate an expression, {\tt exp}, over a given range, {\tt a}
- ++ to {\tt b}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.\newline
- ++
- ++ Default values for the absolute and relative error are used.
- ++
- ++ It is an error of the last argument is not {\tt "numerical"}.
- integrate:(EF,SBOCF,S) -> Union(Result,"failed")
- ++ integrate(exp, x = a..b, numerical) is a top level ANNA function to
- ++ integrate an expression, {\tt exp}, over a given range, {\tt a}
- ++ to {\tt b}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalIntegrationCategory} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ It then performs the integration of the given expression
- ++ on that \axiom{domain}.\newline
- ++
- ++ Default values for the absolute and relative error are used.
- ++
- ++ It is an error if the last argument is not {\tt numerical}.
-
- == add
-
- zeroMeasure: Measure -> Result
- scriptedVariables?: MDNIA -> Boolean
- preAnalysis:(Union(nia:NIA,mdnia:MDNIA),RT) -> RT
- measureSpecific:(ST,RT,Union(nia:NIA,mdnia:MDNIA)) -> Record(measure:F,explanations:LST,extra:Result)
- changeName:(Result,ST) -> Result
- recoverAfterFail:(Union(nia:NIA,mdnia:MDNIA),RT,Measure,INT,Result) -> Record(a:Result,b:Measure)
- better?:(Result,Result) -> Boolean
- integrateConstant:(EF,SOCF) -> Result
- integrateConstantList: (EF,LSOCF) -> Result
- integrateArgs:(NumericalIntegrationProblem,RT) -> Result
- integrateSpecific:(Union(nia:NIA,mdnia:MDNIA),ST,Result) -> Result
-
- import ExpertSystemToolsPackage
-
- integrateConstantList(exp:EF,ras:LSOCF):Result ==
- c:OCF := ((retract(exp)@F)$EF)::OCF
- b := [hi(j)-lo(j) for j in ras]
- c := c*reduce((#1)*(#2),b)
- a := coerce(c)$AnyFunctions1(OCF)
- text := coerce("Constant Function")$AnyFunctions1(ST)
- construct([[result@S,a],[method@S,text]])$Result
-
- integrateConstant(exp:EF,ra:SOCF):Result ==
- c := (retract(exp)@F)$EF
- r:OCF := (c::OCF)*(hi(ra)-lo(ra))
- a := coerce(r)$AnyFunctions1(OCF)
- text := coerce("Constant Function")$AnyFunctions1(ST)
- construct([[result@S,a],[method@S,text]])$Result
-
- zeroMeasure(m:Measure):Result ==
- a := coerce(0$DF)$AnyFunctions1(DF)
- text := coerce("Constant Function")$AnyFunctions1(String)
- r := construct([[result@Symbol,a],[method@Symbol,text]])$Result
- concat(measure2Result m,r)$ExpertSystemToolsPackage
-
- scriptedVariables?(mdnia:MDNIA):Boolean ==
- vars:List Symbol := variables(mdnia.fn)$EDF
- var1 := first(vars)$(List Symbol)
- not scripted?(var1) => false
- name1 := name(var1)$Symbol
- for i in 2..# vars repeat
- not ((scripted?(vars.i)$Symbol) and (name1 = name(vars.i)$Symbol)) =>
- return false
- true
-
- preAnalysis(args:Union(nia:NIA,mdnia:MDNIA),t:RT):RT ==
- import RT
- r:RT := selectIntegrationRoutines t
- args case nia =>
- arg:NIA := args.nia
- rangeIsFinite(arg)$d01AgentsPackage case finite =>
- selectFiniteRoutines r
- selectNonFiniteRoutines r
- selectMultiDimensionalRoutines r
-
- changeName(ans:Result,name:ST):Result ==
- sy:S := coerce(name "Answer")$S
- anyAns:Any := coerce(ans)$AnyFunctions1(Result)
- construct([[sy,anyAns]])$Result
-
- measureSpecific(name:ST,R:RT,args:Union(nia:NIA,mdnia:MDNIA)):
- Record(measure:F,explanations:ST,extra:Result) ==
- args case nia =>
- arg:NIA := args.nia
- name = "d01ajfAnnaType" => measure(R,arg)$d01ajfAnnaType
- name = "d01akfAnnaType" => measure(R,arg)$d01akfAnnaType
- name = "d01alfAnnaType" => measure(R,arg)$d01alfAnnaType
- name = "d01amfAnnaType" => measure(R,arg)$d01amfAnnaType
- name = "d01anfAnnaType" => measure(R,arg)$d01anfAnnaType
- name = "d01apfAnnaType" => measure(R,arg)$d01apfAnnaType
- name = "d01aqfAnnaType" => measure(R,arg)$d01aqfAnnaType
- name = "d01asfAnnaType" => measure(R,arg)$d01asfAnnaType
- name = "d01TransformFunctionType" =>
- measure(R,arg)$d01TransformFunctionType
- error("measureSpecific","invalid type name: " name)$ErrorFunctions
- args case mdnia =>
- arg2:MDNIA := args.mdnia
- name = "d01gbfAnnaType" => measure(R,arg2)$d01gbfAnnaType
- name = "d01fcfAnnaType" => measure(R,arg2)$d01fcfAnnaType
- error("measureSpecific","invalid type name: " name)$ErrorFunctions
- error("measureSpecific","invalid type name")$ErrorFunctions
-
- measure(a:NumericalIntegrationProblem,R:RT):Measure ==
- args:Union(nia:NIA,mdnia:MDNIA) := retract(a)$NumericalIntegrationProblem
- sofar := 0$F
- best := "none" :: ST
- routs := copy R
- routs := preAnalysis(args,routs)
- empty?(routs)$RT =>
- error("measure", "no routines found")$ErrorFunctions
- rout := inspect(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- meth:LST := ["Trying " e.type " integration routines"]
- ext := empty()$Result
- for i in 1..# routs repeat
- rout := extract!(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- n := e.domainName
- if e.defaultMin > sofar then
- m := measureSpecific(n,R,args)
- if m.measure > sofar then
- sofar := m.measure
- best := n
- ext := concat(m.extra,ext)$ExpertSystemToolsPackage
- str:LST := [string(rout.key)$S "measure: " outputMeasure(m.measure)
- " - " m.explanations]
- else
- str:LST := [string(rout.key)$S " is no better than other routines"]
- meth := append(meth,str)$LST
- [sofar,best,meth,ext]
-
- measure(a:NumericalIntegrationProblem):Measure ==
- measure(a,routines()$RT)
-
- integrateSpecific(args:Union(nia:NIA,mdnia:MDNIA),n:ST,ex:Result):Result ==
- args case nia =>
- arg:NIA := args.nia
- n = "d01ajfAnnaType" => numericalIntegration(arg,ex)$d01ajfAnnaType
- n = "d01TransformFunctionType" =>
- numericalIntegration(arg,ex)$d01TransformFunctionType
- n = "d01amfAnnaType" => numericalIntegration(arg,ex)$d01amfAnnaType
- n = "d01apfAnnaType" => numericalIntegration(arg,ex)$d01apfAnnaType
- n = "d01aqfAnnaType" => numericalIntegration(arg,ex)$d01aqfAnnaType
- n = "d01alfAnnaType" => numericalIntegration(arg,ex)$d01alfAnnaType
- n = "d01akfAnnaType" => numericalIntegration(arg,ex)$d01akfAnnaType
- n = "d01anfAnnaType" => numericalIntegration(arg,ex)$d01anfAnnaType
- n = "d01asfAnnaType" => numericalIntegration(arg,ex)$d01asfAnnaType
- error("integrateSpecific","invalid type name: " n)$ErrorFunctions
- args case mdnia =>
- arg2:MDNIA := args.mdnia
- n = "d01gbfAnnaType" => numericalIntegration(arg2,ex)$d01gbfAnnaType
- n = "d01fcfAnnaType" => numericalIntegration(arg2,ex)$d01fcfAnnaType
- error("integrateSpecific","invalid type name: " n)$ErrorFunctions
- error("integrateSpecific","invalid type name: " n)$ErrorFunctions
-
- better?(r:Result,s:Result):Boolean ==
- a1 := search("abserr"::S,r)$Result
- a1 case "failed" => false
- abserr1 := retract(a1)$AnyFunctions1(DF)
- negative?(abserr1) => false
- a2 := search("abserr"::S,s)$Result
- a2 case "failed" => true
- abserr2 := retract(a2)$AnyFunctions1(DF)
- negative?(abserr2) => true
- (abserr1 < abserr2) -- true if r.abserr better than s.abserr
-
- recoverAfterFail(n:Union(nia:NIA,mdnia:MDNIA),routs:RT,m:Measure,iint:INT,
- r:Result):Record(a:Result,b:Measure) ==
- bestName := m.name
- while positive?(iint) repeat
- routineName := m.name
- s := recoverAfterFail(routs,routineName(1..6),iint)$RoutinesTable
- s case "failed" => iint := 0
- if s = "changeEps" then
- nn := n.nia
- zero?(nn.abserr) =>
- nn.abserr := 1.0e-8 :: DF
- m := measure(n::NumericalIntegrationProblem,routs)
- zero?(m.measure) => iint := 0
- r := integrateSpecific(n,m.name,m.extra)
- iint := 0
- rn := routineName(1..6)
- buttVal := getButtonValue(rn,"functionEvaluations")$AttributeButtons
- if (s = "incrFunEvals") and (buttVal < 0.8) then
- increase(rn,"functionEvaluations")$AttributeButtons
- if s = "increase tolerance" then
- (n.nia).relerr := (n.nia).relerr*(10.0::DF)
- if s = "decrease tolerance" then
- (n.nia).relerr := (n.nia).relerr/(10.0::DF)
- fl := coerce(s)$AnyFunctions1(ST)
- flrec:Record(key:S,entry:Any):=[failure@S,fl]
- m2 := measure(n::NumericalIntegrationProblem,routs)
- zero?(m2.measure) => iint := 0
- r2:Result := integrateSpecific(n,m2.name,m2.extra)
- better?(r,r2) =>
- m.name := m2.name
- insert!(flrec,r)$Result
- bestName := m2.name
- m := m2
- insert!(flrec,r2)$Result
- r := concat(r2,changeName(r,routineName))$ExpertSystemToolsPackage
- iany := search(ifail@S,r2)$Result
- iany case "failed" => iint := 0
- iint := retract(iany)$AnyFunctions1(INT)
- m.name := bestName
- [r,m]
-
- integrateArgs(prob:NumericalIntegrationProblem,t:RT):Result ==
- args:Union(nia:NIA,mdnia:MDNIA) := retract(prob)$NumericalIntegrationProblem
- routs := copy(t)$RT
- if args case mdnia then
- arg := args.mdnia
- v := (# variables(arg.fn))
- not scriptedVariables?(arg) =>
- error("MultiDimensionalNumericalIntegrationPackage",
- "invalid variable names")$ErrorFunctions
- (v ~= # arg.range)@Boolean =>
- error("MultiDimensionalNumericalIntegrationPackage",
- "number of variables do not match number of ranges")$ErrorFunctions
- m := measure(prob,routs)
- zero?(m.measure) => zeroMeasure m
- r := integrateSpecific(args,m.name,m.extra)
- iany := search(ifail@S,r)$Result
- iint := 0$INT
- if (iany case Any) then
- iint := retract(iany)$AnyFunctions1(INT)
- if positive?(iint) then
- tu:Record(a:Result,b:Measure) := recoverAfterFail(args,routs,m,iint,r)
- r := tu.a
- m := tu.b
- r := concat(measure2Result m,r)$ExpertSystemToolsPackage
- n := m.name
- nn:ST :=
- (# n > 14) => "d01transform"
- n(1..6)
- expl := getExplanations(routs,nn)$RoutinesTable
- expla := coerce(expl)$AnyFunctions1(LST)
- explaa:Record(key:Symbol,entry:Any) := ["explanations"::Symbol,expla]
- r := concat(construct([explaa]),r)
- args case nia =>
- att := showAttributes(args.nia)$IntegrationFunctionsTable
- att case "failed" => r
- concat(att2Result att,r)$ExpertSystemToolsPackage
- r
-
- integrate(args:NumericalIntegrationProblem):Result ==
- integrateArgs(args,routines()$RT)
-
- integrate(exp:EF,ra:SOCF,epsabs:F,epsrel:F,r:RT):Result ==
- Var:LS := variables(exp)$EF
- empty?(Var)$LS => integrateConstant(exp,ra)
- args:NIA := [first(Var)$LS,ef2edf exp,socf2socdf ra,f2df epsabs,f2df epsrel]
- integrateArgs(args::NumericalIntegrationProblem,r)
-
- integrate(exp:EF,ra:SOCF,epsabs:F,epsrel:F):Result ==
- integrate(exp,ra,epsabs,epsrel,routines()$RT)
-
- integrate(exp:EF,ra:SOCF,err:F):Result ==
- positive?(err)$F => integrate(exp,ra,0$F,err)
- integrate(exp,ra,1.0E-5,err)
-
- integrate(exp:EF,ra:SOCF):Result == integrate(exp,ra,0$F,1.0E-5)
-
- integrate(exp:EF,sb:SBOCF, st:ST) ==
- st = "numerical" => integrate(exp,segment sb)
- "failed"
-
- integrate(exp:EF,sb:SBOCF, s:S) ==
- s = (numerical::Symbol) => integrate(exp,segment sb)
- "failed"
-
- integrate(exp:EF,ra:LSOCF,epsabs:F,epsrel:F,r:RT):Result ==
- vars := variables(exp)$EF
- empty?(vars)$LS => integrateConstantList(exp,ra)
- args:MDNIA := [ef2edf exp,convert ra,f2df epsabs,f2df epsrel]
- integrateArgs(args::NumericalIntegrationProblem,r)
-
- integrate(exp:EF,ra:LSOCF,epsabs:F,epsrel:F):Result ==
- integrate(exp,ra,epsabs,epsrel,routines()$RT)
-
- integrate(exp:EF,ra:LSOCF,epsrel:F):Result ==
- zero? epsrel => integrate(exp,ra,1.0e-6,epsrel)
- integrate(exp,ra,0$F,epsrel)
-
- integrate(exp:EF,ra:LSOCF):Result == integrate(exp,ra,1.0e-4)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package INTPACK AnnaNumericalIntegrationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d01agents.spad.pamphlet b/src/algebra/d01agents.spad.pamphlet
deleted file mode 100644
index eadc8a14..00000000
--- a/src/algebra/d01agents.spad.pamphlet
+++ /dev/null
@@ -1,428 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d01agents.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain INTFTBL IntegrationFunctionsTable}
-<<domain INTFTBL IntegrationFunctionsTable>>=
-)abbrev domain INTFTBL IntegrationFunctionsTable
-++ Author: Brian Dupee
-++ Date Created: March 1995
-++ Date Last Updated: June 1995
-++ Description:
-++
-IntegrationFunctionsTable(): E == I where
- EF2 ==> ExpressionFunctions2
- EFI ==> Expression Fraction Integer
- FI ==> Fraction Integer
- LEDF ==> List Expression DoubleFloat
- KEDF ==> Kernel Expression DoubleFloat
- EEDF ==> Equation Expression DoubleFloat
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- ST ==> String
- LST ==> List String
- SI ==> SingleInteger
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
- OCEDF ==> OrderedCompletion Expression DoubleFloat
- EOCEFI ==> Equation OrderedCompletion Expression Fraction Integer
- OCEFI ==> OrderedCompletion Expression Fraction Integer
- OCFI ==> OrderedCompletion Fraction Integer
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- CTYPE ==> Union(continuous: "Continuous at the end points",
- lowerSingular: "There is a singularity at the lower end point",
- upperSingular: "There is a singularity at the upper end point",
- bothSingular: "There are singularities at both end points",
- notEvaluated: "End point continuity not yet evaluated")
- RTYPE ==> Union(finite: "The range is finite",
- lowerInfinite: "The bottom of range is infinite",
- upperInfinite: "The top of range is infinite",
- bothInfinite: "Both top and bottom points are infinite",
- notEvaluated: "Range not yet evaluated")
- STYPE ==> Union(str:SDF,
- notEvaluated:"Internal singularities not yet evaluated")
- ATT ==> Record(endPointContinuity:CTYPE,
- singularitiesStream:STYPE,range:RTYPE)
- ROA ==> Record(key:NIA,entry:ATT)
-
- E ==> with
-
- showTheFTable:() -> $
- ++ showTheFTable() returns the current table of functions.
- clearTheFTable : () -> Void
- ++ clearTheFTable() clears the current table of functions.
- keys : $ -> List(NIA)
- ++ keys(f) returns the list of keys of f
- fTable: List Record(key:NIA,entry:ATT) -> $
- ++ fTable(l) creates a functions table from the elements of l.
- insert!:Record(key:NIA,entry:ATT) -> $
- ++ insert!(r) inserts an entry r into theIFTable
- showAttributes:NIA -> Union(ATT,"failed")
- ++ showAttributes(x) \undocumented{}
- entries : $ -> List Record(key:NIA,entry:ATT)
- ++ entries(x) \undocumented{}
- entry:NIA -> ATT
- ++ entry(n) \undocumented{}
- I ==> add
-
- Rep := Table(NIA,ATT)
- import Rep
-
- theFTable:$ := empty()$Rep
-
- showTheFTable():$ ==
- theFTable
-
- clearTheFTable():Void ==
- theFTable := empty()$Rep
-
- fTable(l:List Record(key:NIA,entry:ATT)):$ ==
- theFTable := table(l)$Rep
-
- insert!(r:Record(key:NIA,entry:ATT)):$ ==
- insert!(r,theFTable)$Rep
-
- keys(t:$):List NIA ==
- keys(t)$Rep
-
- showAttributes(k:NIA):Union(ATT,"failed") ==
- search(k,theFTable)$Rep
-
- entries(t:$):List Record(key:NIA,entry:ATT) ==
- members(t)$Rep
-
- entry(k:NIA):ATT ==
- qelt(theFTable,k)$Rep
-
-@
-\section{package D01AGNT d01AgentsPackage}
-<<package D01AGNT d01AgentsPackage>>=
-)abbrev package D01AGNT d01AgentsPackage
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: rangeIsFinite, functionIsContinuousAtEndPoints,
-++ functionIsOscillatory
-++ Description:
-++ \axiomType{d01AgentsPackage} is a package of numerical agents to be used
-++ to investigate attributes of an input function so as to decide the
-++ \axiomFun{measure} of an appropriate numerical integration routine.
-++ It contains functions \axiomFun{rangeIsFinite} to test the input range and
-++ \axiomFun{functionIsContinuousAtEndPoints} to check for continuity at
-++ the end points of the range.
-
-
-d01AgentsPackage(): E == I where
- EF2 ==> ExpressionFunctions2
- EFI ==> Expression Fraction Integer
- FI ==> Fraction Integer
- LEDF ==> List Expression DoubleFloat
- KEDF ==> Kernel Expression DoubleFloat
- EEDF ==> Equation Expression DoubleFloat
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- ST ==> String
- LST ==> List String
- SI ==> SingleInteger
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
- OCEDF ==> OrderedCompletion Expression DoubleFloat
- EOCEFI ==> Equation OrderedCompletion Expression Fraction Integer
- OCEFI ==> OrderedCompletion Expression Fraction Integer
- OCFI ==> OrderedCompletion Fraction Integer
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- CTYPE ==> Union(continuous: "Continuous at the end points",
- lowerSingular: "There is a singularity at the lower end point",
- upperSingular: "There is a singularity at the upper end point",
- bothSingular: "There are singularities at both end points",
- notEvaluated: "End point continuity not yet evaluated")
- RTYPE ==> Union(finite: "The range is finite",
- lowerInfinite: "The bottom of range is infinite",
- upperInfinite: "The top of range is infinite",
- bothInfinite: "Both top and bottom points are infinite",
- notEvaluated: "Range not yet evaluated")
- STYPE ==> Union(str:SDF,
- notEvaluated:"Internal singularities not yet evaluated")
- ATT ==> Record(endPointContinuity:CTYPE,
- singularitiesStream:STYPE,range:RTYPE)
- ROA ==> Record(key:NIA,entry:ATT)
-
- E ==> with
-
- rangeIsFinite : NIA -> RTYPE
- ++ rangeIsFinite(args) tests the endpoints of \spad{args.range} for
- ++ infinite end points.
- functionIsContinuousAtEndPoints: NIA -> CTYPE
- ++ functionIsContinuousAtEndPoints(args) uses power series limits
- ++ to check for problems at the end points of the range of \spad{args}.
- getlo : SOCDF -> DF
- ++ getlo(x) gets the \axiomType{DoubleFloat} equivalent of
- ++ the first endpoint of the range \axiom{x}
- gethi : SOCDF -> DF
- ++ gethi(x) gets the \axiomType{DoubleFloat} equivalent of
- ++ the second endpoint of the range \axiom{x}
- functionIsOscillatory:NIA -> F
- ++ functionIsOscillatory(a) tests whether the function \spad{a.fn}
- ++ has many zeros of its derivative.
- problemPoints: (EDF, Symbol, SOCDF) -> List DF
- ++ problemPoints(f,var,range) returns a list of possible problem points
- ++ by looking at the zeros of the denominator of the function if it
- ++ can be retracted to \axiomType{Polynomial DoubleFloat}.
- singularitiesOf:NIA -> SDF
- ++ singularitiesOf(args) returns a list of potential
- ++ singularities of the function within the given range
- df2st:DF -> String
- ++ df2st(n) coerces a \axiomType{DoubleFloat} to \axiomType{String}
- ldf2lst:LDF -> LST
- ++ ldf2lst(ln) coerces a List of \axiomType{DoubleFloat} to \axiomType{List String}
- sdf2lst:SDF -> LST
- ++ sdf2lst(ln) coerces a Stream of \axiomType{DoubleFloat} to \axiomType{List String}
- commaSeparate:LST -> ST
- ++ commaSeparate(l) produces a comma separated string from a
- ++ list of strings.
- changeName:(Symbol,Symbol,Result) -> Result
- ++ changeName(s,t,r) changes the name of item \axiom{s} in \axiom{r}
- ++ to \axiom{t}.
-
- I ==> ExpertSystemContinuityPackage add
-
- import ExpertSystemToolsPackage
- import ExpertSystemContinuityPackage
-
- -- local functions
- ocdf2ocefi : OCDF -> OCEFI
- rangeOfArgument : (KEDF, NIA) -> DF
- continuousAtPoint? : (EFI,EOCEFI) -> Boolean
- rand:(SOCDF,INT) -> LDF
- eval:(EDF,Symbol,LDF) -> LDF
- numberOfSignChanges:LDF -> INT
- rangeIsFiniteFunction:NIA -> RTYPE
- functionIsContinuousAtEndPointsFunction:NIA -> CTYPE
-
- changeName(s:Symbol,t:Symbol,r:Result):Result ==
- a := remove!(s,r)$Result
- a case Any =>
- insert!([t,a],r)$Result
- r
- r
-
- commaSeparate(l:LST):ST ==
- empty?(l)$LST => ""
- one?(#(l)) => concat(l)$ST
- f := first(l)$LST
- t := [concat([", ",l.i])$ST for i in 2..#(l)]
- concat(f,concat(t)$ST)$ST
-
- rand(seg:SOCDF,n:INT):LDF ==
- -- produced a sorted list of random numbers in the given range
- l:DF := getlo seg
- s:DF := (gethi seg) - l
- seed:INT := random()$INT
- dseed:DF := seed :: DF
- r:LDF := [(((random(seed)$INT) :: DF)*s/dseed + l) for i in 1..n]
- sort(r)$LDF
-
- eval(f:EDF,var:Symbol,l:LDF):LDF ==
- empty?(l)$LDF => [0$DF]
- ve := var::EDF
- [retract(eval(f,equation(ve,u::EDF)$EEDF)$EDF)@DF for u in l]
-
- numberOfSignChanges(l:LDF):INT ==
- -- calculates the number of sign changes in a list
- a := 0$INT
- empty?(l)$LDF => 0
- for i in 2..# l repeat
- if negative?(l.i*l.(i-1)) then
- a := a + 1
- a
-
- rangeOfArgument(k: KEDF, args:NIA): DF ==
- Args := copy args
- Args.fn := arg := first(argument(k)$KEDF)$LEDF
- functionIsContinuousAtEndPoints(Args) case continuous =>
- r:SOCDF := args.range
- low:EDF := (getlo r) :: EDF
- high:EDF := (gethi r) :: EDF
- eql := equation(a := args.var :: EDF, low)$EEDF
- eqh := equation(a, high)$EEDF
- e1 := (numeric(eval(arg,eql)$EDF)$Numeric(DF)) :: DF
- e2 := (numeric(eval(arg,eqh)$EDF)$Numeric(DF)) :: DF
- e2-e1
- 0$DF
-
- ocdf2ocefi(r:OCDF):OCEFI ==
- finite?(r)$OCDF => (edf2efi(((retract(r)@DF)$OCDF)::EDF))::OCEFI
- r pretend OCEFI
-
- continuousAtPoint?(f:EFI,e:EOCEFI):Boolean ==
- (l := limit(f,e)$PowerSeriesLimitPackage(FI,EFI)) case OCEFI =>
- finite?(l :: OCEFI)
- -- if the left hand limit equals the right hand limit, or if neither
- -- side has a limit at this point, the return type of limit() is
- -- Union(Ordered Completion Expression Fraction Integer,"failed")
- false
-
- -- exported functions
-
- rangeIsFiniteFunction(args:NIA): RTYPE ==
- -- rangeIsFinite(x) tests the endpoints of x.range for infinite
- -- end points.
- -- [-inf, inf] => 4
- -- [ x , inf] => 3
- -- [-inf, x ] => 1
- -- [ x , y ] => 0
- fr:SI := (3::SI * whatInfinity(hi(args.range))$OCDF
- - whatInfinity(lo(args.range))$OCDF)
- fr = 0 => ["The range is finite"]
- fr = 1 => ["The bottom of range is infinite"]
- fr = 3 => ["The top of range is infinite"]
- fr = 4 => ["Both top and bottom points are infinite"]
- error("rangeIsFinite",["this is not a valid range"])$ErrorFunctions
-
- rangeIsFinite(args:NIA): RTYPE ==
- nia := copy args
- (t := showAttributes(nia)$IntegrationFunctionsTable) case ATT =>
- s := coerce(t)@ATT
- s.range case notEvaluated =>
- s.range := rangeIsFiniteFunction(nia)
- r:ROA := [nia,s]
- insert!(r)$IntegrationFunctionsTable
- s.range
- s.range
- a:ATT := [["End point continuity not yet evaluated"],
- ["Internal singularities not yet evaluated"],
- e:=rangeIsFiniteFunction(nia)]
- r:ROA := [nia,a]
- insert!(r)$IntegrationFunctionsTable
- e
-
- functionIsContinuousAtEndPointsFunction(args:NIA):CTYPE ==
-
- v := args.var :: EFI :: OCEFI
- high:OCEFI := ocdf2ocefi(hi(args.range))
- low:OCEFI := ocdf2ocefi(lo(args.range))
- f := edf2efi(args.fn)
- l:Boolean := continuousAtPoint?(f,equation(v,low)$EOCEFI)
- h:Boolean := continuousAtPoint?(f,equation(v,high)$EOCEFI)
- l and h => ["Continuous at the end points"]
- l => ["There is a singularity at the upper end point"]
- h => ["There is a singularity at the lower end point"]
- ["There are singularities at both end points"]
-
- functionIsContinuousAtEndPoints(args:NIA): CTYPE ==
- nia := copy args
- (t := showAttributes(nia)$IntegrationFunctionsTable) case ATT =>
- s := coerce(t)@ATT
- s.endPointContinuity case notEvaluated =>
- s.endPointContinuity := functionIsContinuousAtEndPointsFunction(nia)
- r:ROA := [nia,s]
- insert!(r)$IntegrationFunctionsTable
- s.endPointContinuity
- s.endPointContinuity
- a:ATT := [e:=functionIsContinuousAtEndPointsFunction(nia),
- ["Internal singularities not yet evaluated"],
- ["Range not yet evaluated"]]
- r:ROA := [nia,a]
- insert!(r)$IntegrationFunctionsTable
- e
-
- functionIsOscillatory(a:NIA):F ==
-
- args := copy a
- k := tower(numerator args.fn)$EDF
- p:F := pi()$F
- for i in 1..# k repeat
- is?(ker := k.i, sin :: Symbol) =>
- ra := convert(rangeOfArgument(ker,args))@F
- ra > 2*p => return (ra/p)
- is?(ker, cos :: Symbol) =>
- ra := convert(rangeOfArgument(ker,args))@F
- ra > 2*p => return (ra/p)
- l:LDF := rand(args.range,30)
- l := eval(args.fn,args.var,l)
- numberOfSignChanges(l) :: F
-
- singularitiesOf(args:NIA):SDF ==
- nia := copy args
- (t := showAttributes(nia)$IntegrationFunctionsTable) case ATT =>
- s:ATT := coerce(t)@ATT
- p:STYPE := s.singularitiesStream
- p case str => p.str
- e:SDF := singularitiesOf(nia.fn,[nia.var],nia.range)
- if not empty?(e) then
- if less?(e,10)$SDF then extend(e,10)$SDF
- s.singularitiesStream := [e]
- r:ROA := [nia,s]
- insert!(r)$IntegrationFunctionsTable
- e
- e:=singularitiesOf(nia.fn,[nia.var],nia.range)
- if not empty?(e) then
- if less?(e,10)$SDF then extend(e,10)$SDF
- a:ATT := [["End point continuity not yet evaluated"],[e],
- ["Range not yet evaluated"]]
- r:ROA := [nia,a]
- insert!(r)$IntegrationFunctionsTable
- e
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain INTFTBL IntegrationFunctionsTable>>
-<<package D01AGNT d01AgentsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d01routine.spad.pamphlet b/src/algebra/d01routine.spad.pamphlet
deleted file mode 100644
index 66dbccf8..00000000
--- a/src/algebra/d01routine.spad.pamphlet
+++ /dev/null
@@ -1,746 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d01routine.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain D01AJFA d01ajfAnnaType}
-<<domain D01AJFA d01ajfAnnaType>>=
-)abbrev domain D01AJFA d01ajfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01ajfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01AJF, a general numerical integration routine which
-++ can handle some singularities in the input function. The function
-++ \axiomFun{measure} measures the usefulness of the routine D01AJF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01ajfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, NagIntegrationPackage, d01AgentsPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- pp:SDF := singularitiesOf(args)
- not (empty?(pp)$SDF) =>
- [0.1,"d01ajf: There is a possible problem at the following point(s): "
- commaSeparate(sdf2lst(pp)) ,ext]
- [getMeasure(R,d01ajf :: S)$RT,
- "The general routine d01ajf is our default",ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
- b:Float := getButtonValue("d01ajf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
- d01ajf(getlo(args.range),gethi(args.range),args.abserr,args.relerr,4*iw,iw,-1,f)
-
-@
-\section{domain D01AKFA d01akfAnnaType}
-<<domain D01AKFA d01akfAnnaType>>=
-)abbrev domain D01AKFA d01akfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01akfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01AKF, a numerical integration routine which is
-++ is suitable for oscillating, non-singular functions. The function
-++ \axiomFun{measure} measures the usefulness of the routine D01AKF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01akfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- pp:SDF := singularitiesOf(args)
- not (empty?(pp)$SDF) =>
- [0.0,"d01akf: There is a possible problem at the following point(s): "
- commaSeparate(sdf2lst(pp)) ,ext]
- o:Float := functionIsOscillatory(args)
- one := 1.0
- m:Float := (getMeasure(R,d01akf@S)$RT)*(one-one/(one+sqrt(o)))**2
- m > 0.8 => [m,"d01akf: The expression shows much oscillation",ext]
- m > 0.6 => [m,"d01akf: The expression shows some oscillation",ext]
- m > 0.5 => [m,"d01akf: The expression shows little oscillation",ext]
- [m,"d01akf: The expression shows little or no oscillation",ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
- b:Float := getButtonValue("d01akf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
- d01akf(getlo(args.range),gethi(args.range),args.abserr,args.relerr,4*iw,iw,-1,f)
-
-@
-\section{domain D01AMFA d01amfAnnaType}
-<<domain D01AMFA d01amfAnnaType>>=
-)abbrev domain D01AMFA d01amfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01amfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01AMF, a general numerical integration routine which
-++ can handle infinite or semi-infinite range of the input function. The
-++ function \axiomFun{measure} measures the usefulness of the routine D01AMF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01amfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- Range:=rangeIsFinite(args)
- pp:SDF := singularitiesOf(args)
- not (empty?(pp)$SDF) =>
- [0.0,"d01amf: There is a possible problem at the following point(s): "
- commaSeparate(sdf2lst(pp)), ext]
- [getMeasure(R,d01amf@S)$RT, "d01amf is a reasonable choice if the "
- "integral is infinite or semi-infinite and d01transform cannot "
- "do better than using general routines",ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- r:INT
- bound:DF
- ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
- b:Float := getButtonValue("d01amf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 150*fEvals
- f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
- Range:=rangeIsFinite(args)
- if (Range case upperInfinite) then
- bound := getlo(args.range)
- r := 1
- else if (Range case lowerInfinite) then
- bound := gethi(args.range)
- r := -1
- else
- bound := 0$DF
- r := 2
- d01amf(bound,r,args.abserr,args.relerr,4*iw,iw,-1,f)
-
-@
-\section{domain D01APFA d01apfAnnaType}
-<<domain D01APFA d01apfAnnaType>>=
-)abbrev domain D01APFA d01apfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01apfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01APF, a general numerical integration routine which
-++ can handle end point singularities of the algebraico-logarithmic form
-++ w(x) = (x-a)^c * (b-x)^d. The
-++ function \axiomFun{measure} measures the usefulness of the routine D01APF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01apfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, NagIntegrationPackage, d01AgentsPackage, d01WeightsPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- d := (c := 0$DF)
- if ((a := exprHasAlgebraicWeight(args)) case LDF) then
- if (a.1 > -1) then c := a.1
- if (a.2 > -1) then d := a.2
- l:INT := exprHasLogarithmicWeights(args)
- (zero? c) and (zero? d) and (one? l) =>
- [0.0,"d01apf: A suitable singularity has not been found", ext]
- out:LDF := [c,d,l :: DF]
- outany:Any := coerce(out)$AnyFunctions1(LDF)
- ex:Record(key:S,entry:Any) := [d01apfextra@S,outany]
- ext := insert!(ex,ext)$Result
- st:ST := "Recommended is d01apf with c = " df2st(c) ", d = "
- df2st(d) " and l = " string(l)$ST
- [getMeasure(R,d01apf@S)$RT, st, ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
-
- Var:EDF := coerce(args.var)$EDF
- la:Any := coerce(search((d01apfextra@S),hints)$Result)@Any
- list:LDF := retract(la)$AnyFunctions1(LDF)
- Fac1:EDF := (Var - (getlo(args.range) :: EDF))$EDF
- Fac2:EDF := ((gethi(args.range) :: EDF) - Var)$EDF
- c := first(list)$LDF
- d := second(list)$LDF
- l := (retract(third(list)$LDF)@INT)$DF
- thebiz:EDF := (Fac1**(c :: EDF))*(Fac2**(d :: EDF))
- if l > 1 then
- if l = 2 then
- thebiz := thebiz*log(Fac1)
- else if l = 3 then
- thebiz := thebiz*log(Fac2)
- else
- thebiz := thebiz*log(Fac1)*log(Fac2)
- Fn := (args.fn/thebiz)$EDF
- ArgsFn := map(convert(#1)$DF,Fn)$EF2(DF,Float)
- b:Float := getButtonValue("d01apf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
- d01apf(getlo(args.range),gethi(args.range),c,d,l,args.abserr,args.relerr,4*iw,iw,-1,f)
-
-@
-\section{domain D01AQFA d01aqfAnnaType}
-<<domain D01AQFA d01aqfAnnaType>>=
-)abbrev domain D01AQFA d01aqfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01aqfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01AQF, a general numerical integration routine which
-++ can solve an integral of the form \newline
-++ \centerline{\inputbitmap{/home/bjd/Axiom/anna/hypertex/bitmaps/d01aqf.xbm}}
-++ The function \axiomFun{measure} measures the usefulness of the routine
-++ D01AQF for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01aqfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- Den := denominator(args.fn)
- one? Den =>
- [0.0,"d01aqf: A suitable weight function has not been found", ext]
- listOfZeros:LDF := problemPoints(args.fn,args.var,args.range)
- numberOfZeros := (#(listOfZeros))$LDF
- zero?(numberOfZeros) =>
- [0.0,"d01aqf: A suitable weight function has not been found", ext]
- numberOfZeros = 1 =>
- s:SDF := singularitiesOf(args)
- more?(s,1)$SDF =>
- [0.0,"d01aqf: Too many singularities have been found", ext]
- cFloat:Float := (convert(first(listOfZeros)$LDF)@Float)$DF
- cString:ST := (convert(cFloat)@ST)$Float
- lany:Any := coerce(listOfZeros)$AnyFunctions1(LDF)
- ex:Record(key:S,entry:Any) := [d01aqfextra@S,lany]
- ext := insert!(ex,ext)$Result
- [getMeasure(R,d01aqf@S)$RT, "Recommended is d01aqf with the "
- "hilbertian weight function of 1/(x-c) where c = " cString, ext]
- [0.0,"d01aqf: More than one factor has been found and so does not "
- "have a suitable weight function",ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- Args := copy args
- ca:Any := coerce(search((d01aqfextra@S),hints)$Result)@Any
- c:DF := first(retract(ca)$AnyFunctions1(LDF))$LDF
- ci:FI := df2fi(c)$ExpertSystemToolsPackage
- Var:EFI := Args.var :: EFI
- Gx:EFI := (Var-(ci::EFI))*(edf2efi(Args.fn)$ExpertSystemToolsPackage)
- ArgsFn := map(convert(#1)$FI,Gx)$EF2(FI,Float)
- b:Float := getButtonValue("d01aqf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
- d01aqf(getlo(Args.range),gethi(Args.range),c,Args.abserr,Args.relerr,4*iw,iw,-1,f)
-
-@
-\section{domain D01ALFA d01alfAnnaType}
-<<domain D01ALFA d01alfAnnaType>>=
-)abbrev domain D01ALFA d01alfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01alfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01ALF, a general numerical integration routine which
-++ can handle a list of singularities. The
-++ function \axiomFun{measure} measures the usefulness of the routine D01ALF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01alfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- streamOfZeros:SDF := singularitiesOf(args)
- listOfZeros:LST := removeDuplicates!(sdf2lst(streamOfZeros))
- numberOfZeros:INT := # listOfZeros
- (numberOfZeros > 15)@Boolean =>
- [0.0,"d01alf: The list of singularities is too long", ext]
- positive?(numberOfZeros) =>
- l:LDF := entries(complete(streamOfZeros)$SDF)$SDF
- lany:Any := coerce(l)$AnyFunctions1(LDF)
- ex:Record(key:S,entry:Any) := [d01alfextra@S,lany]
- ext := insert!(ex,ext)$Result
- st:ST := "Recommended is d01alf with the singularities "
- commaSeparate(listOfZeros)
- m :=
- one?(numberOfZeros) => 0.4
- getMeasure(R,d01alf@S)$RT
- [m, st, ext]
- [0.0, "d01alf: A list of suitable singularities has not been found", ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- la:Any := coerce(search((d01alfextra@S),hints)$Result)@Any
- listOfZeros:LDF := retract(la)$AnyFunctions1(LDF)
- l:= removeDuplicates(listOfZeros)$LDF
- n:Integer := (#(l))$List(DF)
- M:Matrix DF := matrix([l])$(Matrix DF)
- b:Float := getButtonValue("d01alf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
- f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
- d01alf(getlo(args.range),gethi(args.range),n,M,args.abserr,args.relerr,2*n*iw,n*iw,-1,f)
-
-@
-\section{domain D01ANFA d01anfAnnaType}
-<<domain D01ANFA d01anfAnnaType>>=
-)abbrev domain D01ANFA d01anfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01anfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01ANF, a numerical integration routine which can
-++ handle weight functions of the form cos(\omega x) or sin(\omega x). The
-++ function \axiomFun{measure} measures the usefulness of the routine D01ANF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01anfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01WeightsPackage, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- weight:Union(Record(op:BOP,w:DF),"failed") :=
- exprHasWeightCosWXorSinWX(args)
- weight case Record(op:BOP,w:DF) =>
- wany := coerce(weight)$AnyFunctions1(Record(op:BOP,w:DF))
- ex:Record(key:S,entry:Any) := [d01anfextra@S,wany]
- ext := insert!(ex,ext)$Result
- ws:ST := string(name(weight.op)$BOP)$S "(" df2st(weight.w)
- string(args.var)$S ")"
- [getMeasure(R,d01anf@S)$RT,
- "d01anf: The expression has a suitable weight:- " ws, ext]
- [0.0,"d01anf: A suitable weight has not been found", ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- a:INT
- r:Any := coerce(search((d01anfextra@S),hints)$Result)@Any
- rec:Record(op:BOP,w:DF) := retract(r)$AnyFunctions1(Record(op:BOP,w:DF))
- Var := args.var :: EDF
- o:BOP := rec.op
- den:EDF := o((rec.w*Var)$EDF)
- Argsfn:EDF := args.fn/den
- if (name(o) = cos@S)@Boolean then a := 1
- else a := 2
- b:Float := getButtonValue("d01anf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- ArgsFn := map(convert(#1)$DF,Argsfn)$EF2(DF,Float)
- f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
- d01anf(getlo(args.range),gethi(args.range),rec.w,a,args.abserr,args.relerr,4*iw,iw,-1,f)
-
-@
-\section{domain D01ASFA d01asfAnnaType}
-<<domain D01ASFA d01asfAnnaType>>=
-)abbrev domain D01ASFA d01asfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01asfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01ASF, a numerical integration routine which can
-++ handle weight functions of the form cos(\omega x) or sin(\omega x) on an
-++ semi-infinite range. The
-++ function \axiomFun{measure} measures the usefulness of the routine D01ASF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01asfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01WeightsPackage, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:NIA) ==
- ext:Result := empty()$Result
- Range := rangeIsFinite(args)
- not(Range case upperInfinite) =>
- [0.0,"d01asf is not a suitable routine for infinite integrals",ext]
- weight: Union(Record(op:BOP,w:DF),"failed") :=
- exprHasWeightCosWXorSinWX(args)
- weight case Record(op:BOP,w:DF) =>
- wany := coerce(weight)$AnyFunctions1(Record(op:BOP,w:DF))
- ex:Record(key:S,entry:Any) := [d01asfextra@S,wany]
- ext := insert!(ex,ext)$Result
- ws:ST := string(name(weight.op)$BOP)$S "(" df2st(weight.w)
- string(args.var)$S ")"
- [getMeasure(R,d01asf@S)$RT,
- "d01asf: A suitable weight has been found:- " ws, ext]
- [0.0,"d01asf: A suitable weight has not been found", ext]
-
- numericalIntegration(args:NIA,hints:Result) ==
- i:INT
- r:Any := coerce(search((d01asfextra@S),hints)$Result)@Any
- rec:Record(op:BOP,w:DF) := retract(r)$AnyFunctions1(Record(op:BOP,w:DF))
- Var := args.var :: EDF
- o:BOP := rec.op
- den:EDF := o((rec.w*Var)$EDF)
- Argsfn:EDF := args.fn/den
- if (name(o) = cos@S)@Boolean then i := 1
- else i := 2
- b:Float := getButtonValue("d01asf","functionEvaluations")$AttributeButtons
- fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
- iw:INT := 75*fEvals
- ArgsFn := map(convert(#1)$DF,Argsfn)$EF2(DF,Float)
- f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
- err :=
- positive?(args.abserr) => args.abserr
- args.relerr
- d01asf(getlo(args.range),rec.w,i,err,50,4*iw,2*iw,-1,f)
-
-@
-\section{domain D01GBFA d01gbfAnnaType}
-<<domain D01GBFA d01gbfAnnaType>>=
-)abbrev domain D01GBFA d01gbfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01gbfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01GBF, a numerical integration routine which can
-++ handle multi-dimensional quadrature over a finite region. The
-++ function \axiomFun{measure} measures the usefulness of the routine D01GBF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01gbfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:MDNIA) ==
- ext:Result := empty()$Result
- (rel := args.relerr) < 0.01 :: DF =>
- [0.1, "d01gbf: The relative error requirement is too small",ext]
- segs := args.range
- vars := variables(args.fn)$EDF
- for i in 1..# vars repeat
- nia:NIA := [vars.i,args.fn,segs.i,args.abserr,rel]
- not rangeIsFinite(nia) case finite => return
- [0.0,"d01gbf is not a suitable routine for infinite integrals",ext]
- [getMeasure(R,'d01gbf)$RT, "Recommended is d01gbf", ext]
-
- numericalIntegration(args:MDNIA,hints:Result) ==
- import Integer
- segs := args.range
- dim:INT := # segs
- low:Matrix DF := matrix([[getlo(segs.i) for i in 1..dim]])$(Matrix DF)
- high:Matrix DF := matrix([[gethi(segs.i) for i in 1..dim]])$(Matrix DF)
- b:Float := getButtonValue("d01gbf","functionEvaluations")$AttributeButtons
- a:Float:= exp(1.1513*(1.0/(2.0*(1.0-b))))
- maxcls:INT := 1500*(dim+1)*(fEvals:INT := wholePart(a))
- mincls:INT := 300*fEvals
- c:Float := nthRoot((maxcls::Float)/4.0,dim)$Float
- lenwrk:INT := 3*dim*(d:INT := wholePart(c))+10*dim
- wrkstr:Matrix DF := matrix([[0$DF for i in 1..lenwrk]])$(Matrix DF)
- ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
- f : Union(fn:FileName,fp:Asp4(FUNCTN)) := [retract(ArgsFn)$Asp4(FUNCTN)]
- out:Result := d01gbf(dim,low,high,maxcls,args.relerr,lenwrk,mincls,wrkstr,-1,f)
- changeName(finest@Symbol,result@Symbol,out)
-
-@
-\section{domain D01FCFA d01fcfAnnaType}
-<<domain D01FCFA d01fcfAnnaType>>=
-)abbrev domain D01FCFA d01fcfAnnaType
-++ Author: Brian Dupee
-++ Date Created: March 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{d01fcfAnnaType} is a domain of \axiomType{NumericalIntegrationCategory}
-++ for the NAG routine D01FCF, a numerical integration routine which can
-++ handle multi-dimensional quadrature over a finite region. The
-++ function \axiomFun{measure} measures the usefulness of the routine D01GBF
-++ for the given problem. The function \axiomFun{numericalIntegration}
-++ performs the integration by using \axiomType{NagIntegrationPackage}.
-
-d01fcfAnnaType(): NumericalIntegrationCategory == Result add
- EF2 ==> ExpressionFunctions2
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- SDF ==> Stream DoubleFloat
- DF ==> DoubleFloat
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- MDNIA ==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- S ==> Symbol
- ST ==> String
- LST ==> List String
- RT ==> RoutinesTable
- Rep:=Result
- import Rep, d01AgentsPackage, NagIntegrationPackage
-
- measure(R:RT,args:MDNIA) ==
- ext:Result := empty()$Result
- segs := args.range
- vars := variables(args.fn)$EDF
- for i in 1..# vars repeat
- nia:NIA := [vars.i,args.fn,segs.i,args.abserr,args.relerr]
- not rangeIsFinite(nia) case finite => return
- [0.0,"d01fcf is not a suitable routine for infinite integrals",ext]
- [getMeasure(R,d01fcf@S)$RT, "Recommended is d01fcf", ext]
-
- numericalIntegration(args:MDNIA,hints:Result) ==
- import Integer
- segs := args.range
- dim := # segs
- err := args.relerr
- low:Matrix DF := matrix([[getlo(segs.i) for i in 1..dim]])$(Matrix DF)
- high:Matrix DF := matrix([[gethi(segs.i) for i in 1..dim]])$(Matrix DF)
- b:Float := getButtonValue("d01fcf","functionEvaluations")$AttributeButtons
- a:Float:= exp(1.1513*(1.0/(2.0*(1.0-b))))
- alpha:INT := 2**dim+2*dim**2+2*dim+1
- d:Float := max(1.e-3,nthRoot(convert(err)@Float,4))$Float
- minpts:INT := (fEvals := wholePart(a))*wholePart(alpha::Float/d)
- maxpts:INT := 5*minpts
- lenwrk:INT := (dim+2)*(1+(33*fEvals))
- ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
- f : Union(fn:FileName,fp:Asp4(FUNCTN)) := [retract(ArgsFn)$Asp4(FUNCTN)]
- out:Result := d01fcf(dim,low,high,maxpts,err,lenwrk,minpts,-1,f)
- changeName(finval@Symbol,result@Symbol,out)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain D01AJFA d01ajfAnnaType>>
-<<domain D01AKFA d01akfAnnaType>>
-<<domain D01AMFA d01amfAnnaType>>
-<<domain D01AQFA d01aqfAnnaType>>
-<<domain D01APFA d01apfAnnaType>>
-<<domain D01ALFA d01alfAnnaType>>
-<<domain D01ANFA d01anfAnnaType>>
-<<domain D01ASFA d01asfAnnaType>>
-<<domain D01GBFA d01gbfAnnaType>>
-<<domain D01FCFA d01fcfAnnaType>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d01transform.spad.pamphlet b/src/algebra/d01transform.spad.pamphlet
deleted file mode 100644
index 29cd588f..00000000
--- a/src/algebra/d01transform.spad.pamphlet
+++ /dev/null
@@ -1,212 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d01transform.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain D01TRNS d01TransformFunctionType}
-<<domain D01TRNS d01TransformFunctionType>>=
-)abbrev domain D01TRNS d01TransformFunctionType
-++ Author: Brian Dupee
-++ Date Created: April 1994
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, numericalIntegration
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ Since an infinite integral cannot be evaluated numerically
-++ it is necessary to transform the integral onto finite ranges.
-++ \axiomType{d01TransformFunctionType} uses the mapping \spad{x -> 1/x}
-++ and contains the functions \axiomFun{measure} and
-++ \axiomFun{numericalIntegration}.
-EDF ==> Expression DoubleFloat
-EEDF ==> Equation Expression DoubleFloat
-FI ==> Fraction Integer
-EFI ==> Expression Fraction Integer
-EEFI ==> Equation Expression Fraction Integer
-EF2 ==> ExpressionFunctions2
-DF ==> DoubleFloat
-F ==> Float
-SOCDF ==> Segment OrderedCompletion DoubleFloat
-OCDF ==> OrderedCompletion DoubleFloat
-NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
-INT ==> Integer
-PI ==> PositiveInteger
-HINT ==> Record(str:String,fn:EDF,range:SOCDF,ext:Result)
-S ==> Symbol
-ST ==> String
-LST ==> List String
-Measure ==> Record(measure:F,explanations:ST,extra:Result)
-MS ==> Record(measure:F,name:ST,explanations:LST,extra:Result)
-
-d01TransformFunctionType():NumericalIntegrationCategory == Result add
- Rep:=Result
- import d01AgentsPackage,Rep
-
- rec2any(re:Record(str:ST,fn:EDF,range:SOCDF)):Any ==
- coerce(re)$AnyFunctions1(Record(str:ST,fn:EDF,range:SOCDF))
-
- changeName(ans:Result,name:ST):Result ==
- sy:S := coerce(name "Answer")$S
- anyAns:Any := coerce(ans)$AnyFunctions1(Result)
- construct([[sy,anyAns]])$Result
-
- getIntegral(args:NIA,hint:HINT) : Result ==
- Args := copy args
- Args.fn := hint.fn
- Args.range := hint.range
- integrate(Args::NumericalIntegrationProblem)$AnnaNumericalIntegrationPackage
-
- transformFunction(args:NIA) : NIA ==
- Args := copy args
- Var := Args.var :: EFI -- coerce Symbol to EFI
- NewVar:EFI := inv(Var)$EFI -- invert it
- VarEqn:EEFI:=equation(Var,NewVar)$EEFI -- turn it into an equation
- Afn:EFI := edf2efi(Args.fn)$ExpertSystemToolsPackage
- Afn := subst(Afn,VarEqn)$EFI -- substitute into function
- Var2:EFI := Var**2
- Afn:= simplify(Afn/Var2)$TranscendentalManipulations(FI,EFI)
- Args.fn:= map(convert(#1)$FI,Afn)$EF2(FI,DF)
- Args
-
- doit(seg:SOCDF,args:NIA):MS ==
- Args := copy args
- Args.range := seg
- measure(Args::NumericalIntegrationProblem)$AnnaNumericalIntegrationPackage
-
- transform(c:Boolean,args:NIA):Measure ==
- if c then
- l := coerce(recip(lo(args.range)))@OCDF
- Seg:SOCDF := segment(0$OCDF,l)
- else
- h := coerce(recip(hi(args.range)))@OCDF
- Seg:SOCDF := segment(h,0$OCDF)
- Args := transformFunction(args)
- m:MS := doit(Seg,Args)
- out1:ST :=
- "The recommendation is to transform the function and use " m.name
- out2:List(HINT) := [[m.name,Args.fn,Seg,m.extra]]
- out2Any:Any := coerce(out2)$AnyFunctions1(List(HINT))
- ex:Record(key:S,entry:Any) := [d01transformextra@S,out2Any]
- extr:Result := construct([ex])$Result
- [m.measure,out1,extr]
-
- split(c:PI,args:NIA):Measure ==
- Args := copy args
- Args.relerr := Args.relerr/2
- Args.abserr := Args.abserr/2
- if (c = 1)@Boolean then
- seg1:SOCDF := segment(-1$OCDF,1$OCDF)
- else if (c = 2)@Boolean then
- seg1 := segment(lo(Args.range),1$OCDF)
- else
- seg1 := segment(-1$OCDF,hi(Args.range))
- m1:MS := doit(seg1,Args)
- Args := transformFunction Args
- if (c = 2)@Boolean then
- seg2:SOCDF := segment(0$OCDF,1$OCDF)
- else if (c = 3)@Boolean then
- seg2 := segment(-1$OCDF,0$OCDF)
- else seg2 := seg1
- m2:MS := doit(seg2,Args)
- m1m:F := m1.measure
- m2m:F := m2.measure
- m:F := m1m*m2m/((m1m*m2m)+(1.0-m1m)*(1.0-m2m))
- out1:ST := "The recommendation is to transform the function and use "
- m1.name " and " m2.name
- out2:List(HINT) :=
- [[m1.name,args.fn,seg1,m1.extra],[m2.name,Args.fn,seg2,m2.extra]]
- out2Any:Any := coerce(out2)$AnyFunctions1(List(HINT))
- ex:Record(key:S,entry:Any) := [d01transformextra@S,out2Any]
- extr:Result := construct([ex])$Result
- [m,out1,extr]
-
- measure(R:RoutinesTable,args:NIA) ==
- Range:=rangeIsFinite(args)
- Range case upperInfinite =>
- positive?(lo(args.range))$OCDF =>
- transform(true,args)
- split(2,args)
- Range case lowerInfinite =>
- negative?(hi(args.range))$OCDF =>
- transform(false,args)
- split(3,args)
- split(1,args)
-
- numericalIntegration(args:NIA,hints:Result) ==
- mainResult:DF := mainAbserr:DF := 0$DF
- ans:Result := empty()$Result
- hla:Any := coerce(search((d01transformextra@S),hints)$Result)@Any
- hintList := retract(hla)$AnyFunctions1(List(HINT))
- methodName:ST := empty()$ST
- repeat
- if (empty?(hintList)$(List(HINT)))
- then leave
- item := first(hintList)$List(HINT)
- a:Result := getIntegral(args,item)
- anyRes := coerce(search((result@S),a)$Result)@Any
- midResult := retract(anyRes)$AnyFunctions1(DF)
- anyErr := coerce(search((abserr pretend S),a)$Result)@Any
- midAbserr := retract(anyErr)$AnyFunctions1(DF)
- mainResult := mainResult+midResult
- mainAbserr := mainAbserr+midAbserr
- if (methodName = item.str)@Boolean then
- methodName := concat([item.str,"1"])$ST
- else
- methodName := item.str
- ans := concat(ans,changeName(a,methodName))$ExpertSystemToolsPackage
- hintList := rest(hintList)$(List(HINT))
- anyResult := coerce(mainResult)$AnyFunctions1(DF)
- anyAbserr := coerce(mainAbserr)$AnyFunctions1(DF)
- recResult:Record(key:S,entry:Any):=[result@S,anyResult]
- recAbserr:Record(key:S,entry:Any):=[abserr pretend S,anyAbserr]
- insert!(recAbserr,insert!(recResult,ans))$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain D01TRNS d01TransformFunctionType>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d01weights.spad.pamphlet b/src/algebra/d01weights.spad.pamphlet
deleted file mode 100644
index dc0f1b2b..00000000
--- a/src/algebra/d01weights.spad.pamphlet
+++ /dev/null
@@ -1,309 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d01weights.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package D01WGTS d01WeightsPackage}
-<<package D01WGTS d01WeightsPackage>>=
-)abbrev package D01WGTS d01WeightsPackage
-++ Author: Brian Dupee
-++ Date Created: July 1994
-++ Date Last Updated: January 1998 (Bug fix - exprHasListOfWeightsCosWXorSinWX)
-++ Basic Operations: exprHasWeightCosWXorSinWX, exprHasAlgebraicWeight,
-++ exprHasLogarithmicWeights
-++ Description:
-++ \axiom{d01WeightsPackage} is a package for functions used to investigate
-++ whether a function can be divided into a simpler function and a weight
-++ function. The types of weights investigated are those giving rise to
-++ end-point singularities of the algebraico-logarithmic type, and
-++ trigonometric weights.
-d01WeightsPackage(): E == I where
- LEDF ==> List Expression DoubleFloat
- KEDF ==> Kernel Expression DoubleFloat
- LKEDF ==> List Kernel Expression DoubleFloat
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- FI ==> Fraction Integer
- LDF ==> List DoubleFloat
- DF ==> DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
- NIA ==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
- INT ==> Integer
- BOP ==> BasicOperator
- URBODF ==> Union(Record(op:BasicOperator,w:DF),"failed")
- LURBODF ==> List(Union(Record(op:BasicOperator,w:DF), "failed"))
-
- E ==> with
- exprHasWeightCosWXorSinWX:NIA -> URBODF
- ++ \axiom{exprHasWeightCosWXorSinWX} looks for trigonometric
- ++ weights in an expression of the form \axiom{cos \omega x} or
- ++ \axiom{sin \omega x}, returning the value of \omega
- ++ (\notequal 1) and the operator.
- exprHasAlgebraicWeight:NIA -> Union(LDF,"failed")
- ++ \axiom{exprHasAlgebraicWeight} looks for algebraic weights
- ++ giving rise to singularities of the function at the end-points.
- exprHasLogarithmicWeights:NIA -> INT
- ++ \axiom{exprHasLogarithmicWeights} looks for logarithmic weights
- ++ giving rise to singularities of the function at the end-points.
-
-
-
- I ==> add
- score:(EDF,EDF) -> FI
- kernelIsLog:KEDF -> Boolean
- functionIsPolynomial?:EDF -> Boolean
- functionIsNthRoot?:(EDF,EDF) -> Boolean
- functionIsQuotient:EDF -> Union(EDF,"failed")
- findCommonFactor:LEDF -> Union(LEDF,"failed")
- findAlgebraicWeight:(NIA,EDF) -> Union(DF,"failed")
- exprHasListOfWeightsCosWXorSinWX:(EDF,Symbol) -> LURBODF
- exprOfFormCosWXorSinWX:(EDF,Symbol) -> URBODF
- bestWeight:LURBODF -> URBODF
- weightIn?:(URBODF,LURBODF) -> Boolean
- inRest?:(EDF,LEDF)->Boolean
- factorIn?:(EDF,LEDF)->Boolean
- voo?:(EDF,EDF)->Boolean
-
- kernelIsLog(k:KEDF):Boolean ==
- (name operator k = (log :: Symbol))@Boolean
-
- factorIn?(a:EDF,l:LEDF):Boolean ==
- for i in 1..# l repeat
- (a = l.i)@Boolean => return true
- false
-
- voo?(b:EDF,a:EDF):Boolean ==
- (voo:=isTimes(b)) case LEDF and factorIn?(a,voo)
-
- inRest?(a:EDF,l:LEDF):Boolean ==
- every?( voo?(#1,a) ,l)
-
- findCommonFactor(l:LEDF):Union(LEDF,"failed") ==
- empty?(l)$LEDF => "failed"
- f := first(l)$LEDF
- r := rest(l)$LEDF
- (t := isTimes(f)$EDF) case LEDF =>
- pos:=select(inRest?(#1,r),t)
- empty?(pos) => "failed"
- pos
- "failed"
-
- exprIsLogarithmicWeight(f:EDF,Var:EDF,a:EDF,b:EDF):INT ==
- ans := 0$INT
- k := tower(f)$EDF
- lf := select(kernelIsLog,k)$LKEDF
- empty?(lf)$LKEDF => ans
- for i in 1..# lf repeat
- arg := argument lf.i
- if (arg.1 = (Var - a)) then
- ans := ans + 1
- else if (arg.1 = (b - Var)) then
- ans := ans + 2
- ans
-
- exprHasLogarithmicWeights(args:NIA):INT ==
- ans := 1$INT
- a := getlo(args.range)$d01AgentsPackage :: EDF
- b := gethi(args.range)$d01AgentsPackage :: EDF
- Var := args.var :: EDF
- (l := isPlus numerator args.fn) case LEDF =>
- (cf := findCommonFactor l) case LEDF =>
- for j in 1..# cf repeat
- ans := ans + exprIsLogarithmicWeight(cf.j,Var,a,b)
- ans
- ans
- ans := ans + exprIsLogarithmicWeight(args.fn,Var,a,b)
-
- functionIsQuotient(expr:EDF):Union(EDF,"failed") ==
- (k := mainKernel expr) case KEDF =>
- expr = inv(f := k :: KEDF :: EDF)$EDF => f
- one?(numerator expr) => denominator expr
- "failed"
- "failed"
-
- functionIsPolynomial?(f:EDF):Boolean ==
- (retractIfCan(f)@Union(PDF,"failed"))$EDF case PDF
-
- functionIsNthRoot?(f:EDF,e:EDF):Boolean ==
- (m := mainKernel f) case "failed" => false
- (one?(# (kernels f)))
- and (name operator m = (nthRoot :: Symbol))@Boolean
- and (((argument m).1 = e)@Boolean)
-
- score(f:EDF,e:EDF):FI ==
- ans := 0$FI
- (t := isTimes f) case LEDF =>
- for i in 1..# t repeat
- ans := ans + score(t.i,e)
- ans
- (q := functionIsQuotient f) case EDF =>
- ans := ans - score(q,e)
- functionIsPolynomial? f =>
- g:EDF := f/e
- if functionIsPolynomial? g then
- ans := 1+score(g,e)
- else
- ans
- (l := isPlus f) case LEDF =>
- (cf := findCommonFactor l) case LEDF =>
- factor := 1$EDF
- for i in 1..# cf repeat
- factor := factor*cf.i
- ans := ans + score(f/factor,e) + score(factor,e)
- ans
- functionIsNthRoot?(f,e) =>
- (p := isPower f) case "failed" => ans
- exp := p.exponent
- m := mainKernel f
- m case KEDF =>
- arg := argument m
- a:INT := (retract(arg.2)@INT)$EDF
- exp / a
- ans
- ans
-
- findAlgebraicWeight(args:NIA,e:EDF):Union(DF,"failed") ==
- zero?(s := score(args.fn,e)) => "failed"
- s :: DF
-
- exprHasAlgebraicWeight(args:NIA):Union(LDF,"failed") ==
- (f := functionIsContinuousAtEndPoints(args)$d01AgentsPackage)
- case continuous =>"failed"
- Var := args.var :: EDF
- a := getlo(args.range)$d01AgentsPackage :: EDF
- b := gethi(args.range)$d01AgentsPackage :: EDF
- A := Var - a
- B := b - Var
- f case lowerSingular =>
- (h := findAlgebraicWeight(args,A)) case "failed" => "failed"
- [h,0]
- f case upperSingular =>
- (g := findAlgebraicWeight(args,B)) case "failed" => "failed"
- [0,g]
- h := findAlgebraicWeight(args,A)
- g := findAlgebraicWeight(args,B)
- r := (h case "failed")
- s := (g case "failed")
- (r) and (s) => "failed"
- r => [0,coerce(g)@DF]
- s => [coerce(h)@DF,0]
- [coerce(h)@DF,coerce(g)@DF]
-
- exprOfFormCosWXorSinWX(f:EDF,var:Symbol): URBODF ==
- l:LKEDF := kernels(f)$EDF
- one?((# l)$LKEDF)$INT =>
- a:LEDF := argument(e:KEDF := first(l)$LKEDF)$KEDF
- empty?(a) => "failed"
- m:Union(LEDF,"failed") := isTimes(first(a)$LEDF)$EDF
- m case LEDF => -- if it is a list, it will have at least two elements
- is?(second(m)$LEDF,var)$EDF =>
- omega:DF := retract(first(m)$LEDF)@DF
- o:BOP := operator(n:Symbol:=name operator(e)$KEDF)$BOP
- (n = cos@Symbol)@Boolean => [o,omega]
- (n = sin@Symbol)@Boolean => [o,omega]
- "failed"
- "failed"
- "failed"
- "failed"
-
- exprHasListOfWeightsCosWXorSinWX(f:EDF,var:Symbol): LURBODF ==
- (e := isTimes(f)$EDF) case LEDF =>
- [exprOfFormCosWXorSinWX(u,var) for u in e]
- empty?(k := kernels f) => ["failed"]
- ((first(k)::EDF) = f) =>
- [exprOfFormCosWXorSinWX(f,var)]
- ["failed"]
-
- bestWeight(l:LURBODF): URBODF ==
- empty?(l)$LURBODF => "failed"
- best := first(l)$LURBODF -- best is first in list
- empty?(rest(l)$LURBODF) => best
- for i in 2..# l repeat -- unless next is better
- r:URBODF := l.i
- if r case "failed" then leave
- else if best case "failed" then
- best := r
- else if r.w > best.w then
- best := r
- best
-
- weightIn?(weight:URBODF,listOfWeights:LURBODF):Boolean ==
- n := # listOfWeights
- for i in 1..n repeat -- cycle through list
- (weight = listOfWeights.i)@Boolean => return true -- return when found
- false
-
- exprHasWeightCosWXorSinWX(args:NIA):URBODF ==
- ans := empty()$LURBODF
- f:EDF := numerator(args.fn)$EDF
- (t:Union(LEDF,"failed") := isPlus(f)) case "failed" =>
- bestWeight(exprHasListOfWeightsCosWXorSinWX(f,args.var))
- if t case LEDF then
- e1 := first(t)$LEDF
- le1:LURBODF := exprHasListOfWeightsCosWXorSinWX(e1,args.var)
- le1 := [u for u in le1 | (not (u case "failed"))]
- empty?(le1)$LURBODF => "failed"
- test := true
- for i in 1..# le1 repeat
- le1i:URBODF := le1.i
- for j in 2..# t repeat
- if test then
- tj:LURBODF := exprHasListOfWeightsCosWXorSinWX(t.j,args.var)
- test := weightIn?(le1i,tj)
- if test then
- ans := concat([le1i],ans)
- bestWeight ans
- else "failed"
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---Copyright (C) 2007-2009, Gabriel Dos Reis.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package D01WGTS d01WeightsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d02.spad.pamphlet b/src/algebra/d02.spad.pamphlet
deleted file mode 100644
index 79b845f2..00000000
--- a/src/algebra/d02.spad.pamphlet
+++ /dev/null
@@ -1,483 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d02.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGD02 NagOrdinaryDifferentialEquationsPackage}
-<<package NAGD02 NagOrdinaryDifferentialEquationsPackage>>=
-)abbrev package NAGD02 NagOrdinaryDifferentialEquationsPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Mon Jun 20 17:56:33 1994
-++Description:
-++This package uses the NAG Library to calculate the numerical solution of ordinary
-++differential equations. There are two main types of problem,
-++those in which all boundary conditions are specified at one point
-++(initial-value problems), and those in which the boundary
-++conditions are distributed between two or more points (boundary-
-++value problems and eigenvalue problems). Routines are available
-++for initial-value problems, two-point boundary-value problems and
-++Sturm-Liouville eigenvalue problems.
-++See \downlink{Manual Page}{manpageXXd02}.
-NagOrdinaryDifferentialEquationsPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- d02bbf : (DoubleFloat,Integer,Integer,Integer,_
- DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Union(fn:FileName,fp:Asp7(FCN)),Union(fn:FileName,fp:Asp8(OUTPUT))) -> Result
- ++ d02bbf(xend,m,n,irelab,x,y,tol,ifail,fcn,output)
- ++ integrates a system of first-order ordinary differential
- ++ equations over an interval with suitable initial conditions,
- ++ using a Runge-Kutta-Merson method, and returns the solution at
- ++ points specified by the user.
- ++ See \downlink{Manual Page}{manpageXXd02bbf}.
- d02bhf : (DoubleFloat,Integer,Integer,DoubleFloat,_
- DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Union(fn:FileName,fp:Asp9(G)),Union(fn:FileName,fp:Asp7(FCN))) -> Result
- ++ d02bhf(xend,n,irelab,hmax,x,y,tol,ifail,g,fcn)
- ++ integrates a system of first-order ordinary differential
- ++ equations over an interval with suitable initial conditions,
- ++ using a Runge-Kutta-Merson method, until a user-specified
- ++ function of the solution is zero.
- ++ See \downlink{Manual Page}{manpageXXd02bhf}.
- d02cjf : (DoubleFloat,Integer,Integer,DoubleFloat,_
- String,DoubleFloat,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp9(G)),Union(fn:FileName,fp:Asp7(FCN)),Union(fn:FileName,fp:Asp8(OUTPUT))) -> Result
- ++ d02cjf(xend,m,n,tol,relabs,x,y,ifail,g,fcn,output)
- ++ integrates a system of first-order ordinary differential
- ++ equations over a range with suitable initial conditions, using a
- ++ variable-order, variable-step Adams method until a user-specified
- ++ function, if supplied, of the solution is zero, and returns the
- ++ solution at points specified by the user, if desired.
- ++ See \downlink{Manual Page}{manpageXXd02cjf}.
- d02ejf : (DoubleFloat,Integer,Integer,String,_
- Integer,DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Union(fn:FileName,fp:Asp9(G)),Union(fn:FileName,fp:Asp7(FCN)),Union(fn:FileName,fp:Asp31(PEDERV)),Union(fn:FileName,fp:Asp8(OUTPUT))) -> Result
- ++ d02ejf(xend,m,n,relabs,iw,x,y,tol,ifail,g,fcn,pederv,output)
- ++ integrates a stiff system of first-order ordinary
- ++ differential equations over an interval with suitable initial
- ++ conditions, using a variable-order, variable-step method
- ++ implementing the Backward Differentiation Formulae (BDF), until a
- ++ user-specified function, if supplied, of the solution is zero,
- ++ and returns the solution at points specified by the user, if
- ++ desired.
- ++ See \downlink{Manual Page}{manpageXXd02ejf}.
- d02gaf : (Matrix DoubleFloat,Matrix DoubleFloat,Integer,DoubleFloat,_
- DoubleFloat,DoubleFloat,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Integer,Union(fn:FileName,fp:Asp7(FCN))) -> Result
- ++ d02gaf(u,v,n,a,b,tol,mnp,lw,liw,x,np,ifail,fcn)
- ++ solves the two-point boundary-value problem with assigned
- ++ boundary values for a system of ordinary differential equations,
- ++ using a deferred correction technique and a Newton iteration.
- ++ See \downlink{Manual Page}{manpageXXd02gaf}.
- d02gbf : (DoubleFloat,DoubleFloat,Integer,DoubleFloat,_
- Integer,Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Integer,Union(fn:FileName,fp:Asp77(FCNF)),Union(fn:FileName,fp:Asp78(FCNG))) -> Result
- ++ d02gbf(a,b,n,tol,mnp,lw,liw,c,d,gam,x,np,ifail,fcnf,fcng)
- ++ solves a general linear two-point boundary value problem
- ++ for a system of ordinary differential equations using a deferred
- ++ correction technique.
- ++ See \downlink{Manual Page}{manpageXXd02gbf}.
- d02kef : (Matrix DoubleFloat,Integer,Integer,DoubleFloat,_
- Integer,Integer,DoubleFloat,DoubleFloat,Matrix DoubleFloat,Integer,Integer,Union(fn:FileName,fp:Asp10(COEFFN)),Union(fn:FileName,fp:Asp80(BDYVAL))) -> Result
- ++ d02kef(xpoint,m,k,tol,maxfun,match,elam,delam,hmax,maxit,ifail,coeffn,bdyval)
- ++ finds a specified eigenvalue of a regular singular second-
- ++ order Sturm-Liouville system on a finite or infinite range, using
- ++ a Pruefer transformation and a shooting method. It also reports
- ++ values of the eigenfunction and its derivatives. Provision is
- ++ made for discontinuities in the coefficient functions or their
- ++ derivatives.
- ++ See \downlink{Manual Page}{manpageXXd02kef}.
- ++ ASP domains Asp12 and Asp33 are used to supply default
- ++ subroutines for the MONIT and REPORT arguments via their \axiomOp{outputAsFortran} operation.
- d02kef : (Matrix DoubleFloat,Integer,Integer,DoubleFloat,_
- Integer,Integer,DoubleFloat,DoubleFloat,Matrix DoubleFloat,Integer,Integer,Union(fn:FileName,fp:Asp10(COEFFN)),Union(fn:FileName,fp:Asp80(BDYVAL)),FileName,FileName) -> Result
- ++ d02kef(xpoint,m,k,tol,maxfun,match,elam,delam,hmax,maxit,ifail,coeffn,bdyval,monit,report)
- ++ finds a specified eigenvalue of a regular singular second-
- ++ order Sturm-Liouville system on a finite or infinite range, using
- ++ a Pruefer transformation and a shooting method. It also reports
- ++ values of the eigenfunction and its derivatives. Provision is
- ++ made for discontinuities in the coefficient functions or their
- ++ derivatives.
- ++ See \downlink{Manual Page}{manpageXXd02kef}.
- ++ Files \spad{monit} and \spad{report} will be used to define the subroutines for the
- ++ MONIT and REPORT arguments.
- ++ See \downlink{Manual Page}{manpageXXd02gbf}.
- d02raf : (Integer,Integer,Integer,Integer,_
- DoubleFloat,Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Union(fn:FileName,fp:Asp41(FCN,JACOBF,JACEPS)),Union(fn:FileName,fp:Asp42(G,JACOBG,JACGEP))) -> Result
- ++ d02raf(n,mnp,numbeg,nummix,tol,init,iy,ijac,lwork,liwork,np,x,y,deleps,ifail,fcn,g)
- ++ solves the two-point boundary-value problem with general
- ++ boundary conditions for a system of ordinary differential
- ++ equations, using a deferred correction technique and Newton
- ++ iteration.
- ++ See \downlink{Manual Page}{manpageXXd02raf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import FortranPackage
- import Union(fn:FileName,fp:Asp7(FCN))
- import Union(fn:FileName,fp:Asp8(OUTPUT))
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Integer)
- import AnyFunctions1(String)
- import AnyFunctions1(Matrix DoubleFloat)
-
-
- d02bbf(xendArg:DoubleFloat,mArg:Integer,nArg:Integer,_
- irelabArg:Integer,xArg:DoubleFloat,yArg:Matrix DoubleFloat,_
- tolArg:DoubleFloat,ifailArg:Integer,fcnArg:Union(fn:FileName,fp:Asp7(FCN)),_
- outputArg:Union(fn:FileName,fp:Asp8(OUTPUT))): Result ==
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(outputFilename := aspFilename "output")$FOP
- if outputArg case fn
- then outputAsFortran(outputArg.fn)
- else outputAsFortran(outputArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fcnFilename, outputFilename]$Lisp,_
- "d02bbf",_
- ["xend"::S,"m"::S,"n"::S,"irelab"::S,"x"::S_
- ,"tol"::S,"ifail"::S,"fcn"::S,"output"::S,"result"::S,"y"::S,"w"::S]$Lisp,_
- ["result"::S,"w"::S,"fcn"::S,"output"::S]$Lisp,_
- [["double"::S,"xend"::S,["result"::S,"m"::S,"n"::S]$Lisp_
- ,"x"::S,["y"::S,"n"::S]$Lisp,"tol"::S,["w"::S,"n"::S,7$Lisp]$Lisp,"fcn"::S,"output"::S]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"irelab"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["result"::S,"x"::S,"y"::S,"tol"::S,"ifail"::S]$Lisp,_
- [([xendArg::Any,mArg::Any,nArg::Any,irelabArg::Any,xArg::Any,tolArg::Any,ifailArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02bhf(xendArg:DoubleFloat,nArg:Integer,irelabArg:Integer,_
- hmaxArg:DoubleFloat,xArg:DoubleFloat,yArg:Matrix DoubleFloat,_
- tolArg:DoubleFloat,ifailArg:Integer,gArg:Union(fn:FileName,fp:Asp9(G)),_
- fcnArg:Union(fn:FileName,fp:Asp7(FCN))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename,fcnFilename]$Lisp,_
- "d02bhf",_
- ["xend"::S,"n"::S,"irelab"::S,"hmax"::S,"x"::S_
- ,"tol"::S,"ifail"::S,"g"::S,"fcn"::S,"y"::S,"w"::S]$Lisp,_
- ["w"::S,"g"::S,"fcn"::S]$Lisp,_
- [["double"::S,"xend"::S,"hmax"::S,"x"::S,["y"::S,"n"::S]$Lisp_
- ,"tol"::S,["w"::S,"n"::S,7$Lisp]$Lisp,"g"::S,"fcn"::S]$Lisp_
- ,["integer"::S,"n"::S,"irelab"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["x"::S,"y"::S,"tol"::S,"ifail"::S]$Lisp,_
- [([xendArg::Any,nArg::Any,irelabArg::Any,hmaxArg::Any,xArg::Any,tolArg::Any,ifailArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02cjf(xendArg:DoubleFloat,mArg:Integer,nArg:Integer,_
- tolArg:DoubleFloat,relabsArg:String,xArg:DoubleFloat,_
- yArg:Matrix DoubleFloat,ifailArg:Integer,gArg:Union(fn:FileName,fp:Asp9(G)),_
- fcnArg:Union(fn:FileName,fp:Asp7(FCN)),outputArg:Union(fn:FileName,fp:Asp8(OUTPUT))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(outputFilename := aspFilename "output")$FOP
- if outputArg case fn
- then outputAsFortran(outputArg.fn)
- else outputAsFortran(outputArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename,fcnFilename,outputFilename]$Lisp,_
- "d02cjf",_
- ["xend"::S,"m"::S,"n"::S,"tol"::S,"relabs"::S_
- ,"x"::S,"ifail"::S,"g"::S,"fcn"::S,"output"::S_
- ,"result"::S,"y"::S,"w"::S]$Lisp,_
- ["result"::S,"w"::S,"g"::S,"fcn"::S,"output"::S]$Lisp,_
- [["double"::S,"xend"::S,"tol"::S,["result"::S,"m"::S,"n"::S]$Lisp_
- ,"x"::S,["y"::S,"n"::S]$Lisp,["w"::S,["+"::S,["*"::S,21$Lisp,"n"::S]$Lisp,28$Lisp]$Lisp]$Lisp,"g"::S_
- ,"fcn"::S,"output"::S]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ifail"::S]$Lisp_
- ,["character"::S,"relabs"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"x"::S,"y"::S,"ifail"::S]$Lisp,_
- [([xendArg::Any,mArg::Any,nArg::Any,tolArg::Any,relabsArg::Any,xArg::Any,ifailArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02ejf(xendArg:DoubleFloat,mArg:Integer,nArg:Integer,_
- relabsArg:String,iwArg:Integer,xArg:DoubleFloat,_
- yArg:Matrix DoubleFloat,tolArg:DoubleFloat,ifailArg:Integer,_
- gArg:Union(fn:FileName,fp:Asp9(G)),fcnArg:Union(fn:FileName,fp:Asp7(FCN)),pedervArg:Union(fn:FileName,fp:Asp31(PEDERV)),_
- outputArg:Union(fn:FileName,fp:Asp8(OUTPUT))): Result ==
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(pedervFilename := aspFilename "pederv")$FOP
- if pedervArg case fn
- then outputAsFortran(pedervArg.fn)
- else outputAsFortran(pedervArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(outputFilename := aspFilename "output")$FOP
- if outputArg case fn
- then outputAsFortran(outputArg.fn)
- else outputAsFortran(outputArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([gFilename,fcnFilename,pedervFilename,outputFilename]$Lisp,_
- "d02ejf",_
- ["xend"::S,"m"::S,"n"::S,"relabs"::S,"iw"::S_
- ,"x"::S,"tol"::S,"ifail"::S,"g"::S,"fcn"::S_
- ,"pederv"::S,"output"::S,"result"::S,"y"::S,"w"::S]$Lisp,_
- ["result"::S,"w"::S,"g"::S,"fcn"::S,"pederv"::S,"output"::S]$Lisp,_
- [["double"::S,"xend"::S,["result"::S,"m"::S,"n"::S]$Lisp_
- ,"x"::S,["y"::S,"n"::S]$Lisp,"tol"::S,["w"::S,"iw"::S]$Lisp,"g"::S,"fcn"::S,"pederv"::S,"output"::S]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"iw"::S,"ifail"::S_
- ]$Lisp_
- ,["character"::S,"relabs"::S]$Lisp_
- ]$Lisp,_
- ["result"::S,"x"::S,"y"::S,"tol"::S,"ifail"::S]$Lisp,_
- [([xendArg::Any,mArg::Any,nArg::Any,relabsArg::Any,iwArg::Any,xArg::Any,tolArg::Any,ifailArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02gaf(uArg:Matrix DoubleFloat,vArg:Matrix DoubleFloat,nArg:Integer,_
- aArg:DoubleFloat,bArg:DoubleFloat,tolArg:DoubleFloat,_
- mnpArg:Integer,lwArg:Integer,liwArg:Integer,_
- xArg:Matrix DoubleFloat,npArg:Integer,ifailArg:Integer,_
- fcnArg:Union(fn:FileName,fp:Asp7(FCN))): Result ==
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fcnFilename]$Lisp,_
- "d02gaf",_
- ["n"::S,"a"::S,"b"::S,"tol"::S,"mnp"::S_
- ,"lw"::S,"liw"::S,"np"::S,"ifail"::S,"fcn"::S_
- ,"u"::S,"v"::S,"y"::S,"x"::S,"w"::S_
- ,"iw"::S]$Lisp,_
- ["y"::S,"w"::S,"iw"::S,"fcn"::S]$Lisp,_
- [["double"::S,["u"::S,"n"::S,2$Lisp]$Lisp,["v"::S,"n"::S,2$Lisp]$Lisp_
- ,"a"::S,"b"::S,"tol"::S,["y"::S,"n"::S,"mnp"::S]$Lisp,["x"::S,"mnp"::S]$Lisp,["w"::S,"lw"::S]$Lisp_
- ,"fcn"::S]$Lisp_
- ,["integer"::S,"n"::S,"mnp"::S,"lw"::S,"liw"::S_
- ,"np"::S,"ifail"::S,["iw"::S,"liw"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["y"::S,"x"::S,"np"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,aArg::Any,bArg::Any,tolArg::Any,mnpArg::Any,lwArg::Any,liwArg::Any,npArg::Any,ifailArg::Any,uArg::Any,vArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02gbf(aArg:DoubleFloat,bArg:DoubleFloat,nArg:Integer,_
- tolArg:DoubleFloat,mnpArg:Integer,lwArg:Integer,_
- liwArg:Integer,cArg:Matrix DoubleFloat,dArg:Matrix DoubleFloat,_
- gamArg:Matrix DoubleFloat,xArg:Matrix DoubleFloat,npArg:Integer,_
- ifailArg:Integer,fcnfArg:Union(fn:FileName,fp:Asp77(FCNF)),fcngArg:Union(fn:FileName,fp:Asp78(FCNG))): Result ==
- pushFortranOutputStack(fcnfFilename := aspFilename "fcnf")$FOP
- if fcnfArg case fn
- then outputAsFortran(fcnfArg.fn)
- else outputAsFortran(fcnfArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(fcngFilename := aspFilename "fcng")$FOP
- if fcngArg case fn
- then outputAsFortran(fcngArg.fn)
- else outputAsFortran(fcngArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fcnfFilename,fcngFilename]$Lisp,_
- "d02gbf",_
- ["a"::S,"b"::S,"n"::S,"tol"::S,"mnp"::S_
- ,"lw"::S,"liw"::S,"np"::S,"ifail"::S,"fcnf"::S_
- ,"fcng"::S,"y"::S,"c"::S,"d"::S,"gam"::S,"x"::S_
- ,"w"::S,"iw"::S]$Lisp,_
- ["y"::S,"w"::S,"iw"::S,"fcnf"::S,"fcng"::S]$Lisp,_
- [["double"::S,"a"::S,"b"::S,"tol"::S,["y"::S,"n"::S,"mnp"::S]$Lisp_
- ,["c"::S,"n"::S,"n"::S]$Lisp,["d"::S,"n"::S,"n"::S]$Lisp,["gam"::S,"n"::S]$Lisp,["x"::S,"mnp"::S]$Lisp_
- ,["w"::S,"lw"::S]$Lisp,"fcnf"::S,"fcng"::S]$Lisp_
- ,["integer"::S,"n"::S,"mnp"::S,"lw"::S,"liw"::S_
- ,"np"::S,"ifail"::S,["iw"::S,"liw"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["y"::S,"c"::S,"d"::S,"gam"::S,"x"::S,"np"::S,"ifail"::S]$Lisp,_
- [([aArg::Any,bArg::Any,nArg::Any,tolArg::Any,mnpArg::Any,lwArg::Any,liwArg::Any,npArg::Any,ifailArg::Any,cArg::Any,dArg::Any,gamArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02kef(xpointArg:Matrix DoubleFloat,mArg:Integer,kArg:Integer,_
- tolArg:DoubleFloat,maxfunArg:Integer,matchArg:Integer,_
- elamArg:DoubleFloat,delamArg:DoubleFloat,hmaxArg:Matrix DoubleFloat,_
- maxitArg:Integer,ifailArg:Integer,coeffnArg:Union(fn:FileName,fp:Asp10(COEFFN)),_
- bdyvalArg:Union(fn:FileName,fp:Asp80(BDYVAL))): Result ==
- pushFortranOutputStack(coeffnFilename := aspFilename "coeffn")$FOP
- if coeffnArg case fn
- then outputAsFortran(coeffnArg.fn)
- else outputAsFortran(coeffnArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(bdyvalFilename := aspFilename "bdyval")$FOP
- if bdyvalArg case fn
- then outputAsFortran(bdyvalArg.fn)
- else outputAsFortran(bdyvalArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP
- outputAsFortran()$Asp12(MONIT)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(reportFilename := aspFilename "report")$FOP
- outputAsFortran()$Asp33(REPORT)
- popFortranOutputStack()$FOP
- [(invokeNagman([coeffnFilename,bdyvalFilename,monitFilename,reportFilename]$Lisp,_
- "d02kef",_
- ["m"::S,"k"::S,"tol"::S,"maxfun"::S,"match"::S_
- ,"elam"::S,"delam"::S,"maxit"::S,"ifail"::S,"coeffn"::S_
- ,"bdyval"::S,"monit"::S,"report"::S,"xpoint"::S,"hmax"::S]$Lisp,_
- ["coeffn"::S,"bdyval"::S,"monit"::S,"report"::S]$Lisp,_
- [["double"::S,["xpoint"::S,"m"::S]$Lisp,"tol"::S_
- ,"elam"::S,"delam"::S,["hmax"::S,2$Lisp,"m"::S]$Lisp,"coeffn"::S,"bdyval"::S,"monit"::S,"report"::S]$Lisp_
- ,["integer"::S,"m"::S,"k"::S,"maxfun"::S,"match"::S_
- ,"maxit"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["match"::S,"elam"::S,"delam"::S,"hmax"::S,"maxit"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,kArg::Any,tolArg::Any,maxfunArg::Any,matchArg::Any,elamArg::Any,delamArg::Any,maxitArg::Any,ifailArg::Any,xpointArg::Any,hmaxArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02kef(xpointArg:Matrix DoubleFloat,mArg:Integer,kArg:Integer,_
- tolArg:DoubleFloat,maxfunArg:Integer,matchArg:Integer,_
- elamArg:DoubleFloat,delamArg:DoubleFloat,hmaxArg:Matrix DoubleFloat,_
- maxitArg:Integer,ifailArg:Integer,coeffnArg:Union(fn:FileName,fp:Asp10(COEFFN)),_
- bdyvalArg:Union(fn:FileName,fp:Asp80(BDYVAL)),monitArg:FileName,reportArg:FileName): Result ==
- pushFortranOutputStack(coeffnFilename := aspFilename "coeffn")$FOP
- if coeffnArg case fn
- then outputAsFortran(coeffnArg.fn)
- else outputAsFortran(coeffnArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(bdyvalFilename := aspFilename "bdyval")$FOP
- if bdyvalArg case fn
- then outputAsFortran(bdyvalArg.fn)
- else outputAsFortran(bdyvalArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP
- outputAsFortran(monitArg)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(reportFilename := aspFilename "report")$FOP
- outputAsFortran(reportArg)
- popFortranOutputStack()$FOP
- [(invokeNagman([coeffnFilename,bdyvalFilename,monitFilename,reportFilename]$Lisp,_
- "d02kef",_
- ["m"::S,"k"::S,"tol"::S,"maxfun"::S,"match"::S_
- ,"elam"::S,"delam"::S,"maxit"::S,"ifail"::S,"coeffn"::S_
- ,"bdyval"::S,"monit"::S,"report"::S,"xpoint"::S,"hmax"::S]$Lisp,_
- ["coeffn"::S,"bdyval"::S,"monit"::S,"report"::S]$Lisp,_
- [["double"::S,["xpoint"::S,"m"::S]$Lisp,"tol"::S_
- ,"elam"::S,"delam"::S,["hmax"::S,2$Lisp,"m"::S]$Lisp,"coeffn"::S,"bdyval"::S,"monit"::S,"report"::S]$Lisp_
- ,["integer"::S,"m"::S,"k"::S,"maxfun"::S,"match"::S_
- ,"maxit"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["match"::S,"elam"::S,"delam"::S,"hmax"::S,"maxit"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,kArg::Any,tolArg::Any,maxfunArg::Any,matchArg::Any,elamArg::Any,delamArg::Any,maxitArg::Any,ifailArg::Any,xpointArg::Any,hmaxArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d02raf(nArg:Integer,mnpArg:Integer,numbegArg:Integer,_
- nummixArg:Integer,tolArg:DoubleFloat,initArg:Integer,_
- iyArg:Integer,ijacArg:Integer,lworkArg:Integer,_
- liworkArg:Integer,npArg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,delepsArg:DoubleFloat,ifailArg:Integer,_
- fcnArg:Union(fn:FileName,fp:Asp41(FCN,JACOBF,JACEPS)),gArg:Union(fn:FileName,fp:Asp42(G,JACOBG,JACGEP))): Result ==
- pushFortranOutputStack(fcnFilename := aspFilename "fcn")$FOP
- if fcnArg case fn
- then outputAsFortran(fcnArg.fn)
- else outputAsFortran(fcnArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(gFilename := aspFilename "g")$FOP
- if gArg case fn
- then outputAsFortran(gArg.fn)
- else outputAsFortran(gArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([fcnFilename,gFilename]$Lisp,_
- "d02raf",_
- ["n"::S,"mnp"::S,"numbeg"::S,"nummix"::S,"tol"::S_
- ,"init"::S,"iy"::S,"ijac"::S,"lwork"::S,"liwork"::S_
- ,"np"::S,"deleps"::S,"ifail"::S,"fcn"::S,"g"::S_
- ,"abt"::S,"x"::S,"y"::S,"work"::S,"iwork"::S_
- ]$Lisp,_
- ["abt"::S,"work"::S,"iwork"::S,"fcn"::S,"g"::S]$Lisp,_
- [["double"::S,"tol"::S,["abt"::S,"n"::S]$Lisp_
- ,["x"::S,"mnp"::S]$Lisp,["y"::S,"iy"::S,"mnp"::S]$Lisp,"deleps"::S,["work"::S,"lwork"::S]$Lisp,"fcn"::S,"g"::S]$Lisp_
- ,["integer"::S,"n"::S,"mnp"::S,"numbeg"::S_
- ,"nummix"::S,"init"::S,"iy"::S,"ijac"::S,"lwork"::S,"liwork"::S,"np"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["abt"::S,"np"::S,"x"::S,"y"::S,"deleps"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,mnpArg::Any,numbegArg::Any,nummixArg::Any,tolArg::Any,initArg::Any,iyArg::Any,ijacArg::Any,lworkArg::Any,liworkArg::Any,npArg::Any,delepsArg::Any,ifailArg::Any,xArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGD02 NagOrdinaryDifferentialEquationsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d02Package.spad.pamphlet b/src/algebra/d02Package.spad.pamphlet
deleted file mode 100644
index d346bab9..00000000
--- a/src/algebra/d02Package.spad.pamphlet
+++ /dev/null
@@ -1,457 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d02Package.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package ODEPACK AnnaOrdinaryDifferentialEquationPackage}
-<<package ODEPACK AnnaOrdinaryDifferentialEquationPackage>>=
-)abbrev package ODEPACK AnnaOrdinaryDifferentialEquationPackage
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: December 1997
-++ Basic Operations: solve, measure
-++ Description:
-++ \axiomType{AnnaOrdinaryDifferentialEquationPackage} is a \axiom{package}
-++ of functions for the \axiom{category} \axiomType{OrdinaryDifferentialEquationsSolverCategory}
-++ with \axiom{measure}, and \axiom{solve}.
-++
-EDF ==> Expression DoubleFloat
-LDF ==> List DoubleFloat
-MDF ==> Matrix DoubleFloat
-DF ==> DoubleFloat
-FI ==> Fraction Integer
-EFI ==> Expression Fraction Integer
-SOCDF ==> Segment OrderedCompletion DoubleFloat
-VEDF ==> Vector Expression DoubleFloat
-VEF ==> Vector Expression Float
-EF ==> Expression Float
-LF ==> List Float
-F ==> Float
-VDF ==> Vector DoubleFloat
-VMF ==> Vector MachineFloat
-MF ==> MachineFloat
-LS ==> List Symbol
-ST ==> String
-LST ==> List String
-INT ==> Integer
-RT ==> RoutinesTable
-ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
- g:EDF,abserr:DF,relerr:DF)
-IFL ==> List(Record(ifail:Integer,instruction:String))
-Entry ==> Record(chapter:String, type:String, domainName: String,
- defaultMin:F, measure:F, failList:IFL, explList:LST)
-Measure ==> Record(measure:F,name:String, explanations:List String)
-
-AnnaOrdinaryDifferentialEquationPackage(): with
- solve:(NumericalODEProblem) -> Result
- ++ solve(odeProblem) is a top level ANNA function to solve numerically a
- ++ system of ordinary differential equations i.e. equations for the
- ++ derivatives Y[1]'..Y[n]' defined in terms of X,Y[1]..Y[n], together
- ++ with starting values for X and Y[1]..Y[n] (called the initial
- ++ conditions), a final value of X, an accuracy requirement and any
- ++ intermediate points at which the result is required.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory}
- ++ to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(NumericalODEProblem,RT) -> Result
- ++ solve(odeProblem,R) is a top level ANNA function to solve numerically a
- ++ system of ordinary differential equations i.e. equations for the
- ++ derivatives Y[1]'..Y[n]' defined in terms of X,Y[1]..Y[n], together
- ++ with starting values for X and Y[1]..Y[n] (called the initial
- ++ conditions), a final value of X, an accuracy requirement and any
- ++ intermediate points at which the result is required.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(VEF,F,F,LF) -> Result
- ++ solve(f,xStart,xEnd,yInitial) is a top level ANNA function to solve numerically a
- ++ system of ordinary differential equations i.e. equations for the
- ++ derivatives Y[1]'..Y[n]' defined in terms of X,Y[1]..Y[n], together
- ++ with a starting value for X and Y[1]..Y[n] (called the initial
- ++ conditions) and a final value of X. A default value
- ++ is used for the accuracy requirement.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(VEF,F,F,LF,F) -> Result
- ++ solve(f,xStart,xEnd,yInitial,tol) is a top level ANNA function to solve
- ++ numerically a system of ordinary differential equations, \axiom{f}, i.e.
- ++ equations for the derivatives Y[1]'..Y[n]' defined in terms
- ++ of X,Y[1]..Y[n] from \axiom{xStart} to \axiom{xEnd} with the initial
- ++ values for Y[1]..Y[n] (\axiom{yInitial}) to a tolerance \axiom{tol}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(VEF,F,F,LF,EF,F) -> Result
- ++ solve(f,xStart,xEnd,yInitial,G,tol) is a top level ANNA function to solve
- ++ numerically a system of ordinary differential equations, \axiom{f}, i.e.
- ++ equations for the derivatives Y[1]'..Y[n]' defined in terms
- ++ of X,Y[1]..Y[n] from \axiom{xStart} to \axiom{xEnd} with the initial
- ++ values for Y[1]..Y[n] (\axiom{yInitial}) to a tolerance \axiom{tol}.
- ++ The calculation will stop if the function G(X,Y[1],..,Y[n]) evaluates to zero before
- ++ X = xEnd.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(VEF,F,F,LF,LF,F) -> Result
- ++ solve(f,xStart,xEnd,yInitial,intVals,tol) is a top level ANNA function to solve
- ++ numerically a system of ordinary differential equations, \axiom{f}, i.e.
- ++ equations for the derivatives Y[1]'..Y[n]' defined in terms
- ++ of X,Y[1]..Y[n] from \axiom{xStart} to \axiom{xEnd} with the initial
- ++ values for Y[1]..Y[n] (\axiom{yInitial}) to a tolerance \axiom{tol}.
- ++ The values of Y[1]..Y[n] will be output for the values of X in
- ++ \axiom{intVals}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(VEF,F,F,LF,EF,LF,F) -> Result
- ++ solve(f,xStart,xEnd,yInitial,G,intVals,tol) is a top level ANNA function to solve
- ++ numerically a system of ordinary differential equations, \axiom{f}, i.e.
- ++ equations for the derivatives Y[1]'..Y[n]' defined in terms
- ++ of X,Y[1]..Y[n] from \axiom{xStart} to \axiom{xEnd} with the initial
- ++ values for Y[1]..Y[n] (\axiom{yInitial}) to a tolerance \axiom{tol}.
- ++ The values of Y[1]..Y[n] will be output for the values of X in
- ++ \axiom{intVals}. The calculation will stop if the function
- ++ G(X,Y[1],..,Y[n]) evaluates to zero before X = xEnd.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- solve:(VEF,F,F,LF,EF,LF,F,F) -> Result
- ++ solve(f,xStart,xEnd,yInitial,G,intVals,epsabs,epsrel) is a top level ANNA function to solve
- ++ numerically a system of ordinary differential equations, \axiom{f}, i.e.
- ++ equations for the derivatives Y[1]'..Y[n]' defined in terms
- ++ of X,Y[1]..Y[n] from \axiom{xStart} to \axiom{xEnd} with the initial
- ++ values for Y[1]..Y[n] (\axiom{yInitial}) to an absolute error
- ++ requirement \axiom{epsabs} and relative error \axiom{epsrel}.
- ++ The values of Y[1]..Y[n] will be output for the values of X in
- ++ \axiom{intVals}. The calculation will stop if the function
- ++ G(X,Y[1],..,Y[n]) evaluates to zero before X = xEnd.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} contained in
- ++ the table of routines \axiom{R} to get the name and other
- ++ relevant information of the the (domain of the) numerical
- ++ routine likely to be the most appropriate,
- ++ i.e. have the best \axiom{measure}.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of ODE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- measure:(NumericalODEProblem) -> Measure
- ++ measure(prob) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical ODE
- ++ problem defined by \axiom{prob}.
- ++
- ++ It calls each \axiom{domain} of \axiom{category}
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} in turn to
- ++ calculate all measures and returns the best i.e. the name of
- ++ the most appropriate domain and any other relevant information.
- ++ It predicts the likely most effective NAG numerical
- ++ Library routine to solve the input set of ODEs
- ++ by checking various attributes of the system of ODEs and calculating
- ++ a measure of compatibility of each routine to these attributes.
- measure:(NumericalODEProblem,RT) -> Measure
- ++ measure(prob,R) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical ODE
- ++ problem defined by \axiom{prob}.
- ++
- ++ It calls each \axiom{domain} listed in \axiom{R} of \axiom{category}
- ++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} in turn to
- ++ calculate all measures and returns the best i.e. the name of
- ++ the most appropriate domain and any other relevant information.
- ++ It predicts the likely most effective NAG numerical
- ++ Library routine to solve the input set of ODEs
- ++ by checking various attributes of the system of ODEs and calculating
- ++ a measure of compatibility of each routine to these attributes.
-
- == add
-
- import ODEA,NumericalODEProblem
-
- f2df:F -> DF
- ef2edf:EF -> EDF
- preAnalysis:(ODEA,RT) -> RT
- zeroMeasure:Measure -> Result
- measureSpecific:(ST,RT,ODEA) -> Record(measure:F,explanations:ST)
- solveSpecific:(ODEA,ST) -> Result
- changeName:(Result,ST) -> Result
- recoverAfterFail:(ODEA,RT,Measure,Integer,Result) -> Record(a:Result,b:Measure)
-
- f2df(f:F):DF == (convert(f)@DF)$F
-
- ef2edf(f:EF):EDF == map(f2df,f)$ExpressionFunctions2(F,DF)
-
- preAnalysis(args:ODEA,t:RT):RT ==
- rt := selectODEIVPRoutines(t)$RT
- if positive?(# variables(args.g)) then
- changeMeasure(rt,d02bbf@Symbol,getMeasure(rt,d02bbf@Symbol)*0.8)
- if positive?(# args.intvals) then
- changeMeasure(rt,d02bhf@Symbol,getMeasure(rt,d02bhf@Symbol)*0.8)
- rt
-
- zeroMeasure(m:Measure):Result ==
- a := coerce(0$F)$AnyFunctions1(F)
- text := coerce("Zero Measure")$AnyFunctions1(ST)
- r := construct([[result@Symbol,a],[method@Symbol,text]])$Result
- concat(measure2Result m,r)$ExpertSystemToolsPackage
-
- measureSpecific(name:ST,R:RT,ode:ODEA):Record(measure:F,explanations:ST) ==
- name = "d02bbfAnnaType" => measure(R,ode)$d02bbfAnnaType
- name = "d02bhfAnnaType" => measure(R,ode)$d02bhfAnnaType
- name = "d02cjfAnnaType" => measure(R,ode)$d02cjfAnnaType
- name = "d02ejfAnnaType" => measure(R,ode)$d02ejfAnnaType
- error("measureSpecific","invalid type name: " name)$ErrorFunctions
-
- measure(Ode:NumericalODEProblem,R:RT):Measure ==
- ode:ODEA := retract(Ode)$NumericalODEProblem
- sofar := 0$F
- best := "none" :: ST
- routs := copy R
- routs := preAnalysis(ode,routs)
- empty?(routs)$RT =>
- error("measure", "no routines found")$ErrorFunctions
- rout := inspect(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- meth := empty()$LST
- for i in 1..# routs repeat
- rout := extract!(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- n := e.domainName
- if e.defaultMin > sofar then
- m := measureSpecific(n,R,ode)
- if m.measure > sofar then
- sofar := m.measure
- best := n
- str:LST := [string(rout.key)$Symbol "measure: "
- outputMeasure(m.measure)$ExpertSystemToolsPackage " - "
- m.explanations]
- else
- str := [string(rout.key)$Symbol " is no better than other routines"]
- meth := append(meth,str)$LST
- [sofar,best,meth]
-
- measure(ode:NumericalODEProblem):Measure == measure(ode,routines()$RT)
-
- solveSpecific(ode:ODEA,n:ST):Result ==
- n = "d02bbfAnnaType" => ODESolve(ode)$d02bbfAnnaType
- n = "d02bhfAnnaType" => ODESolve(ode)$d02bhfAnnaType
- n = "d02cjfAnnaType" => ODESolve(ode)$d02cjfAnnaType
- n = "d02ejfAnnaType" => ODESolve(ode)$d02ejfAnnaType
- error("solveSpecific","invalid type name: " n)$ErrorFunctions
-
- changeName(ans:Result,name:ST):Result ==
- sy:Symbol := coerce(name "Answer")$Symbol
- anyAns:Any := coerce(ans)$AnyFunctions1(Result)
- construct([[sy,anyAns]])$Result
-
- recoverAfterFail(ode:ODEA,routs:RT,m:Measure,iint:Integer,r:Result):
- Record(a:Result,b:Measure) ==
- while positive?(iint) repeat
- routineName := m.name
- s := recoverAfterFail(routs,routineName(1..6),iint)$RT
- s case "failed" => iint := 0
- if s = "increase tolerance" then
- ode.relerr := ode.relerr*(10.0::DF)
- ode.abserr := ode.abserr*(10.0::DF)
- if s = "decrease tolerance" then
- ode.relerr := ode.relerr/(10.0::DF)
- ode.abserr := ode.abserr/(10.0::DF)
- (s = "no action")@Boolean => iint := 0
- fl := coerce(s)$AnyFunctions1(ST)
- flrec:Record(key:Symbol,entry:Any):=[failure@Symbol,fl]
- m2 := measure(ode::NumericalODEProblem,routs)
- zero?(m2.measure) => iint := 0
- r2:Result := solveSpecific(ode,m2.name)
- m := m2
- insert!(flrec,r2)$Result
- r := concat(r2,changeName(r,routineName))$ExpertSystemToolsPackage
- iany := search(ifail@Symbol,r2)$Result
- iany case "failed" => iint := 0
- iint := retract(iany)$AnyFunctions1(Integer)
- [r,m]
-
- solve(Ode:NumericalODEProblem,t:RT):Result ==
- ode:ODEA := retract(Ode)$NumericalODEProblem
- routs := copy(t)$RT
- m := measure(Ode,routs)
- zero?(m.measure) => zeroMeasure m
- r := solveSpecific(ode,n := m.name)
- iany := search(ifail@Symbol,r)$Result
- iint := 0$Integer
- if (iany case Any) then
- iint := retract(iany)$AnyFunctions1(Integer)
- if positive?(iint) then
- tu:Record(a:Result,b:Measure) := recoverAfterFail(ode,routs,m,iint,r)
- r := tu.a
- m := tu.b
- r := concat(measure2Result m,r)$ExpertSystemToolsPackage
- expl := getExplanations(routs,n(1..6))$RoutinesTable
- expla := coerce(expl)$AnyFunctions1(LST)
- explaa:Record(key:Symbol,entry:Any) := ["explanations"::Symbol,expla]
- r := concat(construct([explaa]),r)
- iflist := showIntensityFunctions(ode)$ODEIntensityFunctionsTable
- iflist case "failed" => r
- concat(iflist2Result iflist, r)$ExpertSystemToolsPackage
-
- solve(ode:NumericalODEProblem):Result == solve(ode,routines()$RT)
-
- solve(f:VEF,xStart:F,xEnd:F,yInitial:LF,G:EF,intVals:LF,epsabs:F,epsrel:F):Result ==
- d:ODEA := [f2df xStart,f2df xEnd,vector([ef2edf e for e in members f])$VEDF,
- [f2df i for i in yInitial], [f2df j for j in intVals],
- ef2edf G,f2df epsabs,f2df epsrel]
- solve(d::NumericalODEProblem,routines()$RT)
-
- solve(f:VEF,xStart:F,xEnd:F,yInitial:LF,G:EF,intVals:LF,tol:F):Result ==
- solve(f,xStart,xEnd,yInitial,G,intVals,tol,tol)
-
- solve(f:VEF,xStart:F,xEnd:F,yInitial:LF,intVals:LF,tol:F):Result ==
- solve(f,xStart,xEnd,yInitial,1$EF,intVals,tol)
-
- solve(f:VEF,xStart:F,xEnd:F,y:LF,G:EF,tol:F):Result ==
- solve(f,xStart,xEnd,y,G,empty()$LF,tol)
-
- solve(f:VEF,xStart:F,xEnd:F,yInitial:LF,tol:F):Result ==
- solve(f,xStart,xEnd,yInitial,1$EF,empty()$LF,tol)
-
- solve(f:VEF,xStart:F,xEnd:F,yInitial:LF):Result == solve(f,xStart,xEnd,yInitial,1.0e-4)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package ODEPACK AnnaOrdinaryDifferentialEquationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d02agents.spad.pamphlet b/src/algebra/d02agents.spad.pamphlet
deleted file mode 100644
index e315970a..00000000
--- a/src/algebra/d02agents.spad.pamphlet
+++ /dev/null
@@ -1,423 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d02agents.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain ODEIFTBL ODEIntensityFunctionsTable}
-<<domain ODEIFTBL ODEIntensityFunctionsTable>>=
-)abbrev domain ODEIFTBL ODEIntensityFunctionsTable
-++ Author: Brian Dupee
-++ Date Created: May 1994
-++ Date Last Updated: January 1996
-++ Basic Operations: showTheIFTable, insert!
-++ Description:
-++ \axiom{ODEIntensityFunctionsTable()} provides a dynamic table and a set of
-++ functions to store details found out about sets of ODE's.
-
-ODEIntensityFunctionsTable(): E == I where
- LEDF ==> List Expression DoubleFloat
- LEEDF ==> List Equation Expression DoubleFloat
- EEDF ==> Equation Expression DoubleFloat
- VEDF ==> Vector Expression DoubleFloat
- MEDF ==> Matrix Expression DoubleFloat
- MDF ==> Matrix DoubleFloat
- EDF ==> Expression DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- INT ==> Integer
- CDF ==> Complex DoubleFloat
- LDF ==> List DoubleFloat
- LF ==> List Float
- S ==> Symbol
- LS ==> List Symbol
- MFI ==> Matrix Fraction Integer
- LFI ==> List Fraction Integer
- FI ==> Fraction Integer
- ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,g:EDF,abserr:DF,relerr:DF)
- ON ==> Record(additions:INT,multiplications:INT,exponentiations:INT,functionCalls:INT)
- RVE ==> Record(val:EDF,exponent:INT)
- RSS ==> Record(stiffnessFactor:F,stabilityFactor:F)
- ATT ==> Record(stiffness:F,stability:F,expense:F,accuracy:F,intermediateResults:F)
- ROA ==> Record(key:ODEA,entry:ATT)
-
- E ==> with
- showTheIFTable:() -> $
- ++ showTheIFTable() returns the current table of intensity functions.
- clearTheIFTable : () -> Void
- ++ clearTheIFTable() clears the current table of intensity functions.
- keys : $ -> List(ODEA)
- ++ keys(tab) returns the list of keys of f
- iFTable: List Record(key:ODEA,entry:ATT) -> $
- ++ iFTable(l) creates an intensity-functions table from the elements
- ++ of l.
- insert!:Record(key:ODEA,entry:ATT) -> $
- ++ insert!(r) inserts an entry r into theIFTable
- showIntensityFunctions:ODEA -> Union(ATT,"failed")
- ++ showIntensityFunctions(k) returns the entries in the
- ++ table of intensity functions k.
-
- I ==> add
- Rep := Table(ODEA,ATT)
- import Rep
-
- theIFTable:$ := empty()$Rep
-
- showTheIFTable():$ ==
- theIFTable
-
- clearTheIFTable():Void ==
- theIFTable := empty()$Rep
-
- iFTable(l:List Record(key:ODEA,entry:ATT)):$ ==
- theIFTable := table(l)$Rep
-
- insert!(r:Record(key:ODEA,entry:ATT)):$ ==
- insert!(r,theIFTable)$Rep
-
- keys(t:$):List ODEA ==
- keys(t)$Rep
-
- showIntensityFunctions(k:ODEA):Union(ATT,"failed") ==
- search(k,theIFTable)$Rep
-
-@
-\section{package D02AGNT d02AgentsPackage}
-<<package D02AGNT d02AgentsPackage>>=
-)abbrev package D02AGNT d02AgentsPackage
-++ Author: Brian Dupee
-++ Date Created: May 1994
-++ Date Last Updated: January 1997
-++ Basic Operations: stiffnessFactor, jacobian
-++ Description:
-++ \axiom{d02AgentsPackage} contains a set of computational agents
-++ for use with Ordinary Differential Equation solvers.
-d02AgentsPackage(): E == I where
- LEDF ==> List Expression DoubleFloat
- LEEDF ==> List Equation Expression DoubleFloat
- EEDF ==> Equation Expression DoubleFloat
- VEDF ==> Vector Expression DoubleFloat
- MEDF ==> Matrix Expression DoubleFloat
- MDF ==> Matrix DoubleFloat
- EDF ==> Expression DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- INT ==> Integer
- CDF ==> Complex DoubleFloat
- LDF ==> List DoubleFloat
- LF ==> List Float
- S ==> Symbol
- LS ==> List Symbol
- MFI ==> Matrix Fraction Integer
- LFI ==> List Fraction Integer
- FI ==> Fraction Integer
- ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,g:EDF,abserr:DF,relerr:DF)
- ON ==> Record(additions:INT,multiplications:INT,exponentiations:INT,functionCalls:INT)
- RVE ==> Record(val:EDF,exponent:INT)
- RSS ==> Record(stiffnessFactor:F,stabilityFactor:F)
- ATT ==> Record(stiffness:F,stability:F,expense:F,accuracy:F,intermediateResults:F)
- ROA ==> Record(key:ODEA,entry:ATT)
-
- E ==> with
- combineFeatureCompatibility: (F,F) -> F
- ++ combineFeatureCompatibility(C1,C2) is for interacting attributes
- combineFeatureCompatibility: (F,LF) -> F
- ++ combineFeatureCompatibility(C1,L) is for interacting attributes
- sparsityIF: MEDF -> F
- ++ sparsityIF(m) calculates the sparsity of a jacobian matrix
- jacobian: (VEDF,LS) -> MEDF
- ++ jacobian(v,w) is a local function to make a jacobian matrix
- eval: (MEDF,LS,VEDF) -> MEDF
- ++ eval(mat,symbols,values) evaluates a multivariable matrix at given values
- ++ for each of a list of variables
- stiffnessAndStabilityFactor: MEDF -> RSS
- ++ stiffnessAndStabilityFactor(me) calculates the stability and
- ++ stiffness factor of a system of first-order differential equations
- ++ (by evaluating the maximum difference in the real parts of the
- ++ negative eigenvalues of the jacobian of the system for which O(10)
- ++ equates to mildly stiff wheras stiffness ratios of O(10^6) are not
- ++ uncommon) and whether the system is likely to show any oscillations
- ++ (identified by the closeness to the imaginary axis of the complex
- ++ eigenvalues of the jacobian).
- stiffnessAndStabilityOfODEIF:ODEA -> RSS
- ++ stiffnessAndStabilityOfODEIF(ode) calculates the intensity values
- ++ of stiffness of a system of first-order differential equations
- ++ (by evaluating the maximum difference in the real parts of the
- ++ negative eigenvalues of the jacobian of the system for which O(10)
- ++ equates to mildly stiff wheras stiffness ratios of O(10^6) are not
- ++ uncommon) and whether the system is likely to show any oscillations
- ++ (identified by the closeness to the imaginary axis of the complex
- ++ eigenvalues of the jacobian).
- ++
- ++ It returns two values in the range [0,1].
- systemSizeIF:ODEA -> F
- ++ systemSizeIF(ode) returns the intensity value of the size of
- ++ the system of ODEs. 20 equations corresponds to the neutral
- ++ value. It returns a value in the range [0,1].
- expenseOfEvaluationIF:ODEA -> F
- ++ expenseOfEvaluationIF(o) returns the intensity value of the
- ++ cost of evaluating the input ODE. This is in terms of the number
- ++ of ``operational units''. It returns a value in the range
- ++ [0,1].\newline\indent{20}
- ++ 400 ``operation units'' -> 0.75 \newline
- ++ 200 ``operation units'' -> 0.5 \newline
- ++ 83 ``operation units'' -> 0.25 \newline\indent{15}
- ++ exponentiation = 4 units , function calls = 10 units.
- accuracyIF:ODEA -> F
- ++ accuracyIF(o) returns the intensity value of the accuracy
- ++ requirements of the input ODE. A request of accuracy of 10^-6
- ++ corresponds to the neutral intensity. It returns a value
- ++ in the range [0,1].
- intermediateResultsIF:ODEA -> F
- ++ intermediateResultsIF(o) returns a value corresponding to the
- ++ required number of intermediate results required and, therefore,
- ++ an indication of how much this would affect the step-length of the
- ++ calculation. It returns a value in the range [0,1].
-
- I ==> add
-
- import ExpertSystemToolsPackage
-
- accuracyFactor:ODEA -> F
- expenseOfEvaluation:ODEA -> F
- eval1:(LEDF,LEEDF) -> LEDF
- stiffnessAndStabilityOfODE:ODEA -> RSS
- intermediateResultsFactor:ODEA -> F
- leastStabilityAngle:(LDF,LDF) -> F
-
- intermediateResultsFactor(ode:ODEA):F ==
- resultsRequirement := #(ode.intvals)
- (1.0-exp(-(resultsRequirement::F)/50.0)$F)
-
- intermediateResultsIF(o:ODEA):F ==
- ode := copy o
- (t := showIntensityFunctions(ode)$ODEIntensityFunctionsTable) case ATT =>
- s := coerce(t)@ATT
- negative?(s.intermediateResults)$F =>
- s.intermediateResults := intermediateResultsFactor(ode)
- r:ROA := [ode,s]
- insert!(r)$ODEIntensityFunctionsTable
- s.intermediateResults
- s.intermediateResults
- a:ATT := [-1.0,-1.0,-1.0,-1.0,e:=intermediateResultsFactor(ode)]
- r:ROA := [ode,a]
- insert!(r)$ODEIntensityFunctionsTable
- e
-
- accuracyFactor(ode:ODEA):F ==
- accuracyRequirements := convert(ode.abserr)@F
- if zero?(accuracyRequirements) then
- accuracyRequirements := convert(ode.relerr)@F
- val := inv(accuracyRequirements)$F
- n := log10(val)$F
- (1.0-exp(-(n/(2.0))**2/(15.0))$F)
-
- accuracyIF(o:ODEA):F ==
- ode := copy o
- (t := showIntensityFunctions(ode)$ODEIntensityFunctionsTable) case ATT =>
- s := coerce(t)@ATT
- negative?(s.accuracy)$F =>
- s.accuracy := accuracyFactor(ode)
- r:ROA := [ode,s]
- insert!(r)$ODEIntensityFunctionsTable
- s.accuracy
- s.accuracy
- a:ATT := [-1.0,-1.0,-1.0,e:=accuracyFactor(ode),-1.0]
- r:ROA := [ode,a]
- insert!(r)$ODEIntensityFunctionsTable
- e
-
- systemSizeIF(ode:ODEA):F ==
- n := #(ode.fn)
- (1.0-exp((-n::F/75.0))$F)
-
- expenseOfEvaluation(o:ODEA):F ==
- -- expense of evaluation of an ODE -- <0.3 inexpensive - 0.5 neutral - >0.7 very expensive
- -- 400 `operation units' -> 0.75
- -- 200 `operation units' -> 0.5
- -- 83 `operation units' -> 0.25
- -- ** = 4 units , function calls = 10 units.
- ode := copy o.fn
- expenseOfEvaluation(ode)
-
- expenseOfEvaluationIF(o:ODEA):F ==
- ode := copy o
- (t := showIntensityFunctions(ode)$ODEIntensityFunctionsTable) case ATT =>
- s := coerce(t)@ATT
- negative?(s.expense)$F =>
- s.expense := expenseOfEvaluation(ode)
- r:ROA := [ode,s]
- insert!(r)$ODEIntensityFunctionsTable
- s.expense
- s.expense
- a:ATT := [-1.0,-1.0,e:=expenseOfEvaluation(ode),-1.0,-1.0]
- r:ROA := [ode,a]
- insert!(r)$ODEIntensityFunctionsTable
- e
-
- leastStabilityAngle(realPartsList:LDF,imagPartsList:LDF):F ==
- complexList := [complex(u,v)$CDF for u in realPartsList for v in imagPartsList]
- argumentList := [abs((abs(argument(u)$CDF)$DF)-(pi()$DF)/2)$DF for u in complexList]
- sortedArgumentList := sort(argumentList)$LDF
- list := [u for u in sortedArgumentList | not zero?(u) ]
- empty?(list)$LDF => 0$F
- convert(first(list)$LDF)@F
-
- stiffnessAndStabilityFactor(me:MEDF):RSS ==
-
- -- search first for real eigenvalues of the jacobian (symbolically)
- -- if the system isn't too big
- r:INT := ncols(me)$MEDF
- b:Boolean := ((# me) < 150)
- if b then
- mc:MFI := map(edf2fi,me)$ExpertSystemToolsPackage2(EDF,FI)
- e:LFI := realEigenvalues(mc,1/100)$NumericRealEigenPackage(FI)
- b := ((# e) >= r-1)@Boolean
- b =>
- -- if all the eigenvalues are real, find negative ones
- e := sort(neglist(e)$ExpertSystemToolsPackage1(FI))
- -- if there are two or more, calculate stiffness ratio
- ((n:=#e)>1)@Boolean => [coerce(e.1/e.n)@F,0$F]
- -- otherwise stiffness not present
- [0$F,0$F]
-
- md:MDF := map(edf2df,me)$ExpertSystemToolsPackage2(EDF,DF)
-
- -- otherwise calculate numerically the complex eigenvalues
- -- using NAG routine f02aff.
-
- res:Result := f02aff(r,r,md,-1)$NagEigenPackage
- realParts:Union(Any,"failed") := search(rr::Symbol,res)$Result
- realParts case "failed" => [0$F,0$F]
- realPartsMatrix:MDF := retract(realParts)$AnyFunctions1(MDF) -- array === matrix
- imagParts:Union(Any,"failed") := search(ri::Symbol,res)$Result
- imagParts case "failed" => [0$F,0$F]
- imagPartsMatrix:MDF := retract(imagParts)$AnyFunctions1(MDF) -- array === matrix
- imagPartsList:LDF := members(imagPartsMatrix)$MDF
- realPartsList:LDF := members(realPartsMatrix)$MDF
- stabilityAngle := leastStabilityAngle(realPartsList,imagPartsList)
- negRealPartsList := sort(neglist(realPartsList)$ExpertSystemToolsPackage1(DF))
- empty?(negRealPartsList)$LDF => [0$F,stabilityAngle]
- ((n:=#negRealPartsList)>1)@Boolean =>
- out := convert(negRealPartsList.1/negRealPartsList.n)@F
- [out,stabilityAngle] -- calculate stiffness ratio
- [-convert(negRealPartsList.1)@F,stabilityAngle]
-
- eval1(l:LEDF,e:LEEDF):LEDF ==
- [eval(u,e)$EDF for u in l]
-
- eval(mat:MEDF,symbols:LS,values:VEDF):MEDF ==
- l := listOfLists(mat)
- ledf := entries(values)$VEDF
- e := [equation(u::EDF,v)$EEDF for u in symbols for v in ledf]
- l := [eval1(w,e) for w in l]
- matrix l
-
- combineFeatureCompatibility(C1:F,C2:F):F ==
-
- -- C1 C2
- -- s(C1,C2) = -----------------------
- -- C1 C2 + (1 - C1)(1 - C2)
-
- C1*C2/((C1*C2)+(1$F-C1)*(1$F-C2))
-
- combineFeatureCompatibility(C1:F,L:LF):F ==
-
- empty?(L)$LF => C1
- C2 := combineFeatureCompatibility(C1,first(L)$LF)
- combineFeatureCompatibility(C2,rest(L)$LF)
-
- jacobian(v:VEDF,w:LS):Matrix EDF ==
- jacobian(v,w)$MultiVariableCalculusFunctions(S,EDF,VEDF,LS)
-
- sparsityIF(m:Matrix EDF):F ==
- l:LEDF :=parts m
- z:LEDF := [u for u in l | zero?(u)$EDF]
- ((#z)::F/(#l)::F)
-
- sum(a:EDF,b:EDF):EDF == a+b
-
- stiffnessAndStabilityOfODE(ode:ODEA):RSS ==
- odefns := copy ode.fn
- ls:LS := [subscript(Y,[coerce(n)])$Symbol for n in 1..# odefns]
- yvals := copy ode.yinit
- for i in 1..#yvals repeat
- zero?(yvals.i) => yvals.i := 0.1::DF
- yexpr := [coerce(v)@EDF for v in yvals]
- yv:VEDF := vector(yexpr)
- j1:MEDF := jacobian(odefns,ls)
- ej1:MEDF := eval(j1,ls,yv)
- ej1 := eval(ej1,variables(reduce(sum,members(ej1)$MEDF)),vector([(ode.xinit)::EDF]))
- ssf := stiffnessAndStabilityFactor(ej1)
- stability := 1.0-sqrt((ssf.stabilityFactor)*(2.0)/(pi()$F))
- stiffness := (1.0)-exp(-(ssf.stiffnessFactor)/(500.0))
- [stiffness,stability]
-
- stiffnessAndStabilityOfODEIF(ode:ODEA):RSS ==
- odefn := copy ode
- (t := showIntensityFunctions(odefn)$ODEIntensityFunctionsTable) case ATT =>
- s:ATT := coerce(t)@ATT
- negative?(s.stiffness)$F =>
- ssf:RSS := stiffnessAndStabilityOfODE(odefn)
- s := [ssf.stiffnessFactor,ssf.stabilityFactor,s.expense,
- s.accuracy,s.intermediateResults]
- r:ROA := [odefn,s]
- insert!(r)$ODEIntensityFunctionsTable
- ssf
- [s.stiffness,s.stability]
- ssf:RSS := stiffnessAndStabilityOfODE(odefn)
- s:ATT := [ssf.stiffnessFactor,ssf.stabilityFactor,-1.0,-1.0,-1.0]
- r:ROA := [odefn,s]
- insert!(r)$ODEIntensityFunctionsTable
- ssf
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain ODEIFTBL ODEIntensityFunctionsTable>>
-<<package D02AGNT d02AgentsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d02routine.spad.pamphlet b/src/algebra/d02routine.spad.pamphlet
deleted file mode 100644
index 0f30183d..00000000
--- a/src/algebra/d02routine.spad.pamphlet
+++ /dev/null
@@ -1,424 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d02routine.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain D02BBFA d02bbfAnnaType}
-<<domain D02BBFA d02bbfAnnaType>>=
-)abbrev domain D02BBFA d02bbfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: January 1996
-++ Basic Operations:
-++ Description:
-++ \axiomType{d02bbfAnnaType} is a domain of
-++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
-++ for the NAG routine D02BBF, a ODE routine which uses an
-++ Runge-Kutta method to solve a system of differential
-++ equations. The function \axiomFun{measure} measures the
-++ usefulness of the routine D02BBF for the given problem. The
-++ function \axiomFun{ODESolve} performs the integration by using
-++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
-
-
-d02bbfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add -- Runge Kutta
-
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- MDF ==> Matrix DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- VEDF ==> Vector Expression DoubleFloat
- VEF ==> Vector Expression Float
- EF ==> Expression Float
- VDF ==> Vector DoubleFloat
- VMF ==> Vector MachineFloat
- MF ==> MachineFloat
- ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
- g:EDF,abserr:DF,relerr:DF)
- RSS ==> Record(stiffnessFactor:F,stabilityFactor:F)
- INT ==> Integer
- EF2 ==> ExpressionFunctions2
-
- import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
- import AttributeButtons
-
- accuracyCF(ode:ODEA):F ==
- b := getButtonValue("d02bbf","accuracy")$AttributeButtons
- accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
- accuracyIntensityValue > 0.999 => 0$F
- 0.8*exp(-((10*accuracyIntensityValue)**3)$F/266)$F
-
- stiffnessCF(stiffnessIntensityValue:F):F ==
- b := getButtonValue("d02bbf","stiffness")$AttributeButtons
- 0.5*exp(-(2*combineFeatureCompatibility(b,stiffnessIntensityValue))**2)$F
-
- stabilityCF(stabilityIntensityValue:F):F ==
- b := getButtonValue("d02bbf","stability")$AttributeButtons
- 0.5 * cos(combineFeatureCompatibility(b,stabilityIntensityValue))$F
-
- expenseOfEvaluationCF(ode:ODEA):F ==
- b := getButtonValue("d02bbf","expense")$AttributeButtons
- expenseOfEvaluationIntensityValue :=
- combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
- 0.35+0.2*exp(-(2.0*expenseOfEvaluationIntensityValue)**3)$F
-
- measure(R:RoutinesTable,args:ODEA) ==
- m := getMeasure(R,d02bbf :: Symbol)$RoutinesTable
- ssf := stiffnessAndStabilityOfODEIF args
- m := combineFeatureCompatibility(m,[accuracyCF(args),
- stiffnessCF(ssf.stiffnessFactor),
- expenseOfEvaluationCF(args),
- stabilityCF(ssf.stabilityFactor)])
- [m,"Runge-Kutta Merson method"]
-
- ODESolve(ode:ODEA) ==
- i:LDF := ode.intvals
- M := inc(# i)$INT
- irelab := 0$INT
- if positive?(a := ode.abserr) then
- inc(irelab)$INT
- if positive?(r := ode.relerr) then
- inc(irelab)$INT
- if positive?(a+r) then
- tol:DF := a + r
- else
- tol := float(1,-4,10)$DF
- asp7:Union(fn:FileName,fp:Asp7(FCN)) :=
- [retract(vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
- asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) :=
- [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
- d02bbf(ode.xend,M,# ode.fn,irelab,ode.xinit,matrix([ode.yinit])$MDF,
- tol,-1,asp7,asp8)
-
-@
-\section{domain D02BHFA d02bhfAnnaType}
-<<domain D02BHFA d02bhfAnnaType>>=
-)abbrev domain D02BHFA d02bhfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: January 1996
-++ Basic Operations:
-++ Description:
-++ \axiomType{d02bhfAnnaType} is a domain of
-++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
-++ for the NAG routine D02BHF, a ODE routine which uses an
-++ Runge-Kutta method to solve a system of differential
-++ equations. The function \axiomFun{measure} measures the
-++ usefulness of the routine D02BHF for the given problem. The
-++ function \axiomFun{ODESolve} performs the integration by using
-++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
-
-d02bhfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add -- Runge Kutta
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- MDF ==> Matrix DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- VEDF ==> Vector Expression DoubleFloat
- VEF ==> Vector Expression Float
- EF ==> Expression Float
- VDF ==> Vector DoubleFloat
- VMF ==> Vector MachineFloat
- MF ==> MachineFloat
- ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
- g:EDF,abserr:DF,relerr:DF)
- RSS ==> Record(stiffnessFactor:F,stabilityFactor:F)
- INT ==> Integer
- EF2 ==> ExpressionFunctions2
-
- import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
- import AttributeButtons
-
- accuracyCF(ode:ODEA):F ==
- b := getButtonValue("d02bhf","accuracy")$AttributeButtons
- accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
- accuracyIntensityValue > 0.999 => 0$F
- 0.8*exp(-((10*accuracyIntensityValue)**3)$F/266)$F
-
- stiffnessCF(stiffnessIntensityValue:F):F ==
- b := getButtonValue("d02bhf","stiffness")$AttributeButtons
- 0.5*exp(-(2*combineFeatureCompatibility(b,stiffnessIntensityValue))**2)$F
-
- stabilityCF(stabilityIntensityValue:F):F ==
- b := getButtonValue("d02bhf","stability")$AttributeButtons
- 0.5 * cos(combineFeatureCompatibility(b,stabilityIntensityValue))$F
-
- expenseOfEvaluationCF(ode:ODEA):F ==
- b := getButtonValue("d02bhf","expense")$AttributeButtons
- expenseOfEvaluationIntensityValue :=
- combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
- 0.35+0.2*exp(-(2.0*expenseOfEvaluationIntensityValue)**3)$F
-
- measure(R:RoutinesTable,args:ODEA) ==
- m := getMeasure(R,d02bhf :: Symbol)$RoutinesTable
- ssf := stiffnessAndStabilityOfODEIF args
- m := combineFeatureCompatibility(m,[accuracyCF(args),
- stiffnessCF(ssf.stiffnessFactor),
- expenseOfEvaluationCF(args),
- stabilityCF(ssf.stabilityFactor)])
- [m,"Runge-Kutta Merson method"]
-
- ODESolve(ode:ODEA) ==
- irelab := 0$INT
- if positive?(a := ode.abserr) then
- inc(irelab)$INT
- if positive?(r := ode.relerr) then
- inc(irelab)$INT
- if positive?(a+r) then
- tol := max(a,r)$DF
- else
- tol:DF := float(1,-4,10)$DF
- asp7:Union(fn:FileName,fp:Asp7(FCN)) :=
- [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
- asp9:Union(fn:FileName,fp:Asp9(G)) :=
- [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
- d02bhf(ode.xend,# e,irelab,0$DF,ode.xinit,matrix([ode.yinit])$MDF,
- tol,-1,asp9,asp7)
-
-@
-\section{domain D02CJFA d02cjfAnnaType}
-<<domain D02CJFA d02cjfAnnaType>>=
-)abbrev domain D02CJFA d02cjfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: January 1996
-++ Basic Operations:
-++ Description:
-++ \axiomType{d02cjfAnnaType} is a domain of
-++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
-++ for the NAG routine D02CJF, a ODE routine which uses an
-++ Adams-Moulton-Bashworth method to solve a system of differential
-++ equations. The function \axiomFun{measure} measures the
-++ usefulness of the routine D02CJF for the given problem. The
-++ function \axiomFun{ODESolve} performs the integration by using
-++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
-
-d02cjfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add -- Adams
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- MDF ==> Matrix DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- VEDF ==> Vector Expression DoubleFloat
- VEF ==> Vector Expression Float
- EF ==> Expression Float
- VDF ==> Vector DoubleFloat
- VMF ==> Vector MachineFloat
- MF ==> MachineFloat
- ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
- g:EDF,abserr:DF,relerr:DF)
- RSS ==> Record(stiffnessFactor:F,stabilityFactor:F)
- INT ==> Integer
- EF2 ==> ExpressionFunctions2
-
- import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
-
- accuracyCF(ode:ODEA):F ==
- b := getButtonValue("d02cjf","accuracy")$AttributeButtons
- accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
- accuracyIntensityValue > 0.9999 => 0$F
- 0.6*(cos(accuracyIntensityValue*(pi()$F)/2)$F)**0.755
-
- stiffnessCF(ode:ODEA):F ==
- b := getButtonValue("d02cjf","stiffness")$AttributeButtons
- ssf := stiffnessAndStabilityOfODEIF ode
- stiffnessIntensityValue :=
- combineFeatureCompatibility(b,ssf.stiffnessFactor)
- 0.5*exp(-(1.1*stiffnessIntensityValue)**3)$F
-
- measure(R:RoutinesTable,args:ODEA) ==
- m := getMeasure(R,d02cjf :: Symbol)$RoutinesTable
- m := combineFeatureCompatibility(m,[accuracyCF(args), stiffnessCF(args)])
- [m,"Adams method"]
-
- ODESolve(ode:ODEA) ==
- i:LDF := ode.intvals
- if empty?(i) then
- i := [ode.xend]
- M := inc(# i)$INT
- if positive?((a := ode.abserr)*(r := ode.relerr))$DF then
- ire:String := "D"
- else
- if positive?(a) then
- ire:String := "A"
- else
- ire:String := "R"
- tol := max(a,r)$DF
- asp7:Union(fn:FileName,fp:Asp7(FCN)) :=
- [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
- asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) :=
- [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
- asp9:Union(fn:FileName,fp:Asp9(G)) :=
- [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
- d02cjf(ode.xend,M,# e,tol,ire,ode.xinit,matrix([ode.yinit])$MDF,
- -1,asp9,asp7,asp8)
-
-@
-\section{domain D02EJFA d02ejfAnnaType}
-<<domain D02EJFA d02ejfAnnaType>>=
-)abbrev domain D02EJFA d02ejfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: January 1996
-++ Basic Operations:
-++ Description:
-++ \axiomType{d02ejfAnnaType} is a domain of
-++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
-++ for the NAG routine D02EJF, a ODE routine which uses a backward
-++ differentiation formulae method to handle a stiff system
-++ of differential equations. The function \axiomFun{measure} measures
-++ the usefulness of the routine D02EJF for the given problem. The
-++ function \axiomFun{ODESolve} performs the integration by using
-++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
-
-d02ejfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add -- BDF "Stiff"
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- MDF ==> Matrix DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- FI ==> Fraction Integer
- EFI ==> Expression Fraction Integer
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- VEDF ==> Vector Expression DoubleFloat
- VEF ==> Vector Expression Float
- EF ==> Expression Float
- VDF ==> Vector DoubleFloat
- VMF ==> Vector MachineFloat
- MF ==> MachineFloat
- ODEA ==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
- g:EDF,abserr:DF,relerr:DF)
- RSS ==> Record(stiffnessFactor:F,stabilityFactor:F)
- INT ==> Integer
- EF2 ==> ExpressionFunctions2
-
- import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
-
- accuracyCF(ode:ODEA):F ==
- b := getButtonValue("d02ejf","accuracy")$AttributeButtons
- accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
- accuracyIntensityValue > 0.999 => 0$F
- 0.5*exp(-((10*accuracyIntensityValue)**3)$F/250)$F
-
- intermediateResultsCF(ode:ODEA):F ==
- intermediateResultsIntensityValue := intermediateResultsIF(ode)
- i := 0.5 * exp(-(intermediateResultsIntensityValue/1.649)**3)$F
- a := accuracyCF(ode)
- i+(0.5-i)*(0.5-a)
-
- stabilityCF(ode:ODEA):F ==
- b := getButtonValue("d02ejf","stability")$AttributeButtons
- ssf := stiffnessAndStabilityOfODEIF ode
- stabilityIntensityValue :=
- combineFeatureCompatibility(b,ssf.stabilityFactor)
- 0.68 - 0.5 * exp(-(stabilityIntensityValue)**3)$F
-
- expenseOfEvaluationCF(ode:ODEA):F ==
- b := getButtonValue("d02ejf","expense")$AttributeButtons
- expenseOfEvaluationIntensityValue :=
- combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
- 0.5 * exp(-(1.7*expenseOfEvaluationIntensityValue)**3)$F
-
- systemSizeCF(args:ODEA):F ==
- (1$F - systemSizeIF(args))/2.0
-
- measure(R:RoutinesTable,args:ODEA) ==
- arg := copy args
- m := getMeasure(R,d02ejf :: Symbol)$RoutinesTable
- m := combineFeatureCompatibility(m,[intermediateResultsCF(arg),
- accuracyCF(arg),
- systemSizeCF(arg),
- expenseOfEvaluationCF(arg),
- stabilityCF(arg)])
- [m,"BDF method for Stiff Systems"]
-
- ODESolve(ode:ODEA) ==
- i:LDF := ode.intvals
- m := inc(# i)$INT
- if positive?((a := ode.abserr)*(r := ode.relerr))$DF then
- ire:String := "D"
- else
- if positive?(a) then
- ire:String := "A"
- else
- ire:String := "R"
- if positive?(a+r)$DF then
- tol := max(a,r)$DF
- else
- tol := float(1,-4,10)$DF
- asp7:Union(fn:FileName,fp:Asp7(FCN)) :=
- [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
- asp31:Union(fn:FileName,fp:Asp31(PEDERV)) :=
- [retract(e)$Asp31(PEDERV)]
- asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) :=
- [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
- asp9:Union(fn:FileName,fp:Asp9(G)) :=
- [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
- n:INT := # ode.yinit
- iw:INT := (12+n)*n+50
- ans := d02ejf(ode.xend,m,n,ire,iw,ode.xinit,matrix([ode.yinit])$MDF,
- tol,-1,asp9,asp7,asp31,asp8)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain D02BBFA d02bbfAnnaType>>
-<<domain D02BHFA d02bhfAnnaType>>
-<<domain D02CJFA d02cjfAnnaType>>
-<<domain D02EJFA d02ejfAnnaType>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d03.spad.pamphlet b/src/algebra/d03.spad.pamphlet
deleted file mode 100644
index 81aca02b..00000000
--- a/src/algebra/d03.spad.pamphlet
+++ /dev/null
@@ -1,196 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d03.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGD03 NagPartialDifferentialEquationsPackage}
-<<package NAGD03 NagPartialDifferentialEquationsPackage>>=
-)abbrev package NAGD03 NagPartialDifferentialEquationsPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:51 1994
-++Description:
-++This package uses the NAG Library to solve partial
-++differential equations.
-++See \downlink{Manual Page}{manpageXXd03}.
-NagPartialDifferentialEquationsPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- d03edf : (Integer,Integer,Integer,Integer,_
- DoubleFloat,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ d03edf(ngx,ngy,lda,maxit,acc,iout,a,rhs,ub,ifail)
- ++ solves seven-diagonal systems of linear equations which
- ++ arise from the discretization of an elliptic partial differential
- ++ equation on a rectangular region. This routine uses a multigrid
- ++ technique.
- ++ See \downlink{Manual Page}{manpageXXd03edf}.
- d03eef : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
- Integer,Integer,Integer,String,Integer,Union(fn:FileName,fp:Asp73(PDEF)),Union(fn:FileName,fp:Asp74(BNDY))) -> Result
- ++ d03eef(xmin,xmax,ymin,ymax,ngx,ngy,lda,scheme,ifail,pdef,bndy)
- ++ discretizes a second order elliptic partial differential
- ++ equation (PDE) on a rectangular region.
- ++ See \downlink{Manual Page}{manpageXXd03eef}.
- d03faf : (DoubleFloat,DoubleFloat,Integer,Integer,_
- Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,DoubleFloat,Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,DoubleFloat,Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Integer,Integer,ThreeDimensionalMatrix DoubleFloat,Integer) -> Result
- ++ d03faf(xs,xf,l,lbdcnd,bdxs,bdxf,ys,yf,m,mbdcnd,bdys,bdyf,zs,zf,n,nbdcnd,bdzs,bdzf,lambda,ldimf,mdimf,lwrk,f,ifail)
- ++ solves the Helmholtz equation in Cartesian co-ordinates in
- ++ three dimensions using the standard seven-point finite difference
- ++ approximation. This routine is designed to be particularly
- ++ efficient on vector processors.
- ++ See \downlink{Manual Page}{manpageXXd03faf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(String)
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(ThreeDimensionalMatrix DoubleFloat)
- import FortranPackage
- import Union(fn:FileName,fp:Asp73(PDEF))
- import Union(fn:FileName,fp:Asp74(BNDY))
- macro I == Integer
-
-
-
-
- d03edf(ngxArg:Integer,ngyArg:Integer,ldaArg:Integer,_
- maxitArg:Integer,accArg:DoubleFloat,ioutArg:Integer,_
- aArg:Matrix DoubleFloat,rhsArg:Matrix DoubleFloat,ubArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "d03edf",_
- ["ngx"::S,"ngy"::S,"lda"::S,"maxit"::S,"acc"::S_
- ,"iout"::S,"numit"::S,"ifail"::S,"us"::S,"u"::S,"a"::S,"rhs"::S,"ub"::S_
- ]$Lisp,_
- ["us"::S,"u"::S,"numit"::S]$Lisp,_
- [["double"::S,"acc"::S,["us"::S,"lda"::S]$Lisp_
- ,["u"::S,"lda"::S]$Lisp,["a"::S,"lda"::S,7$Lisp]$Lisp,["rhs"::S,"lda"::S]$Lisp,["ub"::S,["*"::S,"ngx"::S,"ngy"::S]$Lisp]$Lisp_
- ]$Lisp_
- ,["integer"::S,"ngx"::S,"ngy"::S,"lda"::S,"maxit"::S_
- ,"iout"::S,"numit"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["us"::S,"u"::S,"numit"::S,"a"::S,"rhs"::S,"ub"::S,"ifail"::S]$Lisp,_
- [([ngxArg::Any,ngyArg::Any,ldaArg::Any,maxitArg::Any,accArg::Any,ioutArg::Any,ifailArg::Any,aArg::Any,rhsArg::Any,ubArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d03eef(xminArg:DoubleFloat,xmaxArg:DoubleFloat,yminArg:DoubleFloat,_
- ymaxArg:DoubleFloat,ngxArg:Integer,ngyArg:Integer,_
- ldaArg:Integer,schemeArg:String,ifailArg:Integer,_
- pdefArg:Union(fn:FileName,fp:Asp73(PDEF)),bndyArg:Union(fn:FileName,fp:Asp74(BNDY))): Result ==
- pushFortranOutputStack(pdefFilename := aspFilename "pdef")$FOP
- if pdefArg case fn
- then outputAsFortran(pdefArg.fn)
- else outputAsFortran(pdefArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(bndyFilename := aspFilename "bndy")$FOP
- if bndyArg case fn
- then outputAsFortran(bndyArg.fn)
- else outputAsFortran(bndyArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([pdefFilename,bndyFilename]$Lisp,_
- "d03eef",_
- ["xmin"::S,"xmax"::S,"ymin"::S,"ymax"::S,"ngx"::S_
- ,"ngy"::S,"lda"::S,"scheme"::S,"ifail"::S,"pdef"::S_
- ,"bndy"::S,"a"::S,"rhs"::S]$Lisp,_
- ["a"::S,"rhs"::S,"pdef"::S,"bndy"::S]$Lisp,_
- [["double"::S,"xmin"::S,"xmax"::S,"ymin"::S_
- ,"ymax"::S,["a"::S,"lda"::S,7$Lisp]$Lisp,["rhs"::S,"lda"::S]$Lisp,"pdef"::S,"bndy"::S]$Lisp_
- ,["integer"::S,"ngx"::S,"ngy"::S,"lda"::S,"ifail"::S_
- ]$Lisp_
- ,["character"::S,"scheme"::S]$Lisp_
- ]$Lisp,_
- ["a"::S,"rhs"::S,"ifail"::S]$Lisp,_
- [([xminArg::Any,xmaxArg::Any,yminArg::Any,ymaxArg::Any,ngxArg::Any,ngyArg::Any,ldaArg::Any,schemeArg::Any,ifailArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- d03faf(xsArg:DoubleFloat,xfArg:DoubleFloat,lArg:Integer,_
- lbdcndArg:Integer,bdxsArg:Matrix DoubleFloat,bdxfArg:Matrix DoubleFloat,_
- ysArg:DoubleFloat,yfArg:DoubleFloat,mArg:Integer,_
- mbdcndArg:Integer,bdysArg:Matrix DoubleFloat,bdyfArg:Matrix DoubleFloat,_
- zsArg:DoubleFloat,zfArg:DoubleFloat,nArg:Integer,_
- nbdcndArg:Integer,bdzsArg:Matrix DoubleFloat,bdzfArg:Matrix DoubleFloat,_
- lambdaArg:DoubleFloat,ldimfArg:Integer,mdimfArg:Integer,_
- lwrkArg:Integer,fArg:ThreeDimensionalMatrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "d03faf",_
- ["xs"::S,"xf"::S,"l"::S,"lbdcnd"::S,"ys"::S_
- ,"yf"::S,"m"::S,"mbdcnd"::S,"zs"::S,"zf"::S_
- ,"n"::S,"nbdcnd"::S,"lambda"::S,"ldimf"::S,"mdimf"::S_
- ,"lwrk"::S,"pertrb"::S,"ifail"::S,"bdxs"::S,"bdxf"::S,"bdys"::S,"bdyf"::S,"bdzs"::S_
- ,"bdzf"::S,"f"::S,"w"::S]$Lisp,_
- ["pertrb"::S,"w"::S]$Lisp,_
- [["double"::S,"xs"::S,"xf"::S,["bdxs"::S,"mdimf"::S,["+"::S,"n"::S,1@I]$Lisp]$Lisp_
- ,["bdxf"::S,"mdimf"::S,["+"::S,"n"::S,1@I]$Lisp]$Lisp,"ys"::S,"yf"::S,["bdys"::S,"ldimf"::S,["+"::S,"n"::S,1$Lisp]$Lisp]$Lisp_
- ,["bdyf"::S,"ldimf"::S,["+"::S,"n"::S,1@I]$Lisp]$Lisp,"zs"::S_
- ,"zf"::S,["bdzs"::S,"ldimf"::S,["+"::S,"m"::S,1@I]$Lisp]$Lisp,["bdzf"::S,"ldimf"::S,["+"::S,"m"::S,1$Lisp]$Lisp]$Lisp_
- ,"lambda"::S,"pertrb"::S,["f"::S,"ldimf"::S,"mdimf"::S,["+"::S,"n"::S,1@I]$Lisp]$Lisp,["w"::S,"lwrk"::S]$Lisp]$Lisp_
- ,["integer"::S,"l"::S,"lbdcnd"::S,"m"::S,"mbdcnd"::S_
- ,"n"::S,"nbdcnd"::S,"ldimf"::S,"mdimf"::S,"lwrk"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["pertrb"::S,"f"::S,"ifail"::S]$Lisp,_
- [([xsArg::Any,xfArg::Any,lArg::Any,lbdcndArg::Any,ysArg::Any,yfArg::Any,mArg::Any,mbdcndArg::Any,zsArg::Any,zfArg::Any,nArg::Any,nbdcndArg::Any,lambdaArg::Any,ldimfArg::Any,mdimfArg::Any,lwrkArg::Any,ifailArg::Any,bdxsArg::Any,bdxfArg::Any,bdysArg::Any,bdyfArg::Any,bdzsArg::Any,bdzfArg::Any,fArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGD03 NagPartialDifferentialEquationsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d03Package.spad.pamphlet b/src/algebra/d03Package.spad.pamphlet
deleted file mode 100644
index 3cb2a692..00000000
--- a/src/algebra/d03Package.spad.pamphlet
+++ /dev/null
@@ -1,307 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d03Package.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package PDEPACK AnnaPartialDifferentialEquationPackage}
-<<package PDEPACK AnnaPartialDifferentialEquationPackage>>=
-)abbrev package PDEPACK AnnaPartialDifferentialEquationPackage
-++ Author: Brian Dupee
-++ Date Created: June 1996
-++ Date Last Updated: December 1997
-++ Basic Operations:
-++ Description: AnnaPartialDifferentialEquationPackage is an uncompleted
-++ package for the interface to NAG PDE routines. It has been realised that
-++ a new approach to solving PDEs will need to be created.
-++
-LEDF ==> List Expression DoubleFloat
-EDF ==> Expression DoubleFloat
-LDF ==> List DoubleFloat
-MDF ==> Matrix DoubleFloat
-DF ==> DoubleFloat
-LEF ==> List Expression Float
-EF ==> Expression Float
-MEF ==> Matrix Expression Float
-LF ==> List Float
-F ==> Float
-LS ==> List Symbol
-ST ==> String
-LST ==> List String
-INT ==> Integer
-NNI ==> NonNegativeInteger
-RT ==> RoutinesTable
-PDEC ==> Record(start:DF, finish:DF, grid:NNI, boundaryType:INT,
- dStart:MDF, dFinish:MDF)
-PDEB ==> Record(pde:LEDF, constraints:List PDEC,
- f:List LEDF, st:ST, tol:DF)
-IFL ==> List(Record(ifail:INT,instruction:ST))
-Entry ==> Record(chapter:ST, type:ST, domainName: ST,
- defaultMin:F, measure:F, failList:IFL, explList:LST)
-Measure ==> Record(measure:F,name:ST, explanations:LST)
-
-AnnaPartialDifferentialEquationPackage(): with
- solve:(NumericalPDEProblem) -> Result
- ++ solve(PDEProblem) is a top level ANNA function to solve numerically a system
- ++ of partial differential equations.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of PDE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- ++
- ++ ** At the moment, only Second Order Elliptic Partial Differential
- ++ Equations are solved **
- solve:(NumericalPDEProblem,RT) -> Result
- ++ solve(PDEProblem,routines) is a top level ANNA function to solve numerically a system
- ++ of partial differential equations.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of PDE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- ++
- ++ ** At the moment, only Second Order Elliptic Partial Differential
- ++ Equations are solved **
- solve:(F,F,F,F,NNI,NNI,LEF,List LEF,ST,DF) -> Result
- ++ solve(xmin,ymin,xmax,ymax,ngx,ngy,pde,bounds,st,tol) is a top level
- ++ ANNA function to solve numerically a system of partial differential
- ++ equations. This is defined as a list of coefficients (\axiom{pde}),
- ++ a grid (\axiom{xmin}, \axiom{ymin}, \axiom{xmax}, \axiom{ymax},
- ++ \axiom{ngx}, \axiom{ngy}), the boundary values (\axiom{bounds}) and a
- ++ tolerance requirement (\axiom{tol}). There is also a parameter
- ++ (\axiom{st}) which should contain the value "elliptic" if the PDE is
- ++ known to be elliptic, or "unknown" if it is uncertain. This causes the
- ++ routine to check whether the PDE is elliptic.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of PDE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- ++
- ++ ** At the moment, only Second Order Elliptic Partial Differential
- ++ Equations are solved **
- solve:(F,F,F,F,NNI,NNI,LEF,List LEF,ST) -> Result
- ++ solve(xmin,ymin,xmax,ymax,ngx,ngy,pde,bounds,st) is a top level
- ++ ANNA function to solve numerically a system of partial differential
- ++ equations. This is defined as a list of coefficients (\axiom{pde}),
- ++ a grid (\axiom{xmin}, \axiom{ymin}, \axiom{xmax}, \axiom{ymax},
- ++ \axiom{ngx}, \axiom{ngy}) and the boundary values (\axiom{bounds}).
- ++ A default value for tolerance is used. There is also a parameter
- ++ (\axiom{st}) which should contain the value "elliptic" if the PDE is
- ++ known to be elliptic, or "unknown" if it is uncertain. This causes the
- ++ routine to check whether the PDE is elliptic.
- ++
- ++ The method used to perform the numerical
- ++ process will be one of the routines contained in the NAG numerical
- ++ Library. The function predicts the likely most effective routine
- ++ by checking various attributes of the system of PDE's and calculating
- ++ a measure of compatibility of each routine to these attributes.
- ++
- ++ It then calls the resulting `best' routine.
- ++
- ++ ** At the moment, only Second Order Elliptic Partial Differential
- ++ Equations are solved **
- measure:(NumericalPDEProblem) -> Measure
- ++ measure(prob) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical PDE
- ++ problem defined by \axiom{prob}.
- ++
- ++ It calls each \axiom{domain} of \axiom{category}
- ++ \axiomType{PartialDifferentialEquationsSolverCategory} in turn to
- ++ calculate all measures and returns the best i.e. the name of
- ++ the most appropriate domain and any other relevant information.
- ++ It predicts the likely most effective NAG numerical
- ++ Library routine to solve the input set of PDEs
- ++ by checking various attributes of the system of PDEs and calculating
- ++ a measure of compatibility of each routine to these attributes.
- measure:(NumericalPDEProblem,RT) -> Measure
- ++ measure(prob,R) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical PDE
- ++ problem defined by \axiom{prob}.
- ++
- ++ It calls each \axiom{domain} listed in \axiom{R} of \axiom{category}
- ++ \axiomType{PartialDifferentialEquationsSolverCategory} in turn to
- ++ calculate all measures and returns the best i.e. the name of
- ++ the most appropriate domain and any other relevant information.
- ++ It predicts the likely most effective NAG numerical
- ++ Library routine to solve the input set of PDEs
- ++ by checking various attributes of the system of PDEs and calculating
- ++ a measure of compatibility of each routine to these attributes.
-
-
- == add
-
- import PDEB, d03AgentsPackage, ExpertSystemToolsPackage, NumericalPDEProblem
-
- zeroMeasure:Measure -> Result
- measureSpecific:(ST,RT,PDEB) -> Record(measure:F,explanations:ST)
- solveSpecific:(PDEB,ST) -> Result
- changeName:(Result,ST) -> Result
- recoverAfterFail:(PDEB,RT,Measure,Integer,Result) -> Record(a:Result,b:Measure)
-
- zeroMeasure(m:Measure):Result ==
- a := coerce(0$F)$AnyFunctions1(F)
- text := coerce("No available routine appears appropriate")$AnyFunctions1(ST)
- r := construct([[result@Symbol,a],[method@Symbol,text]])$Result
- concat(measure2Result m,r)$ExpertSystemToolsPackage
-
- measureSpecific(name:ST,R:RT,p:PDEB):Record(measure:F,explanations:ST) ==
- name = "d03eefAnnaType" => measure(R,p)$d03eefAnnaType
- --name = "d03fafAnnaType" => measure(R,p)$d03fafAnnaType
- error("measureSpecific","invalid type name: " name)$ErrorFunctions
-
- measure(P:NumericalPDEProblem,R:RT):Measure ==
- p:PDEB := retract(P)$NumericalPDEProblem
- sofar := 0$F
- best := "none" :: ST
- routs := copy R
- routs := selectPDERoutines(routs)$RT
- empty?(routs)$RT =>
- error("measure", "no routines found")$ErrorFunctions
- rout := inspect(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- meth := empty()$LST
- for i in 1..# routs repeat
- rout := extract!(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- n := e.domainName
- if e.defaultMin > sofar then
- m := measureSpecific(n,R,p)
- if m.measure > sofar then
- sofar := m.measure
- best := n
- str:LST := [string(rout.key)$Symbol "measure: "
- outputMeasure(m.measure)$ExpertSystemToolsPackage " - "
- m.explanations]
- else
- str := [string(rout.key)$Symbol " is no better than other routines"]
- meth := append(meth,str)$LST
- [sofar,best,meth]
-
- measure(P:NumericalPDEProblem):Measure == measure(P,routines()$RT)
-
- solveSpecific(p:PDEB,n:ST):Result ==
- n = "d03eefAnnaType" => PDESolve(p)$d03eefAnnaType
- --n = "d03fafAnnaType" => PDESolve(p)$d03fafAnnaType
- error("solveSpecific","invalid type name: " n)$ErrorFunctions
-
- changeName(ans:Result,name:ST):Result ==
- sy:Symbol := coerce(name "Answer")$Symbol
- anyAns:Any := coerce(ans)$AnyFunctions1(Result)
- construct([[sy,anyAns]])$Result
-
- recoverAfterFail(p:PDEB,routs:RT,m:Measure,iint:Integer,r:Result):
- Record(a:Result,b:Measure) ==
- while positive?(iint) repeat
- routineName := m.name
- s := recoverAfterFail(routs,routineName(1..6),iint)$RT
- s case "failed" => iint := 0
- (s = "no action")@Boolean => iint := 0
- fl := coerce(s)$AnyFunctions1(ST)
- flrec:Record(key:Symbol,entry:Any):=[failure@Symbol,fl]
- m2 := measure(p::NumericalPDEProblem,routs)
- zero?(m2.measure) => iint := 0
- r2:Result := solveSpecific(p,m2.name)
- m := m2
- insert!(flrec,r2)$Result
- r := concat(r2,changeName(r,routineName))$ExpertSystemToolsPackage
- iany := search(ifail@Symbol,r2)$Result
- iany case "failed" => iint := 0
- iint := retract(iany)$AnyFunctions1(Integer)
- [r,m]
-
- solve(P:NumericalPDEProblem,t:RT):Result ==
- routs := copy(t)$RT
- m := measure(P,routs)
- p:PDEB := retract(P)$NumericalPDEProblem
- zero?(m.measure) => zeroMeasure m
- r := solveSpecific(p,n := m.name)
- iany := search(ifail@Symbol,r)$Result
- iint := 0$Integer
- if (iany case Any) then
- iint := retract(iany)$AnyFunctions1(Integer)
- if positive?(iint) then
- tu:Record(a:Result,b:Measure) := recoverAfterFail(p,routs,m,iint,r)
- r := tu.a
- m := tu.b
- expl := getExplanations(routs,n(1..6))$RoutinesTable
- expla := coerce(expl)$AnyFunctions1(LST)
- explaa:Record(key:Symbol,entry:Any) := ["explanations"::Symbol,expla]
- r := concat(construct([explaa]),r)
- concat(measure2Result m,r)$ExpertSystemToolsPackage
-
- solve(P:NumericalPDEProblem):Result == solve(P,routines()$RT)
-
- solve(xmi:F,xma:F,ymi:F,yma:F,nx:NNI,ny:NNI,pe:LEF,bo:List
- LEF,s:ST,to:DF):Result ==
- cx:PDEC := [f2df xmi, f2df xma, nx, 1, empty()$MDF, empty()$MDF]
- cy:PDEC := [f2df ymi, f2df yma, ny, 1, empty()$MDF, empty()$MDF]
- p:PDEB := [[ef2edf e for e in pe],[cx,cy],
- [[ef2edf u for u in w] for w in bo],s,to]
- solve(p::NumericalPDEProblem,routines()$RT)
-
- solve(xmi:F,xma:F,ymi:F,yma:F,nx:NNI,ny:NNI,pe:LEF,bo:List
- LEF,s:ST):Result ==
- solve(xmi,xma,ymi,yma,nx,ny,pe,bo,s,0.0001::DF)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package PDEPACK AnnaPartialDifferentialEquationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d03agents.spad.pamphlet b/src/algebra/d03agents.spad.pamphlet
deleted file mode 100644
index 8019832e..00000000
--- a/src/algebra/d03agents.spad.pamphlet
+++ /dev/null
@@ -1,150 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d03agents.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package D03AGNT d03AgentsPackage}
-<<package D03AGNT d03AgentsPackage>>=
-)abbrev package D03AGNT d03AgentsPackage
-++ Author: Brian Dupee
-++ Date Created: May 1994
-++ Date Last Updated: December 1997
-++ Basic Operations:
-++ Description:
-++ \axiom{d03AgentsPackage} contains a set of computational agents
-++ for use with Partial Differential Equation solvers.
-LEDF ==> List Expression DoubleFloat
-EDF ==> Expression DoubleFloat
-MDF ==> Matrix DoubleFloat
-DF ==> DoubleFloat
-F ==> Float
-INT ==> Integer
-NNI ==> NonNegativeInteger
-EEDF ==> Equation Expression DoubleFloat
-LEEDF ==> List Equation Expression DoubleFloat
-LDF ==> List DoubleFloat
-LOCDF ==> List OrderedCompletion DoubleFloat
-OCDF ==> OrderedCompletion DoubleFloat
-LS ==> List Symbol
-PDEC ==> Record(start:DF, finish:DF, grid:NNI, boundaryType:INT,
- dStart:MDF, dFinish:MDF)
-PDEB ==> Record(pde:LEDF, constraints:List PDEC,
- f:List LEDF, st:String, tol:DF)
-NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-
-d03AgentsPackage(): E == I where
- E ==> with
- varList:(Symbol,NonNegativeInteger) -> LS
- ++ varList(s,n) \undocumented{}
- subscriptedVariables:EDF -> EDF
- ++ subscriptedVariables(e) \undocumented{}
- central?:(DF,DF,LEDF) -> Boolean
- ++ central?(f,g,l) \undocumented{}
- elliptic?:PDEB -> Boolean
- ++ elliptic?(r) \undocumented{}
-
- I ==> add
-
- import ExpertSystemToolsPackage
-
- sum(a:EDF,b:EDF):EDF == a+b
-
- greater(x: EDF, y: EDF): EDF ==
- before?(x,y) => y
- x
-
- varList(s:Symbol,n:NonNegativeInteger):LS ==
- [subscript(s,[t::OutputForm]) for t in expand([1..n])$Segment(Integer)]
-
- subscriptedVariables(e:EDF):EDF ==
- oldVars:List Symbol := variables(e)
- o := [a :: EDF for a in oldVars]
- newVars := varList(X::Symbol,# oldVars)
- n := [b :: EDF for b in newVars]
- subst(e,[a=b for a in o for b in n])
-
- central?(x:DF,y:DF,p:LEDF):Boolean ==
- ls := variables(reduce(sum,p))
- le := [equation(u::EDF,v)$EEDF for u in ls for v in [x::EDF,y::EDF]]
- l := [eval(u,le)$EDF for u in p]
- before?(greater(l.4,l.5), 20 * greater(l.1,greater(l.2,l.3)))
-
- elliptic?(args:PDEB):Boolean ==
- (args.st)="elliptic" => true
- p := args.pde
- xcon:PDEC := first(args.constraints)
- ycon:PDEC := second(args.constraints)
- xs := xcon.start
- ys := ycon.start
- xf := xcon.finish
- yf := ycon.finish
- xstart:DF := ((xf-xs)/2)$DF
- ystart:DF := ((yf-ys)/2)$DF
- optStart:LDF := [xstart,ystart]
- lower:LOCDF := [xs::OCDF,ys::OCDF]
- upper:LOCDF := [xf::OCDF,yf::OCDF]
- v := variables(e := 4*first(p)*third(p)-(second(p))**2)
- eq := subscriptedVariables(e)
- noa:NOA :=
- one?(# v) =>
- ((first v) = X@Symbol) =>
- [eq,[xstart],[xs::OCDF],empty()$LEDF,[xf::OCDF]]
- [eq,[ystart],[ys::OCDF],empty()$LEDF,[yf::OCDF]]
- [eq,optStart,lower,empty()$LEDF,upper]
- ell := optimize(noa::NumericalOptimizationProblem)$AnnaNumericalOptimizationPackage
- o:Union(Any,"failed") := search(objf::Symbol,ell)$Result
- o case "failed" => false
- ob := o :: Any
- obj:DF := retract(ob)$AnyFunctions1(DF)
- positive?(obj)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package D03AGNT d03AgentsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/d03routine.spad.pamphlet b/src/algebra/d03routine.spad.pamphlet
deleted file mode 100644
index bc090fb3..00000000
--- a/src/algebra/d03routine.spad.pamphlet
+++ /dev/null
@@ -1,164 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra d03routine.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain D03EEFA d03eefAnnaType}
-<<domain D03EEFA d03eefAnnaType>>=
-)abbrev domain D03EEFA d03eefAnnaType
-++ Author: Brian Dupee
-++ Date Created: June 1996
-++ Date Last Updated: June 1996
-++ Basic Operations:
-++ Description:
-++ \axiomType{d03eefAnnaType} is a domain of
-++ \axiomType{PartialDifferentialEquationsSolverCategory}
-++ for the NAG routines D03EEF/D03EDF.
-d03eefAnnaType():PartialDifferentialEquationsSolverCategory == Result add -- 2D Elliptic PDE
- LEDF ==> List Expression DoubleFloat
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- MDF ==> Matrix DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- FI ==> Fraction Integer
- VEF ==> Vector Expression Float
- EF ==> Expression Float
- MEF ==> Matrix Expression Float
- NNI ==> NonNegativeInteger
- INT ==> Integer
- PDEC ==> Record(start:DF, finish:DF, grid:NNI, boundaryType:INT,
- dStart:MDF, dFinish:MDF)
- PDEB ==> Record(pde:LEDF, constraints:List PDEC,
- f:List LEDF, st:String, tol:DF)
-
- import d03AgentsPackage, NagPartialDifferentialEquationsPackage
- import ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:PDEB) ==
- (# (args.constraints) > 2)@Boolean =>
- [0$F,"d03eef/d03edf is unsuitable for PDEs of order more than 2"]
- elliptic?(args) =>
- m := getMeasure(R,d03eef :: Symbol)$RoutinesTable
- [m,"d03eef/d03edf is suitable"]
- [0$F,"d03eef/d03edf is unsuitable for hyperbolic or parabolic PDEs"]
-
- PDESolve(args:PDEB) ==
- xcon := first(args.constraints)
- ycon := second(args.constraints)
- nx := xcon.grid
- ny := ycon.grid
- p := args.pde
- x1 := xcon.start
- x2 := xcon.finish
- y1 := ycon.start
- y2 := ycon.finish
- lda := ((4*(nx+1)*(ny+1)+2) quo 3)$INT
- scheme:String :=
- central?((x2-x1)/2,(y2-y1)/2,args.pde) => "C"
- "U"
- asp73:Union(fn:FileName,fp:Asp73(PDEF)) :=
- [retract(vector([edf2ef u for u in p])$VEF)$Asp73(PDEF)]
- asp74:Union(fn:FileName,fp:Asp74(BNDY)) :=
- [retract(matrix([[edf2ef v for v in w] for w in args.f])$MEF)$Asp74(BNDY)]
- fde := d03eef(x1,x2,y1,y2,nx,ny,lda,scheme,-1,asp73,asp74)
- ub := new(1,nx*ny,0$DF)$MDF
- A := search(a::Symbol,fde)$Result
- A case "failed" => empty()$Result
- AA := A::Any
- fdea := retract(AA)$AnyFunctions1(MDF)
- r := search(rhs::Symbol,fde)$Result
- r case "failed" => empty()$Result
- rh := r::Any
- fderhs := retract(rh)$AnyFunctions1(MDF)
- d03edf(nx,ny,lda,15,args.tol,0,fdea,fderhs,ub,-1)
-
-@
-\section{domain D03FAFA d03fafAnnaType}
-<<domain D03FAFA d03fafAnnaType>>=
-)abbrev domain D03FAFA d03fafAnnaType
-++ Author: Brian Dupee
-++ Date Created: July 1996
-++ Date Last Updated: July 1996
-++ Basic Operations:
-++ Description:
-++ \axiomType{d03fafAnnaType} is a domain of
-++ \axiomType{PartialDifferentialEquationsSolverCategory}
-++ for the NAG routine D03FAF.
-d03fafAnnaType():PartialDifferentialEquationsSolverCategory == Result add -- 3D Helmholtz PDE
- LEDF ==> List Expression DoubleFloat
- EDF ==> Expression DoubleFloat
- LDF ==> List DoubleFloat
- MDF ==> Matrix DoubleFloat
- DF ==> DoubleFloat
- F ==> Float
- FI ==> Fraction Integer
- VEF ==> Vector Expression Float
- EF ==> Expression Float
- MEF ==> Matrix Expression Float
- NNI ==> NonNegativeInteger
- INT ==> Integer
- PDEC ==> Record(start:DF, finish:DF, grid:NNI, boundaryType:INT,
- dStart:MDF, dFinish:MDF)
- PDEB ==> Record(pde:LEDF, constraints:List PDEC,
- f:List LEDF, st:String, tol:DF)
-
- import d03AgentsPackage, NagPartialDifferentialEquationsPackage
- import ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:PDEB) ==
- (# (args.constraints) < 3)@Boolean =>
- [0$F,"d03faf is unsuitable for PDEs of order other than 3"]
- [0$F,"d03faf isn't finished"]
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain D03EEFA d03eefAnnaType>>
-<<domain D03FAFA d03fafAnnaType>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/e01.spad.pamphlet b/src/algebra/e01.spad.pamphlet
deleted file mode 100644
index 8cea0282..00000000
--- a/src/algebra/e01.spad.pamphlet
+++ /dev/null
@@ -1,329 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e01.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGE01 NagInterpolationPackage}
-<<package NAGE01 NagInterpolationPackage>>=
-)abbrev package NAGE01 NagInterpolationPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:53 1994
-++Description:
-++This package uses the NAG Library to calculate the interpolation of a function of
-++one or two variables. When provided with the value of the
-++function (and possibly one or more of its lowest-order
-++derivatives) at each of a number of values of the variable(s),
-++the routines provide either an interpolating function or an
-++interpolated value. For some of the interpolating functions,
-++there are supporting routines to evaluate, differentiate or
-++integrate them.
-++See \downlink{Manual Page}{manpageXXe01}.
-
-
-NagInterpolationPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- e01baf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer,_
- Integer,Integer) -> Result
- ++ e01baf(m,x,y,lck,lwrk,ifail)
- ++ determines a cubic spline to a given set of
- ++ data.
- ++ See \downlink{Manual Page}{manpageXXe01baf}.
- e01bef : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e01bef(n,x,f,ifail)
- ++ computes a monotonicity-preserving piecewise cubic Hermite
- ++ interpolant to a set of data points.
- ++ See \downlink{Manual Page}{manpageXXe01bef}.
- e01bff : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- Integer,Matrix DoubleFloat,Integer) -> Result
- ++ e01bff(n,x,f,d,m,px,ifail)
- ++ evaluates a piecewise cubic Hermite interpolant at a set
- ++ of points.
- ++ See \downlink{Manual Page}{manpageXXe01bff}.
- e01bgf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- Integer,Matrix DoubleFloat,Integer) -> Result
- ++ e01bgf(n,x,f,d,m,px,ifail)
- ++ evaluates a piecewise cubic Hermite interpolant and its
- ++ first derivative at a set of points.
- ++ See \downlink{Manual Page}{manpageXXe01bgf}.
- e01bhf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- DoubleFloat,DoubleFloat,Integer) -> Result
- ++ e01bhf(n,x,f,d,a,b,ifail)
- ++ evaluates the definite integral of a piecewise cubic
- ++ Hermite interpolant over the interval [a,b].
- ++ See \downlink{Manual Page}{manpageXXe01bhf}.
- e01daf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ e01daf(mx,my,x,y,f,ifail)
- ++ computes a bicubic spline interpolating surface through a
- ++ set of data values, given on a rectangular grid in the x-y plane.
- ++ See \downlink{Manual Page}{manpageXXe01daf}.
- e01saf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- Integer) -> Result
- ++ e01saf(m,x,y,f,ifail)
- ++ generates a two-dimensional surface interpolating a set of
- ++ scattered data points, using the method of Renka and Cline.
- ++ See \downlink{Manual Page}{manpageXXe01saf}.
- e01sbf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- Matrix Integer,Matrix DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result
- ++ e01sbf(m,x,y,f,triang,grads,px,py,ifail)
- ++ evaluates at a given point the two-dimensional interpolant
- ++ function computed by E01SAF.
- ++ See \downlink{Manual Page}{manpageXXe01sbf}.
- e01sef : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- Integer,Integer,DoubleFloat,DoubleFloat,Integer) -> Result
- ++ e01sef(m,x,y,f,nw,nq,rnw,rnq,ifail)
- ++ generates a two-dimensional surface interpolating a set of
- ++ scattered data points, using a modified Shepard method.
- ++ See \downlink{Manual Page}{manpageXXe01sef}.
- e01sff : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,_
- DoubleFloat,Matrix DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result
- ++ e01sff(m,x,y,f,rnw,fnodes,px,py,ifail)
- ++ evaluates at a given point the two-dimensional
- ++ interpolating function computed by E01SEF.
- ++ See \downlink{Manual Page}{manpageXXe01sff}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Matrix Integer)
- import AnyFunctions1(DoubleFloat)
-
-
- e01baf(mArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- lckArg:Integer,lwrkArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01baf",_
- ["m"::S,"lck"::S,"lwrk"::S,"ifail"::S,"x"::S,"y"::S,"lamda"::S,"c"::S,"wrk"::S_
- ]$Lisp,_
- ["lamda"::S,"c"::S,"wrk"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["lamda"::S,"lck"::S]$Lisp,["c"::S,"lck"::S]$Lisp,["wrk"::S,"lwrk"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"lck"::S,"lwrk"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["lamda"::S,"c"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,lckArg::Any,lwrkArg::Any,ifailArg::Any,xArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01bef(nArg:Integer,xArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01bef",_
- ["n"::S,"ifail"::S,"x"::S,"f"::S,"d"::S]$Lisp,_
- ["d"::S]$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["f"::S,"n"::S]$Lisp_
- ,["d"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["d"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,ifailArg::Any,xArg::Any,fArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01bff(nArg:Integer,xArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,_
- dArg:Matrix DoubleFloat,mArg:Integer,pxArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01bff",_
- ["n"::S,"m"::S,"ifail"::S,"x"::S,"f"::S,"d"::S,"px"::S,"pf"::S_
- ]$Lisp,_
- ["pf"::S]$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["f"::S,"n"::S]$Lisp_
- ,["d"::S,"n"::S]$Lisp,["px"::S,"m"::S]$Lisp,["pf"::S,"m"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"m"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["pf"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,mArg::Any,ifailArg::Any,xArg::Any,fArg::Any,dArg::Any,pxArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01bgf(nArg:Integer,xArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,_
- dArg:Matrix DoubleFloat,mArg:Integer,pxArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01bgf",_
- ["n"::S,"m"::S,"ifail"::S,"x"::S,"f"::S,"d"::S,"px"::S,"pf"::S_
- ,"pd"::S]$Lisp,_
- ["pf"::S,"pd"::S]$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["f"::S,"n"::S]$Lisp_
- ,["d"::S,"n"::S]$Lisp,["px"::S,"m"::S]$Lisp,["pf"::S,"m"::S]$Lisp,["pd"::S,"m"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"m"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["pf"::S,"pd"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,mArg::Any,ifailArg::Any,xArg::Any,fArg::Any,dArg::Any,pxArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01bhf(nArg:Integer,xArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,_
- dArg:Matrix DoubleFloat,aArg:DoubleFloat,bArg:DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01bhf",_
- ["n"::S,"a"::S,"b"::S,"pint"::S,"ifail"::S_
- ,"x"::S,"f"::S,"d"::S]$Lisp,_
- ["pint"::S]$Lisp,_
- [["double"::S,["x"::S,"n"::S]$Lisp,["f"::S,"n"::S]$Lisp_
- ,["d"::S,"n"::S]$Lisp,"a"::S,"b"::S,"pint"::S]$Lisp_
- ,["integer"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["pint"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,aArg::Any,bArg::Any,ifailArg::Any,xArg::Any,fArg::Any,dArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01daf(mxArg:Integer,myArg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01daf",_
- ["mx"::S,"my"::S,"px"::S,"py"::S,"ifail"::S_
- ,"x"::S,"y"::S,"f"::S,"lamda"::S,"mu"::S_
- ,"c"::S,"wrk"::S]$Lisp,_
- ["px"::S,"py"::S,"lamda"::S,"mu"::S,"c"::S,"wrk"::S]$Lisp,_
- [["double"::S,["x"::S,"mx"::S]$Lisp,["y"::S,"my"::S]$Lisp_
- ,["f"::S,["*"::S,"mx"::S,"my"::S]$Lisp]$Lisp,["lamda"::S,["+"::S,"mx"::S,4$Lisp]$Lisp]$Lisp,["mu"::S,["+"::S,"mx"::S,4$Lisp]$Lisp]$Lisp_
- ,["c"::S,["*"::S,"mx"::S,"my"::S]$Lisp]$Lisp,["wrk"::S,["*"::S,["+"::S,"mx"::S,6$Lisp]$Lisp,["+"::S,"my"::S,6$Lisp]$Lisp]$Lisp]$Lisp_
- ]$Lisp_
- ,["integer"::S,"mx"::S,"my"::S,"px"::S,"py"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["px"::S,"py"::S,"lamda"::S,"mu"::S,"c"::S,"ifail"::S]$Lisp,_
- [([mxArg::Any,myArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01saf(mArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- fArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01saf",_
- ["m"::S,"ifail"::S,"x"::S,"y"::S,"f"::S,"triang"::S,"grads"::S_
- ]$Lisp,_
- ["triang"::S,"grads"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["f"::S,"m"::S]$Lisp,["grads"::S,2$Lisp,"m"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,["triang"::S,["*"::S,7$Lisp,"m"::S]$Lisp]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["triang"::S,"grads"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01sbf(mArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- fArg:Matrix DoubleFloat,triangArg:Matrix Integer,gradsArg:Matrix DoubleFloat,_
- pxArg:DoubleFloat,pyArg:DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01sbf",_
- ["m"::S,"px"::S,"py"::S,"pf"::S,"ifail"::S_
- ,"x"::S,"y"::S,"f"::S,"triang"::S,"grads"::S_
- ]$Lisp,_
- ["pf"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["f"::S,"m"::S]$Lisp,["grads"::S,2$Lisp,"m"::S]$Lisp,"px"::S,"py"::S,"pf"::S]$Lisp_
- ,["integer"::S,"m"::S,["triang"::S,["*"::S,7$Lisp,"m"::S]$Lisp]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["pf"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,pxArg::Any,pyArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any,triangArg::Any,gradsArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01sef(mArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- fArg:Matrix DoubleFloat,nwArg:Integer,nqArg:Integer,_
- rnwArg:DoubleFloat,rnqArg:DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01sef",_
- ["m"::S,"nw"::S,"nq"::S,"minnq"::S,"rnw"::S_
- ,"rnq"::S,"ifail"::S,"x"::S,"y"::S,"f"::S,"fnodes"::S,"wrk"::S_
- ]$Lisp,_
- ["fnodes"::S,"minnq"::S,"wrk"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["f"::S,"m"::S]$Lisp,["fnodes"::S,["*"::S,5$Lisp,"m"::S]$Lisp]$Lisp,"rnw"::S,"rnq"::S,["wrk"::S,["*"::S,6$Lisp,"m"::S]$Lisp]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"nw"::S,"nq"::S,"minnq"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["fnodes"::S,"minnq"::S,"rnw"::S,"rnq"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nwArg::Any,nqArg::Any,rnwArg::Any,rnqArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e01sff(mArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- fArg:Matrix DoubleFloat,rnwArg:DoubleFloat,fnodesArg:Matrix DoubleFloat,_
- pxArg:DoubleFloat,pyArg:DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e01sff",_
- ["m"::S,"rnw"::S,"px"::S,"py"::S,"pf"::S_
- ,"ifail"::S,"x"::S,"y"::S,"f"::S,"fnodes"::S]$Lisp,_
- ["pf"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["f"::S,"m"::S]$Lisp,"rnw"::S,["fnodes"::S,["*"::S,5$Lisp,"m"::S]$Lisp]$Lisp,"px"::S,"py"::S,"pf"::S]$Lisp_
- ,["integer"::S,"m"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["pf"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,rnwArg::Any,pxArg::Any,pyArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any,fnodesArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGE01 NagInterpolationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/e02.spad.pamphlet b/src/algebra/e02.spad.pamphlet
deleted file mode 100644
index 3a06e977..00000000
--- a/src/algebra/e02.spad.pamphlet
+++ /dev/null
@@ -1,588 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e02.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGE02 NagFittingPackage}
-<<package NAGE02 NagFittingPackage>>=
-)abbrev package NAGE02 NagFittingPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:44:59 1994
-++Description:
-++This package uses the NAG Library to find a
-++function which approximates a set of data points. Typically the
-++data contain random errors, as of experimental measurement, which
-++need to be smoothed out. To seek an approximation to the data, it
-++is first necessary to specify for the approximating function a
-++mathematical form (a polynomial, for example) which contains a
-++number of unspecified coefficients: the appropriate fitting
-++routine then derives for the coefficients the values which
-++provide the best fit of that particular form. The package deals
-++mainly with curve and surface fitting (i.e., fitting with
-++functions of one and of two variables) when a polynomial or a
-++cubic spline is used as the fitting function, since these cover
-++the most common needs. However, fitting with other functions
-++and/or more variables can be undertaken by means of general
-++linear or nonlinear routines (some of which are contained in
-++other packages) depending on whether the coefficients in the
-++function occur linearly or nonlinearly. Cases where a graph
-++rather than a set of data points is given can be treated simply
-++by first reading a suitable set of points from the graph.
-++The package also contains routines for evaluating,
-++differentiating and integrating polynomial and spline curves and
-++surfaces, once the numerical values of their coefficients have
-++been determined.
-++See \downlink{Manual Page}{manpageXXe02}.
-
-
-NagFittingPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- e02adf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02adf(m,kplus1,nrows,x,y,w,ifail)
- ++ computes weighted least-squares polynomial approximations
- ++ to an arbitrary set of data points.
- ++ See \downlink{Manual Page}{manpageXXe02adf}.
- e02aef : (Integer,Matrix DoubleFloat,DoubleFloat,Integer) -> Result
- ++ e02aef(nplus1,a,xcap,ifail)
- ++ evaluates a polynomial from its Chebyshev-series
- ++ representation.
- ++ See \downlink{Manual Page}{manpageXXe02aef}.
- e02agf : (Integer,Integer,Integer,DoubleFloat,_
- DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Matrix Integer,Integer,Integer,Integer) -> Result
- ++ e02agf(m,kplus1,nrows,xmin,xmax,x,y,w,mf,xf,yf,lyf,ip,lwrk,liwrk,ifail)
- ++ computes constrained weighted least-squares polynomial
- ++ approximations in Chebyshev-series form to an arbitrary set of
- ++ data points. The values of the approximations and any number of
- ++ their derivatives can be specified at selected points.
- ++ See \downlink{Manual Page}{manpageXXe02agf}.
- e02ahf : (Integer,DoubleFloat,DoubleFloat,Matrix DoubleFloat,_
- Integer,Integer,Integer,Integer,Integer) -> Result
- ++ e02ahf(np1,xmin,xmax,a,ia1,la,iadif1,ladif,ifail)
- ++ determines the coefficients in the Chebyshev-series
- ++ representation of the derivative of a polynomial given in
- ++ Chebyshev-series form.
- ++ See \downlink{Manual Page}{manpageXXe02ahf}.
- e02ajf : (Integer,DoubleFloat,DoubleFloat,Matrix DoubleFloat,_
- Integer,Integer,DoubleFloat,Integer,Integer,Integer) -> Result
- ++ e02ajf(np1,xmin,xmax,a,ia1,la,qatm1,iaint1,laint,ifail)
- ++ determines the coefficients in the Chebyshev-series
- ++ representation of the indefinite integral of a polynomial given
- ++ in Chebyshev-series form.
- ++ See \downlink{Manual Page}{manpageXXe02ajf}.
- e02akf : (Integer,DoubleFloat,DoubleFloat,Matrix DoubleFloat,_
- Integer,Integer,DoubleFloat,Integer) -> Result
- ++ e02akf(np1,xmin,xmax,a,ia1,la,x,ifail)
- ++ evaluates a polynomial from its Chebyshev-series
- ++ representation, allowing an arbitrary index increment for
- ++ accessing the array of coefficients.
- ++ See \downlink{Manual Page}{manpageXXe02akf}.
- e02baf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02baf(m,ncap7,x,y,w,lamda,ifail)
- ++ computes a weighted least-squares approximation to an
- ++ arbitrary set of data points by a cubic splines
- ++ prescribed by the user. Cubic spline can also be
- ++ carried out.
- ++ See \downlink{Manual Page}{manpageXXe02baf}.
- e02bbf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,_
- Integer) -> Result
- ++ e02bbf(ncap7,lamda,c,x,ifail)
- ++ evaluates a cubic spline representation.
- ++ See \downlink{Manual Page}{manpageXXe02bbf}.
- e02bcf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,_
- Integer,Integer) -> Result
- ++ e02bcf(ncap7,lamda,c,x,left,ifail)
- ++ evaluates a cubic spline and its first three derivatives
- ++ from its B-spline representation.
- ++ See \downlink{Manual Page}{manpageXXe02bcf}.
- e02bdf : (Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02bdf(ncap7,lamda,c,ifail)
- ++ computes the definite integral from its
- ++ B-spline representation.
- ++ See \downlink{Manual Page}{manpageXXe02bdf}.
- e02bef : (String,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Matrix DoubleFloat,DoubleFloat,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,Matrix Integer) -> Result
- ++ e02bef(start,m,x,y,w,s,nest,lwrk,n,lamda,ifail,wrk,iwrk)
- ++ computes a cubic spline approximation to an arbitrary set
- ++ of data points. The knot are located
- ++ automatically, but a single parameter must be specified to
- ++ control the trade-off between closeness of fit and smoothness of
- ++ fit.
- ++ See \downlink{Manual Page}{manpageXXe02bef}.
- e02daf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix Integer,Integer,Integer,Integer,DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02daf(m,px,py,x,y,f,w,mu,point,npoint,nc,nws,eps,lamda,ifail)
- ++ forms a minimal, weighted least-squares bicubic spline
- ++ surface fit with prescribed knots to a given set of data points.
- ++ See \downlink{Manual Page}{manpageXXe02daf}.
- e02dcf : (String,Integer,Matrix DoubleFloat,Integer,_
- Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix Integer,Integer) -> Result
- ++ e02dcf(start,mx,x,my,y,f,s,nxest,nyest,lwrk,liwrk,nx,lamda,ny,mu,wrk,iwrk,ifail)
- ++ computes a bicubic spline approximation to a set of data
- ++ values, given on a rectangular grid in the x-y plane. The knots
- ++ of the spline are located automatically, but a single parameter
- ++ must be specified to control the trade-off between closeness of
- ++ fit and smoothness of fit.
- ++ See \downlink{Manual Page}{manpageXXe02dcf}.
- e02ddf : (String,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02ddf(start,m,x,y,f,w,s,nxest,nyest,lwrk,liwrk,nx,lamda,ny,mu,wrk,ifail)
- ++ computes a bicubic spline approximation to a set of
- ++ scattered data are located
- ++ automatically, but a single parameter must be specified to
- ++ control the trade-off between closeness of fit and smoothness of
- ++ fit.
- ++ See \downlink{Manual Page}{manpageXXe02ddf}.
- e02def : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02def(m,px,py,x,y,lamda,mu,c,ifail)
- ++ calculates values of a bicubic spline
- ++ representation.
- ++ See \downlink{Manual Page}{manpageXXe02def}.
- e02dff : (Integer,Integer,Integer,Integer,_
- Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Integer,Integer) -> Result
- ++ e02dff(mx,my,px,py,x,y,lamda,mu,c,lwrk,liwrk,ifail)
- ++ calculates values of a bicubic spline
- ++ representation. The spline is evaluated at all points on a
- ++ rectangular grid.
- ++ See \downlink{Manual Page}{manpageXXe02dff}.
- e02gaf : (Integer,Integer,Integer,DoubleFloat,_
- Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ e02gaf(m,la,nplus2,toler,a,b,ifail)
- ++ calculates an l solution to an over-determined system of
- ++ 1
- ++ linear equations.
- ++ See \downlink{Manual Page}{manpageXXe02gaf}.
- e02zaf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Integer,Integer) -> Result
- ++ e02zaf(px,py,lamda,mu,m,x,y,npoint,nadres,ifail)
- ++ sorts two-dimensional data into rectangular panels.
- ++ See \downlink{Manual Page}{manpageXXe02zaf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Matrix Integer)
- import AnyFunctions1(String)
-
-
- e02adf(mArg:Integer,kplus1Arg:Integer,nrowsArg:Integer,_
- xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,wArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02adf",_
- ["m"::S,"kplus1"::S,"nrows"::S,"ifail"::S,"x"::S,"y"::S,"w"::S,"a"::S,"s"::S_
- ,"work1"::S,"work2"::S]$Lisp,_
- ["a"::S,"s"::S,"work1"::S,"work2"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["w"::S,"m"::S]$Lisp,["a"::S,"nrows"::S,"kplus1"::S]$Lisp,["s"::S,"kplus1"::S]$Lisp,["work1"::S,["*"::S,3$Lisp,"m"::S]$Lisp]$Lisp_
- ,["work2"::S,["*"::S,2$Lisp,"kplus1"::S]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"kplus1"::S,"nrows"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["a"::S,"s"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,kplus1Arg::Any,nrowsArg::Any,ifailArg::Any,xArg::Any,yArg::Any,wArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02aef(nplus1Arg:Integer,aArg:Matrix DoubleFloat,xcapArg:DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02aef",_
- ["nplus1"::S,"xcap"::S,"p"::S,"ifail"::S,"a"::S]$Lisp,_
- ["p"::S]$Lisp,_
- [["double"::S,["a"::S,"nplus1"::S]$Lisp,"xcap"::S_
- ,"p"::S]$Lisp_
- ,["integer"::S,"nplus1"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["p"::S,"ifail"::S]$Lisp,_
- [([nplus1Arg::Any,xcapArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02agf(mArg:Integer,kplus1Arg:Integer,nrowsArg:Integer,_
- xminArg:DoubleFloat,xmaxArg:DoubleFloat,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,wArg:Matrix DoubleFloat,mfArg:Integer,_
- xfArg:Matrix DoubleFloat,yfArg:Matrix DoubleFloat,lyfArg:Integer,_
- ipArg:Matrix Integer,lwrkArg:Integer,liwrkArg:Integer,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02agf",_
- ["m"::S,"kplus1"::S,"nrows"::S,"xmin"::S,"xmax"::S_
- ,"mf"::S,"lyf"::S,"lwrk"::S,"liwrk"::S,"np1"::S_
- ,"ifail"::S,"x"::S,"y"::S,"w"::S,"xf"::S,"yf"::S_
- ,"ip"::S,"a"::S,"s"::S,"wrk"::S,"iwrk"::S_
- ]$Lisp,_
- ["a"::S,"s"::S,"np1"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- [["double"::S,"xmin"::S,"xmax"::S,["x"::S,"m"::S]$Lisp_
- ,["y"::S,"m"::S]$Lisp,["w"::S,"m"::S]$Lisp,["xf"::S,"mf"::S]$Lisp,["yf"::S,"lyf"::S]$Lisp,["a"::S,"nrows"::S,"kplus1"::S]$Lisp_
- ,["s"::S,"kplus1"::S]$Lisp,["wrk"::S,"lwrk"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"kplus1"::S,"nrows"::S_
- ,"mf"::S,"lyf"::S,["ip"::S,"mf"::S]$Lisp,"lwrk"::S,"liwrk"::S,"np1"::S,"ifail"::S,["iwrk"::S,"liwrk"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["a"::S,"s"::S,"np1"::S,"wrk"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,kplus1Arg::Any,nrowsArg::Any,xminArg::Any,xmaxArg::Any,mfArg::Any,lyfArg::Any,lwrkArg::Any,liwrkArg::Any,ifailArg::Any,xArg::Any,yArg::Any,wArg::Any,xfArg::Any,yfArg::Any,ipArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02ahf(np1Arg:Integer,xminArg:DoubleFloat,xmaxArg:DoubleFloat,_
- aArg:Matrix DoubleFloat,ia1Arg:Integer,laArg:Integer,_
- iadif1Arg:Integer,ladifArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02ahf",_
- ["np1"::S,"xmin"::S,"xmax"::S,"ia1"::S,"la"::S_
- ,"iadif1"::S,"ladif"::S,"patm1"::S,"ifail"::S,"a"::S,"adif"::S]$Lisp,_
- ["patm1"::S,"adif"::S]$Lisp,_
- [["double"::S,"xmin"::S,"xmax"::S,["a"::S,"la"::S]$Lisp_
- ,"patm1"::S,["adif"::S,"ladif"::S]$Lisp]$Lisp_
- ,["integer"::S,"np1"::S,"ia1"::S,"la"::S,"iadif1"::S_
- ,"ladif"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["patm1"::S,"adif"::S,"ifail"::S]$Lisp,_
- [([np1Arg::Any,xminArg::Any,xmaxArg::Any,ia1Arg::Any,laArg::Any,iadif1Arg::Any,ladifArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02ajf(np1Arg:Integer,xminArg:DoubleFloat,xmaxArg:DoubleFloat,_
- aArg:Matrix DoubleFloat,ia1Arg:Integer,laArg:Integer,_
- qatm1Arg:DoubleFloat,iaint1Arg:Integer,laintArg:Integer,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02ajf",_
- ["np1"::S,"xmin"::S,"xmax"::S,"ia1"::S,"la"::S_
- ,"qatm1"::S,"iaint1"::S,"laint"::S,"ifail"::S,"a"::S,"aint"::S]$Lisp,_
- ["aint"::S]$Lisp,_
- [["double"::S,"xmin"::S,"xmax"::S,["a"::S,"la"::S]$Lisp_
- ,"qatm1"::S,["aint"::S,"laint"::S]$Lisp]$Lisp_
- ,["integer"::S,"np1"::S,"ia1"::S,"la"::S,"iaint1"::S_
- ,"laint"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["aint"::S,"ifail"::S]$Lisp,_
- [([np1Arg::Any,xminArg::Any,xmaxArg::Any,ia1Arg::Any,laArg::Any,qatm1Arg::Any,iaint1Arg::Any,laintArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02akf(np1Arg:Integer,xminArg:DoubleFloat,xmaxArg:DoubleFloat,_
- aArg:Matrix DoubleFloat,ia1Arg:Integer,laArg:Integer,_
- xArg:DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02akf",_
- ["np1"::S,"xmin"::S,"xmax"::S,"ia1"::S,"la"::S_
- ,"x"::S,"result"::S,"ifail"::S,"a"::S]$Lisp,_
- ["result"::S]$Lisp,_
- [["double"::S,"xmin"::S,"xmax"::S,["a"::S,"la"::S]$Lisp_
- ,"x"::S,"result"::S]$Lisp_
- ,["integer"::S,"np1"::S,"ia1"::S,"la"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["result"::S,"ifail"::S]$Lisp,_
- [([np1Arg::Any,xminArg::Any,xmaxArg::Any,ia1Arg::Any,laArg::Any,xArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02baf(mArg:Integer,ncap7Arg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,wArg:Matrix DoubleFloat,lamdaArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02baf",_
- ["m"::S,"ncap7"::S,"ss"::S,"ifail"::S,"x"::S,"y"::S,"w"::S,"c"::S,"lamda"::S_
- ,"work1"::S,"work2"::S]$Lisp,_
- ["c"::S,"ss"::S,"work1"::S,"work2"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["w"::S,"m"::S]$Lisp,["c"::S,"ncap7"::S]$Lisp,"ss"::S,["lamda"::S,"ncap7"::S]$Lisp,["work1"::S,"m"::S]$Lisp_
- ,["work2"::S,["*"::S,4$Lisp,"ncap7"::S]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"ncap7"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["c"::S,"ss"::S,"lamda"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,ncap7Arg::Any,ifailArg::Any,xArg::Any,yArg::Any,wArg::Any,lamdaArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02bbf(ncap7Arg:Integer,lamdaArg:Matrix DoubleFloat,cArg:Matrix DoubleFloat,_
- xArg:DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02bbf",_
- ["ncap7"::S,"x"::S,"s"::S,"ifail"::S,"lamda"::S,"c"::S]$Lisp,_
- ["s"::S]$Lisp,_
- [["double"::S,["lamda"::S,"ncap7"::S]$Lisp_
- ,["c"::S,"ncap7"::S]$Lisp,"x"::S,"s"::S]$Lisp_
- ,["integer"::S,"ncap7"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["s"::S,"ifail"::S]$Lisp,_
- [([ncap7Arg::Any,xArg::Any,ifailArg::Any,lamdaArg::Any,cArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02bcf(ncap7Arg:Integer,lamdaArg:Matrix DoubleFloat,cArg:Matrix DoubleFloat,_
- xArg:DoubleFloat,leftArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02bcf",_
- ["ncap7"::S,"x"::S,"left"::S,"ifail"::S,"lamda"::S,"c"::S,"s"::S]$Lisp,_
- ["s"::S]$Lisp,_
- [["double"::S,["lamda"::S,"ncap7"::S]$Lisp_
- ,["c"::S,"ncap7"::S]$Lisp,"x"::S,["s"::S,4$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"ncap7"::S,"left"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["s"::S,"ifail"::S]$Lisp,_
- [([ncap7Arg::Any,xArg::Any,leftArg::Any,ifailArg::Any,lamdaArg::Any,cArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02bdf(ncap7Arg:Integer,lamdaArg:Matrix DoubleFloat,cArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02bdf",_
- ["ncap7"::S,"defint"::S,"ifail"::S,"lamda"::S,"c"::S]$Lisp,_
- ["defint"::S]$Lisp,_
- [["double"::S,["lamda"::S,"ncap7"::S]$Lisp_
- ,["c"::S,"ncap7"::S]$Lisp,"defint"::S]$Lisp_
- ,["integer"::S,"ncap7"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["defint"::S,"ifail"::S]$Lisp,_
- [([ncap7Arg::Any,ifailArg::Any,lamdaArg::Any,cArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02bef(startArg:String,mArg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,wArg:Matrix DoubleFloat,sArg:DoubleFloat,_
- nestArg:Integer,lwrkArg:Integer,nArg:Integer,_
- lamdaArg:Matrix DoubleFloat,ifailArg:Integer,wrkArg:Matrix DoubleFloat,_
- iwrkArg:Matrix Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02bef",_
- ["start"::S,"m"::S,"s"::S,"nest"::S,"lwrk"::S_
- ,"fp"::S,"n"::S,"ifail"::S,"x"::S,"y"::S,"w"::S,"c"::S,"lamda"::S_
- ,"wrk"::S,"iwrk"::S]$Lisp,_
- ["c"::S,"fp"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["w"::S,"m"::S]$Lisp,"s"::S,["c"::S,"nest"::S]$Lisp,"fp"::S,["lamda"::S,"nest"::S]$Lisp,["wrk"::S,"lwrk"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"nest"::S,"lwrk"::S,"n"::S_
- ,"ifail"::S,["iwrk"::S,"nest"::S]$Lisp]$Lisp_
- ,["character"::S,"start"::S]$Lisp_
- ]$Lisp,_
- ["c"::S,"fp"::S,"n"::S,"lamda"::S,"ifail"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- [([startArg::Any,mArg::Any,sArg::Any,nestArg::Any,lwrkArg::Any,nArg::Any,ifailArg::Any,xArg::Any,yArg::Any,wArg::Any,lamdaArg::Any,wrkArg::Any,iwrkArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02daf(mArg:Integer,pxArg:Integer,pyArg:Integer,_
- xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,_
- wArg:Matrix DoubleFloat,muArg:Matrix DoubleFloat,pointArg:Matrix Integer,_
- npointArg:Integer,ncArg:Integer,nwsArg:Integer,_
- epsArg:DoubleFloat,lamdaArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02daf",_
- ["m"::S,"px"::S,"py"::S,"npoint"::S,"nc"::S_
- ,"nws"::S,"eps"::S,"sigma"::S,"rank"::S,"ifail"::S_
- ,"x"::S,"y"::S,"f"::S,"w"::S,"mu"::S_
- ,"point"::S,"dl"::S,"c"::S,"lamda"::S,"ws"::S_
- ]$Lisp,_
- ["dl"::S,"c"::S,"sigma"::S,"rank"::S,"ws"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["f"::S,"m"::S]$Lisp,["w"::S,"m"::S]$Lisp,["mu"::S,"py"::S]$Lisp,"eps"::S,["dl"::S,"nc"::S]$Lisp,["c"::S,"nc"::S]$Lisp_
- ,"sigma"::S,["lamda"::S,"px"::S]$Lisp,["ws"::S,"nws"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"px"::S,"py"::S,["point"::S,"npoint"::S]$Lisp_
- ,"npoint"::S,"nc"::S,"nws"::S,"rank"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["dl"::S,"c"::S,"sigma"::S,"rank"::S,"lamda"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,pxArg::Any,pyArg::Any,npointArg::Any,ncArg::Any,nwsArg::Any,epsArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any,wArg::Any,muArg::Any,pointArg::Any,lamdaArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02dcf(startArg:String,mxArg:Integer,xArg:Matrix DoubleFloat,_
- myArg:Integer,yArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,_
- sArg:DoubleFloat,nxestArg:Integer,nyestArg:Integer,_
- lwrkArg:Integer,liwrkArg:Integer,nxArg:Integer,_
- lamdaArg:Matrix DoubleFloat,nyArg:Integer,muArg:Matrix DoubleFloat,_
- wrkArg:Matrix DoubleFloat,iwrkArg:Matrix Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02dcf",_
- ["start"::S,"mx"::S,"my"::S,"s"::S,"nxest"::S_
- ,"nyest"::S,"lwrk"::S,"liwrk"::S,"fp"::S,"nx"::S_
- ,"ny"::S,"ifail"::S,"x"::S,"y"::S,"f"::S,"c"::S,"lamda"::S_
- ,"mu"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- ["c"::S,"fp"::S]$Lisp,_
- [["double"::S,["x"::S,"mx"::S]$Lisp,["y"::S,"my"::S]$Lisp_
- ,["f"::S,["*"::S,"mx"::S,"my"::S]$Lisp]$Lisp,"s"::S,["c"::S,["*"::S,["-"::S,"nxest"::S,4$Lisp]$Lisp,["-"::S,"nyest"::S,4$Lisp]$Lisp]$Lisp]$Lisp_
- ,"fp"::S,["lamda"::S,"nxest"::S]$Lisp,["mu"::S,"nyest"::S]$Lisp,["wrk"::S,"lwrk"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"mx"::S,"my"::S,"nxest"::S,"nyest"::S_
- ,"lwrk"::S,"liwrk"::S,"nx"::S,"ny"::S,["iwrk"::S,"liwrk"::S]$Lisp,"ifail"::S]$Lisp_
- ,["character"::S,"start"::S]$Lisp_
- ]$Lisp,_
- ["c"::S,"fp"::S,"nx"::S,"lamda"::S,"ny"::S,"mu"::S,"wrk"::S,"iwrk"::S,"ifail"::S]$Lisp,_
- [([startArg::Any,mxArg::Any,myArg::Any,sArg::Any,nxestArg::Any,nyestArg::Any,lwrkArg::Any,liwrkArg::Any,nxArg::Any,nyArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any,lamdaArg::Any,muArg::Any,wrkArg::Any,iwrkArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02ddf(startArg:String,mArg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,fArg:Matrix DoubleFloat,wArg:Matrix DoubleFloat,_
- sArg:DoubleFloat,nxestArg:Integer,nyestArg:Integer,_
- lwrkArg:Integer,liwrkArg:Integer,nxArg:Integer,_
- lamdaArg:Matrix DoubleFloat,nyArg:Integer,muArg:Matrix DoubleFloat,_
- wrkArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02ddf",_
- ["start"::S,"m"::S,"s"::S,"nxest"::S,"nyest"::S_
- ,"lwrk"::S,"liwrk"::S,"fp"::S,"rank"::S,"nx"::S_
- ,"ny"::S,"ifail"::S,"x"::S,"y"::S,"f"::S,"w"::S,"c"::S_
- ,"iwrk"::S,"lamda"::S,"mu"::S,"wrk"::S]$Lisp,_
- ["c"::S,"fp"::S,"rank"::S,"iwrk"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["f"::S,"m"::S]$Lisp,["w"::S,"m"::S]$Lisp,"s"::S,["c"::S,["*"::S,["-"::S,"nxest"::S,4$Lisp]$Lisp,["-"::S,"nyest"::S,4$Lisp]$Lisp]$Lisp]$Lisp_
- ,"fp"::S,["lamda"::S,"nxest"::S]$Lisp,["mu"::S,"nyest"::S]$Lisp,["wrk"::S,"lwrk"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"nxest"::S,"nyest"::S_
- ,"lwrk"::S,"liwrk"::S,"rank"::S,["iwrk"::S,"liwrk"::S]$Lisp,"nx"::S,"ny"::S,"ifail"::S]$Lisp_
- ,["character"::S,"start"::S]$Lisp_
- ]$Lisp,_
- ["c"::S,"fp"::S,"rank"::S,"iwrk"::S,"nx"::S,"lamda"::S,"ny"::S,"mu"::S,"wrk"::S,"ifail"::S]$Lisp,_
- [([startArg::Any,mArg::Any,sArg::Any,nxestArg::Any,nyestArg::Any,lwrkArg::Any,liwrkArg::Any,nxArg::Any,nyArg::Any,ifailArg::Any,xArg::Any,yArg::Any,fArg::Any,wArg::Any,lamdaArg::Any,muArg::Any,wrkArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02def(mArg:Integer,pxArg:Integer,pyArg:Integer,_
- xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,lamdaArg:Matrix DoubleFloat,_
- muArg:Matrix DoubleFloat,cArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02def",_
- ["m"::S,"px"::S,"py"::S,"ifail"::S,"x"::S,"y"::S,"lamda"::S,"mu"::S,"c"::S_
- ,"ff"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- ["ff"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- [["double"::S,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp_
- ,["lamda"::S,"px"::S]$Lisp,["mu"::S,"py"::S]$Lisp,["c"::S,["*"::S,["-"::S,"px"::S,4$Lisp]$Lisp,["-"::S,"py"::S,4$Lisp]$Lisp]$Lisp]$Lisp_
- ,["ff"::S,"m"::S]$Lisp,["wrk"::S,["-"::S,"py"::S,4$Lisp]$Lisp]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"px"::S,"py"::S,"ifail"::S_
- ,["iwrk"::S,["-"::S,"py"::S,4$Lisp]$Lisp]$Lisp]$Lisp_
- ]$Lisp,_
- ["ff"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,pxArg::Any,pyArg::Any,ifailArg::Any,xArg::Any,yArg::Any,lamdaArg::Any,muArg::Any,cArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02dff(mxArg:Integer,myArg:Integer,pxArg:Integer,_
- pyArg:Integer,xArg:Matrix DoubleFloat,yArg:Matrix DoubleFloat,_
- lamdaArg:Matrix DoubleFloat,muArg:Matrix DoubleFloat,cArg:Matrix DoubleFloat,_
- lwrkArg:Integer,liwrkArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02dff",_
- ["mx"::S,"my"::S,"px"::S,"py"::S,"lwrk"::S_
- ,"liwrk"::S,"ifail"::S,"x"::S,"y"::S,"lamda"::S,"mu"::S,"c"::S_
- ,"ff"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- ["ff"::S,"wrk"::S,"iwrk"::S]$Lisp,_
- [["double"::S,["x"::S,"mx"::S]$Lisp,["y"::S,"my"::S]$Lisp_
- ,["lamda"::S,"px"::S]$Lisp,["mu"::S,"py"::S]$Lisp,["c"::S,["*"::S,["-"::S,"px"::S,4$Lisp]$Lisp,["-"::S,"py"::S,4$Lisp]$Lisp]$Lisp]$Lisp_
- ,["ff"::S,["*"::S,"mx"::S,"my"::S]$Lisp]$Lisp,["wrk"::S,"lwrk"::S]$Lisp]$Lisp_
- ,["integer"::S,"mx"::S,"my"::S,"px"::S,"py"::S_
- ,"lwrk"::S,"liwrk"::S,"ifail"::S,["iwrk"::S,"liwrk"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["ff"::S,"ifail"::S]$Lisp,_
- [([mxArg::Any,myArg::Any,pxArg::Any,pyArg::Any,lwrkArg::Any,liwrkArg::Any,ifailArg::Any,xArg::Any,yArg::Any,lamdaArg::Any,muArg::Any,cArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02gaf(mArg:Integer,laArg:Integer,nplus2Arg:Integer,_
- tolerArg:DoubleFloat,aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02gaf",_
- ["m"::S,"la"::S,"nplus2"::S,"toler"::S,"resid"::S_
- ,"irank"::S,"iter"::S,"ifail"::S,"x"::S,"a"::S,"b"::S,"iwork"::S]$Lisp,_
- ["x"::S,"resid"::S,"irank"::S,"iter"::S,"iwork"::S]$Lisp,_
- [["double"::S,"toler"::S,["x"::S,"nplus2"::S]$Lisp_
- ,"resid"::S,["a"::S,"la"::S,"nplus2"::S]$Lisp,["b"::S,"m"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"la"::S,"nplus2"::S,"irank"::S_
- ,"iter"::S,"ifail"::S,["iwork"::S,"m"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["x"::S,"resid"::S,"irank"::S,"iter"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,laArg::Any,nplus2Arg::Any,tolerArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e02zaf(pxArg:Integer,pyArg:Integer,lamdaArg:Matrix DoubleFloat,_
- muArg:Matrix DoubleFloat,mArg:Integer,xArg:Matrix DoubleFloat,_
- yArg:Matrix DoubleFloat,npointArg:Integer,nadresArg:Integer,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e02zaf",_
- ["px"::S,"py"::S,"m"::S,"npoint"::S,"nadres"::S_
- ,"ifail"::S,"lamda"::S,"mu"::S,"x"::S,"y"::S,"point"::S_
- ,"adres"::S]$Lisp,_
- ["point"::S,"adres"::S]$Lisp,_
- [["double"::S,["lamda"::S,"px"::S]$Lisp,["mu"::S,"py"::S]$Lisp_
- ,["x"::S,"m"::S]$Lisp,["y"::S,"m"::S]$Lisp]$Lisp_
- ,["integer"::S,"px"::S,"py"::S,"m"::S,"npoint"::S_
- ,"nadres"::S,["point"::S,"npoint"::S]$Lisp,"ifail"::S,["adres"::S,"nadres"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["point"::S,"ifail"::S]$Lisp,_
- [([pxArg::Any,pyArg::Any,mArg::Any,npointArg::Any,nadresArg::Any,ifailArg::Any,lamdaArg::Any,muArg::Any,xArg::Any,yArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGE02 NagFittingPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/e04.spad.pamphlet b/src/algebra/e04.spad.pamphlet
deleted file mode 100644
index df9853f8..00000000
--- a/src/algebra/e04.spad.pamphlet
+++ /dev/null
@@ -1,398 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e04.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGE04 NagOptimisationPackage}
-<<package NAGE04 NagOptimisationPackage>>=
-)abbrev package NAGE04 NagOptimisationPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:45:09 1994
-++Description:
-++This package uses the NAG Library to perform optimization.
-++An optimization problem involves minimizing a function (called
-++the objective function) of several variables, possibly subject to
-++restrictions on the values of the variables defined by a set of
-++constraint functions. The routines in the NAG Foundation Library
-++are concerned with function minimization only, since the problem
-++of maximizing a given function can be transformed into a
-++minimization problem simply by multiplying the function by -1.
-++See \downlink{Manual Page}{manpageXXe04}.
-NagOptimisationPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- e04dgf : (Integer,DoubleFloat,DoubleFloat,Integer,_
- DoubleFloat,Boolean,DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp49(OBJFUN))) -> Result
- ++ e04dgf(n,es,fu,it,lin,list,ma,op,pr,sta,sto,ve,x,ifail,objfun)
- ++ minimizes an unconstrained nonlinear function of several
- ++ variables using a pre-conditioned, limited memory quasi-Newton
- ++ conjugate gradient method. First derivatives are required. The
- ++ routine is intended for use on large scale problems.
- ++ See \downlink{Manual Page}{manpageXXe04dgf}.
- e04fdf : (Integer,Integer,Integer,Integer,_
- Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp50(LSFUN1))) -> Result
- ++ e04fdf(m,n,liw,lw,x,ifail,lsfun1)
- ++ is an easy-to-use algorithm for finding an unconstrained
- ++ minimum of a sum of squares of m nonlinear functions in n
- ++ variables (m>=n). No derivatives are required.
- ++ See \downlink{Manual Page}{manpageXXe04fdf}.
- e04gcf : (Integer,Integer,Integer,Integer,_
- Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp19(LSFUN2))) -> Result
- ++ e04gcf(m,n,liw,lw,x,ifail,lsfun2)
- ++ is an easy-to-use quasi-Newton algorithm for finding an
- ++ unconstrained minimum of m nonlinear
- ++ functions in n variables (m>=n). First derivatives are required.
- ++ See \downlink{Manual Page}{manpageXXe04gcf}.
- e04jaf : (Integer,Integer,Integer,Integer,_
- Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp24(FUNCT1))) -> Result
- ++ e04jaf(n,ibound,liw,lw,bl,bu,x,ifail,funct1)
- ++ is an easy-to-use quasi-Newton algorithm for finding a
- ++ minimum of a function F(x ,x ,...,x ), subject to fixed upper and
- ++ 1 2 n
- ++ lower bounds of the independent variables x ,x ,...,x , using
- ++ 1 2 n
- ++ function values only.
- ++ See \downlink{Manual Page}{manpageXXe04jaf}.
- e04mbf : (Integer,Integer,Integer,Integer,_
- Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Boolean,Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ e04mbf(itmax,msglvl,n,nclin,nctotl,nrowa,a,bl,bu,cvec,linobj,liwork,lwork,x,ifail)
- ++ is an easy-to-use routine for solving linear programming
- ++ problems, or for finding a feasible point for such problems. It
- ++ is not intended for large sparse problems.
- ++ See \downlink{Manual Page}{manpageXXe04mbf}.
- e04naf : (Integer,Integer,Integer,Integer,_
- Integer,Integer,Integer,Integer,DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Boolean,Boolean,Boolean,Integer,Integer,Matrix DoubleFloat,Matrix Integer,Integer,Union(fn:FileName,fp:Asp20(QPHESS))) -> Result
- ++ e04naf(itmax,msglvl,n,nclin,nctotl,nrowa,nrowh,ncolh,bigbnd,a,bl,bu,cvec,featol,hess,cold,lpp,orthog,liwork,lwork,x,istate,ifail,qphess)
- ++ is a comprehensive
- ++ programming (QP) or linear programming (LP) problems. It is not
- ++ intended for large sparse problems.
- ++ See \downlink{Manual Page}{manpageXXe04naf}.
- e04ucf : (Integer,Integer,Integer,Integer,_
- Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Integer,Boolean,DoubleFloat,Integer,DoubleFloat,DoubleFloat,Boolean,DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,Boolean,Integer,Integer,Integer,Integer,Integer,DoubleFloat,DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Integer,Matrix Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp55(CONFUN)),Union(fn:FileName,fp:Asp49(OBJFUN))) -> Result
- ++ e04ucf(n,nclin,ncnln,nrowa,nrowj,nrowr,a,bl,bu,liwork,lwork,sta,cra,der,fea,fun,hes,infb,infs,linf,lint,list,maji,majp,mini,minp,mon,nonf,opt,ste,stao,stac,stoo,stoc,ve,istate,cjac,clamda,r,x,ifail,confun,objfun)
- ++ is designed to minimize an arbitrary smooth function
- ++ subject to constraints on the
- ++ variables, linear constraints.
- ++ (E04UCF may be used for unconstrained, bound-constrained and
- ++ linearly constrained optimization.) The user must provide
- ++ subroutines that define the objective and constraint functions
- ++ and as many of their first partial derivatives as possible.
- ++ Unspecified derivatives are approximated by finite differences.
- ++ All matrices are treated as dense, and hence E04UCF is not
- ++ intended for large sparse problems.
- ++ See \downlink{Manual Page}{manpageXXe04ucf}.
- e04ycf : (Integer,Integer,Integer,DoubleFloat,_
- Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ e04ycf(job,m,n,fsumsq,s,lv,v,ifail)
- ++ returns estimates of elements of the variance
- ++ matrix of the estimated regression coefficients for a nonlinear
- ++ least squares problem. The estimates are derived from the
- ++ Jacobian of the function f(x) at the solution.
- ++ See \downlink{Manual Page}{manpageXXe04ycf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import FortranPackage
- import Union(fn:FileName,fp:Asp49(OBJFUN))
- import AnyFunctions1(Integer)
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Boolean)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Matrix Integer)
- macro I == Integer
-
-
- e04dgf(nArg:Integer,esArg:DoubleFloat,fuArg:DoubleFloat,_
- itArg:Integer,linArg:DoubleFloat,listArg:Boolean,_
- maArg:DoubleFloat,opArg:DoubleFloat,prArg:Integer,_
- staArg:Integer,stoArg:Integer,veArg:Integer,_
- xArg:Matrix DoubleFloat,ifailArg:Integer,objfunArg:Union(fn:FileName,fp:Asp49(OBJFUN))): Result ==
- pushFortranOutputStack(objfunFilename := aspFilename "objfun")$FOP
- if objfunArg case fn
- then outputAsFortran(objfunArg.fn)
- else outputAsFortran(objfunArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([objfunFilename]$Lisp,_
- "e04dgf",_
- ["n"::S,"es"::S,"fu"::S,"it"::S,"lin"::S_
- ,"list"::S,"ma"::S,"op"::S,"pr"::S,"sta"::S_
- ,"sto"::S,"ve"::S,"iter"::S,"objf"::S,"ifail"::S_
- ,"objfun"::S,"objgrd"::S,"x"::S,"iwork"::S,"work"::S,"iuser"::S_
- ,"user"::S]$Lisp,_
- ["iter"::S,"objf"::S,"objgrd"::S,"iwork"::S,"work"::S,"iuser"::S,"user"::S,"objfun"::S]$Lisp,_
- [["double"::S,"es"::S,"fu"::S,"lin"::S,"ma"::S_
- ,"op"::S,"objf"::S,["objgrd"::S,"n"::S]$Lisp,["x"::S,"n"::S]$Lisp,["work"::S,["*"::S,13$Lisp,"n"::S]$Lisp]$Lisp,["user"::S,"*"::S]$Lisp_
- ,"objfun"::S]$Lisp_
- ,["integer"::S,"n"::S,"it"::S,"pr"::S,"sta"::S_
- ,"sto"::S,"ve"::S,"iter"::S,"ifail"::S,["iwork"::S,["+"::S,"n"::S,1@I]$Lisp]$Lisp,["iuser"::S,"*"::S]$Lisp]$Lisp_
- ,["logical"::S,"list"::S]$Lisp_
- ]$Lisp,_
- ["iter"::S,"objf"::S,"objgrd"::S,"x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,esArg::Any,fuArg::Any,itArg::Any,linArg::Any,listArg::Any,maArg::Any,opArg::Any,prArg::Any,staArg::Any,stoArg::Any,veArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04fdf(mArg:Integer,nArg:Integer,liwArg:Integer,_
- lwArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_
- lsfun1Arg:Union(fn:FileName,fp:Asp50(LSFUN1))): Result ==
- pushFortranOutputStack(lsfun1Filename := aspFilename "lsfun1")$FOP
- if lsfun1Arg case fn
- then outputAsFortran(lsfun1Arg.fn)
- else outputAsFortran(lsfun1Arg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([lsfun1Filename]$Lisp,_
- "e04fdf",_
- ["m"::S,"n"::S,"liw"::S,"lw"::S,"fsumsq"::S_
- ,"ifail"::S,"lsfun1"::S,"w"::S,"x"::S,"iw"::S]$Lisp,_
- ["fsumsq"::S,"w"::S,"iw"::S,"lsfun1"::S]$Lisp,_
- [["double"::S,"fsumsq"::S,["w"::S,"lw"::S]$Lisp_
- ,["x"::S,"n"::S]$Lisp,"lsfun1"::S]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"liw"::S,"lw"::S_
- ,"ifail"::S,["iw"::S,"liw"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["fsumsq"::S,"w"::S,"x"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,liwArg::Any,lwArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04gcf(mArg:Integer,nArg:Integer,liwArg:Integer,_
- lwArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_
- lsfun2Arg:Union(fn:FileName,fp:Asp19(LSFUN2))): Result ==
- pushFortranOutputStack(lsfun2Filename := aspFilename "lsfun2")$FOP
- if lsfun2Arg case fn
- then outputAsFortran(lsfun2Arg.fn)
- else outputAsFortran(lsfun2Arg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([lsfun2Filename]$Lisp,_
- "e04gcf",_
- ["m"::S,"n"::S,"liw"::S,"lw"::S,"fsumsq"::S_
- ,"ifail"::S,"lsfun2"::S,"w"::S,"x"::S,"iw"::S]$Lisp,_
- ["fsumsq"::S,"w"::S,"iw"::S,"lsfun2"::S]$Lisp,_
- [["double"::S,"fsumsq"::S,["w"::S,"lw"::S]$Lisp_
- ,["x"::S,"n"::S]$Lisp,"lsfun2"::S]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"liw"::S,"lw"::S_
- ,"ifail"::S,["iw"::S,"liw"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["fsumsq"::S,"w"::S,"x"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,liwArg::Any,lwArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04jaf(nArg:Integer,iboundArg:Integer,liwArg:Integer,_
- lwArg:Integer,blArg:Matrix DoubleFloat,buArg:Matrix DoubleFloat,_
- xArg:Matrix DoubleFloat,ifailArg:Integer,funct1Arg:Union(fn:FileName,fp:Asp24(FUNCT1))): Result ==
- pushFortranOutputStack(funct1Filename := aspFilename "funct1")$FOP
- if funct1Arg case fn
- then outputAsFortran(funct1Arg.fn)
- else outputAsFortran(funct1Arg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([funct1Filename]$Lisp,_
- "e04jaf",_
- ["n"::S,"ibound"::S,"liw"::S,"lw"::S,"f"::S_
- ,"ifail"::S,"funct1"::S,"bl"::S,"bu"::S,"x"::S,"iw"::S,"w"::S_
- ]$Lisp,_
- ["f"::S,"iw"::S,"w"::S,"funct1"::S]$Lisp,_
- [["double"::S,"f"::S,["bl"::S,"n"::S]$Lisp_
- ,["bu"::S,"n"::S]$Lisp,["x"::S,"n"::S]$Lisp,["w"::S,"lw"::S]$Lisp,"funct1"::S]$Lisp_
- ,["integer"::S,"n"::S,"ibound"::S,"liw"::S_
- ,"lw"::S,"ifail"::S,["iw"::S,"liw"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["f"::S,"bl"::S,"bu"::S,"x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,iboundArg::Any,liwArg::Any,lwArg::Any,ifailArg::Any,blArg::Any,buArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04mbf(itmaxArg:Integer,msglvlArg:Integer,nArg:Integer,_
- nclinArg:Integer,nctotlArg:Integer,nrowaArg:Integer,_
- aArg:Matrix DoubleFloat,blArg:Matrix DoubleFloat,buArg:Matrix DoubleFloat,_
- cvecArg:Matrix DoubleFloat,linobjArg:Boolean,liworkArg:Integer,_
- lworkArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e04mbf",_
- ["itmax"::S,"msglvl"::S,"n"::S,"nclin"::S,"nctotl"::S_
- ,"nrowa"::S,"linobj"::S,"liwork"::S,"lwork"::S,"objlp"::S_
- ,"ifail"::S,"a"::S,"bl"::S,"bu"::S,"cvec"::S,"istate"::S_
- ,"clamda"::S,"x"::S,"iwork"::S,"work"::S]$Lisp,_
- ["istate"::S,"objlp"::S,"clamda"::S,"iwork"::S,"work"::S]$Lisp,_
- [["double"::S,["a"::S,"nrowa"::S,"n"::S]$Lisp_
- ,["bl"::S,"nctotl"::S]$Lisp,["bu"::S,"nctotl"::S]$Lisp,["cvec"::S,"n"::S]$Lisp,"objlp"::S,["clamda"::S,"nctotl"::S]$Lisp_
- ,["x"::S,"n"::S]$Lisp,["work"::S,"lwork"::S]$Lisp]$Lisp_
- ,["integer"::S,"itmax"::S,"msglvl"::S,"n"::S_
- ,"nclin"::S,"nctotl"::S,"nrowa"::S,"liwork"::S,"lwork"::S,["istate"::S,"nctotl"::S]$Lisp,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp_
- ]$Lisp_
- ,["logical"::S,"linobj"::S]$Lisp_
- ]$Lisp,_
- ["istate"::S,"objlp"::S,"clamda"::S,"x"::S,"ifail"::S]$Lisp,_
- [([itmaxArg::Any,msglvlArg::Any,nArg::Any,nclinArg::Any,nctotlArg::Any,nrowaArg::Any,linobjArg::Any,liworkArg::Any,lworkArg::Any,ifailArg::Any,aArg::Any,blArg::Any,buArg::Any,cvecArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04naf(itmaxArg:Integer,msglvlArg:Integer,nArg:Integer,_
- nclinArg:Integer,nctotlArg:Integer,nrowaArg:Integer,_
- nrowhArg:Integer,ncolhArg:Integer,bigbndArg:DoubleFloat,_
- aArg:Matrix DoubleFloat,blArg:Matrix DoubleFloat,buArg:Matrix DoubleFloat,_
- cvecArg:Matrix DoubleFloat,featolArg:Matrix DoubleFloat,hessArg:Matrix DoubleFloat,_
- coldArg:Boolean,lppArg:Boolean,orthogArg:Boolean,_
- liworkArg:Integer,lworkArg:Integer,xArg:Matrix DoubleFloat,_
- istateArg:Matrix Integer,ifailArg:Integer,qphessArg:Union(fn:FileName,fp:Asp20(QPHESS))): Result ==
- pushFortranOutputStack(qphessFilename := aspFilename "qphess")$FOP
- if qphessArg case fn
- then outputAsFortran(qphessArg.fn)
- else outputAsFortran(qphessArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([qphessFilename]$Lisp,_
- "e04naf",_
- ["itmax"::S,"msglvl"::S,"n"::S,"nclin"::S,"nctotl"::S_
- ,"nrowa"::S,"nrowh"::S,"ncolh"::S,"bigbnd"::S,"cold"::S_
- ,"lpp"::S,"orthog"::S,"liwork"::S,"lwork"::S,"iter"::S_
- ,"obj"::S,"ifail"::S,"qphess"::S,"a"::S,"bl"::S,"bu"::S,"cvec"::S,"featol"::S_
- ,"hess"::S,"clamda"::S,"x"::S,"istate"::S,"iwork"::S_
- ,"work"::S]$Lisp,_
- ["iter"::S,"obj"::S,"clamda"::S,"iwork"::S,"work"::S,"qphess"::S]$Lisp,_
- [["double"::S,"bigbnd"::S,["a"::S,"nrowa"::S,"n"::S]$Lisp_
- ,["bl"::S,"nctotl"::S]$Lisp,["bu"::S,"nctotl"::S]$Lisp,["cvec"::S,"n"::S]$Lisp,["featol"::S,"nctotl"::S]$Lisp_
- ,["hess"::S,"nrowh"::S,"ncolh"::S]$Lisp,"obj"::S,["clamda"::S,"nctotl"::S]$Lisp,["x"::S,"n"::S]$Lisp,["work"::S,"lwork"::S]$Lisp_
- ,"qphess"::S]$Lisp_
- ,["integer"::S,"itmax"::S,"msglvl"::S,"n"::S_
- ,"nclin"::S,"nctotl"::S,"nrowa"::S,"nrowh"::S,"ncolh"::S,"liwork"::S,"lwork"::S,"iter"::S,["istate"::S,"nctotl"::S]$Lisp_
- ,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_
- ,["logical"::S,"cold"::S,"lpp"::S,"orthog"::S]$Lisp_
- ]$Lisp,_
- ["iter"::S,"obj"::S,"clamda"::S,"x"::S,"istate"::S,"ifail"::S]$Lisp,_
- [([itmaxArg::Any,msglvlArg::Any,nArg::Any,nclinArg::Any,nctotlArg::Any,nrowaArg::Any,nrowhArg::Any,ncolhArg::Any,bigbndArg::Any,coldArg::Any,lppArg::Any,orthogArg::Any,liworkArg::Any,lworkArg::Any,ifailArg::Any,aArg::Any,blArg::Any,buArg::Any,cvecArg::Any,featolArg::Any,hessArg::Any,xArg::Any,istateArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04ucf(nArg:Integer,nclinArg:Integer,ncnlnArg:Integer,_
- nrowaArg:Integer,nrowjArg:Integer,nrowrArg:Integer,_
- aArg:Matrix DoubleFloat,blArg:Matrix DoubleFloat,buArg:Matrix DoubleFloat,_
- liworkArg:Integer,lworkArg:Integer,staArg:Boolean,_
- craArg:DoubleFloat,derArg:Integer,feaArg:DoubleFloat,_
- funArg:DoubleFloat,hesArg:Boolean,infbArg:DoubleFloat,_
- infsArg:DoubleFloat,linfArg:DoubleFloat,lintArg:DoubleFloat,_
- listArg:Boolean,majiArg:Integer,majpArg:Integer,_
- miniArg:Integer,minpArg:Integer,monArg:Integer,_
- nonfArg:DoubleFloat,optArg:DoubleFloat,steArg:DoubleFloat,_
- staoArg:Integer,stacArg:Integer,stooArg:Integer,_
- stocArg:Integer,veArg:Integer,istateArg:Matrix Integer,_
- cjacArg:Matrix DoubleFloat,clamdaArg:Matrix DoubleFloat,rArg:Matrix DoubleFloat,_
- xArg:Matrix DoubleFloat,ifailArg:Integer,confunArg:Union(fn:FileName,fp:Asp55(CONFUN)),_
- objfunArg:Union(fn:FileName,fp:Asp49(OBJFUN))): Result ==
- pushFortranOutputStack(confunFilename := aspFilename "confun")$FOP
- if confunArg case fn
- then outputAsFortran(confunArg.fn)
- else outputAsFortran(confunArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(objfunFilename := aspFilename "objfun")$FOP
- if objfunArg case fn
- then outputAsFortran(objfunArg.fn)
- else outputAsFortran(objfunArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([confunFilename,objfunFilename]$Lisp,_
- "e04ucf",_
- ["n"::S,"nclin"::S,"ncnln"::S,"nrowa"::S,"nrowj"::S_
- ,"nrowr"::S,"liwork"::S,"lwork"::S,"sta"::S,"cra"::S_
- ,"der"::S,"fea"::S,"fun"::S,"hes"::S,"infb"::S_
- ,"infs"::S,"linf"::S,"lint"::S,"list"::S,"maji"::S_
- ,"majp"::S,"mini"::S,"minp"::S,"mon"::S,"nonf"::S_
- ,"opt"::S,"ste"::S,"stao"::S,"stac"::S,"stoo"::S_
- ,"stoc"::S,"ve"::S,"iter"::S,"objf"::S,"ifail"::S_
- ,"confun"::S,"objfun"::S,"a"::S,"bl"::S,"bu"::S,"c"::S,"objgrd"::S_
- ,"istate"::S,"cjac"::S,"clamda"::S,"r"::S,"x"::S_
- ,"iwork"::S,"work"::S,"iuser"::S,"user"::S]$Lisp,_
- ["iter"::S,"c"::S,"objf"::S,"objgrd"::S,"iwork"::S,"work"::S,"iuser"::S,"user"::S,"confun"::S,"objfun"::S]$Lisp,_
- [["double"::S,["a"::S,"nrowa"::S,"n"::S]$Lisp_
- ,["bl"::S,["+"::S,["+"::S,"nclin"::S,"ncnln"::S]$Lisp,"n"::S]$Lisp]$Lisp,["bu"::S,["+"::S,["+"::S,"nclin"::S,"ncnln"::S]$Lisp,"n"::S]$Lisp]$Lisp_
- ,"cra"::S,"fea"::S,"fun"::S,"infb"::S,"infs"::S,"linf"::S,"lint"::S,"nonf"::S,"opt"::S,"ste"::S_
- ,["c"::S,"ncnln"::S]$Lisp,"objf"::S,["objgrd"::S,"n"::S]$Lisp,["cjac"::S,"nrowj"::S,"n"::S]$Lisp,["clamda"::S,["+"::S,["+"::S,"nclin"::S,"ncnln"::S]$Lisp,"n"::S]$Lisp]$Lisp_
- ,["r"::S,"nrowr"::S,"n"::S]$Lisp,["x"::S,"n"::S]$Lisp,["work"::S,"lwork"::S]$Lisp_
- ,["user"::S,1@I]$Lisp,"confun"::S,"objfun"::S]$Lisp_
- ,["integer"::S,"n"::S,"nclin"::S,"ncnln"::S_
- ,"nrowa"::S,"nrowj"::S,"nrowr"::S,"liwork"::S,"lwork"::S,"der"::S,"maji"::S,"majp"::S,"mini"::S,"minp"::S,"mon"::S,"stao"::S_
- ,"stac"::S,"stoo"::S,"stoc"::S,"ve"::S,"iter"::S,["istate"::S,["+"::S,["+"::S,"nclin"::S,"ncnln"::S]$Lisp,"n"::S]$Lisp]$Lisp_
- ,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp,["iuser"::S,1@I]$Lisp]$Lisp_
- ,["logical"::S,"sta"::S,"hes"::S,"list"::S]$Lisp_
- ]$Lisp,_
- ["iter"::S,"c"::S,"objf"::S,"objgrd"::S,"istate"::S,"cjac"::S,"clamda"::S,"r"::S,"x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,nclinArg::Any,ncnlnArg::Any,nrowaArg::Any,nrowjArg::Any,nrowrArg::Any,liworkArg::Any,lworkArg::Any,staArg::Any,craArg::Any,derArg::Any,feaArg::Any,funArg::Any,hesArg::Any,infbArg::Any,infsArg::Any,linfArg::Any,lintArg::Any,listArg::Any,majiArg::Any,majpArg::Any,miniArg::Any,minpArg::Any,monArg::Any,nonfArg::Any,optArg::Any,steArg::Any,staoArg::Any,stacArg::Any,stooArg::Any,stocArg::Any,veArg::Any,ifailArg::Any,aArg::Any,blArg::Any,buArg::Any,istateArg::Any,cjacArg::Any,clamdaArg::Any,rArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- e04ycf(jobArg:Integer,mArg:Integer,nArg:Integer,_
- fsumsqArg:DoubleFloat,sArg:Matrix DoubleFloat,lvArg:Integer,_
- vArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "e04ycf",_
- ["job"::S,"m"::S,"n"::S,"fsumsq"::S,"lv"::S_
- ,"ifail"::S,"s"::S,"cj"::S,"v"::S,"work"::S]$Lisp,_
- ["cj"::S,"work"::S]$Lisp,_
- [["double"::S,"fsumsq"::S,["s"::S,"n"::S]$Lisp_
- ,["cj"::S,"n"::S]$Lisp,["v"::S,"lv"::S,"n"::S]$Lisp,["work"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"job"::S,"m"::S,"n"::S,"lv"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["cj"::S,"v"::S,"ifail"::S]$Lisp,_
- [([jobArg::Any,mArg::Any,nArg::Any,fsumsqArg::Any,lvArg::Any,ifailArg::Any,sArg::Any,vArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGE04 NagOptimisationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/e04Package.spad.pamphlet b/src/algebra/e04Package.spad.pamphlet
deleted file mode 100644
index 452e62db..00000000
--- a/src/algebra/e04Package.spad.pamphlet
+++ /dev/null
@@ -1,448 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e04Package.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package OPTPACK AnnaNumericalOptimizationPackage}
-<<package OPTPACK AnnaNumericalOptimizationPackage>>=
-)abbrev package OPTPACK AnnaNumericalOptimizationPackage
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: December 1997
-++ Basic Operations: measure, optimize, goodnessOfFit.
-++ Description:
-++ \axiomType{AnnaNumericalOptimizationPackage} is a \axiom{package} of
-++ functions for the \axiomType{NumericalOptimizationCategory}
-++ with \axiom{measure} and \axiom{optimize}.
-EDF ==> Expression DoubleFloat
-LEDF ==> List Expression DoubleFloat
-LDF ==> List DoubleFloat
-MDF ==> Matrix DoubleFloat
-DF ==> DoubleFloat
-LOCDF ==> List OrderedCompletion DoubleFloat
-OCDF ==> OrderedCompletion DoubleFloat
-LOCF ==> List OrderedCompletion Float
-OCF ==> OrderedCompletion Float
-LEF ==> List Expression Float
-EF ==> Expression Float
-LF ==> List Float
-F ==> Float
-LS ==> List Symbol
-LST ==> List String
-INT ==> Integer
-NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-LSA ==> Record(lfn:LEDF, init:LDF)
-IFL ==> List(Record(ifail:Integer,instruction:String))
-Entry ==> Record(chapter:String, type:String, domainName: String,
- defaultMin:F, measure:F, failList:IFL, explList:LST)
-Measure ==> Record(measure:F,name:String, explanations:List String)
-Measure2 ==> Record(measure:F,explanations:String)
-RT ==> RoutinesTable
-UNOALSA ==> Union(noa:NOA,lsa:LSA)
-
-AnnaNumericalOptimizationPackage(): with
- measure:NumericalOptimizationProblem -> Measure
- ++ measure(prob) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical optimization problem defined by
- ++ \axiom{prob} by checking various attributes of the functions and
- ++ calculating a measure of compatibility of each routine to these
- ++ attributes.
- ++
- ++ It calls each \axiom{domain} of \axiom{category}
- ++ \axiomType{NumericalOptimizationCategory} in turn to calculate all
- ++ measures and returns the best i.e. the name of the most
- ++ appropriate domain and any other relevant information.
-
- measure:(NumericalOptimizationProblem,RT) -> Measure
- ++ measure(prob,R) is a top level ANNA function for identifying the most
- ++ appropriate numerical routine from those in the routines table
- ++ provided for solving the numerical optimization problem defined by
- ++ \axiom{prob} by checking various attributes of the functions and
- ++ calculating a measure of compatibility of each routine to these
- ++ attributes.
- ++
- ++ It calls each \axiom{domain} listed in \axiom{R} of \axiom{category}
- ++ \axiomType{NumericalOptimizationCategory} in turn to calculate all
- ++ measures and returns the best i.e. the name of the most
- ++ appropriate domain and any other relevant information.
-
- optimize:(NumericalOptimizationProblem,RT) -> Result
- ++ optimize(prob,routines) is a top level ANNA function to
- ++ minimize a function or a set of functions with any constraints
- ++ as defined within \axiom{prob}.
- ++
- ++ It iterates over the \axiom{domains} listed in \axiom{routines} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
-
- optimize:NumericalOptimizationProblem -> Result
- ++ optimize(prob) is a top level ANNA function to
- ++ minimize a function or a set of functions with any constraints
- ++ as defined within \axiom{prob}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
-
- goodnessOfFit:NumericalOptimizationProblem -> Result
- ++ goodnessOfFit(prob) is a top level ANNA function to
- ++ check to goodness of fit of a least squares model
- ++ as defined within \axiom{prob}.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
- ++ It then calls the numerical routine \axiomType{E04YCF} to get estimates
- ++ of the variance-covariance matrix of the regression coefficients of
- ++ the least-squares problem.
- ++
- ++ It thus returns both the results of the optimization and the
- ++ variance-covariance calculation.
-
- optimize:(EF,LF,LOCF,LEF,LOCF) -> Result
- ++ optimize(f,start,lower,cons,upper) is a top level ANNA function to
- ++ minimize a function, \axiom{f}, of one or more variables with the
- ++ given constraints.
- ++
- ++ These constraints may be simple constraints on the variables
- ++ in which case \axiom{cons} would be an empty list and the bounds on
- ++ those variables defined in \axiom{lower} and \axiom{upper}, or a
- ++ mixture of simple, linear and non-linear constraints, where
- ++ \axiom{cons} contains the linear and non-linear constraints and
- ++ the bounds on these are added to \axiom{upper} and \axiom{lower}.
- ++
- ++ The parameter \axiom{start} is a list of the initial guesses of the
- ++ values of the variables.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
-
- optimize:(EF,LF,LOCF,LOCF) -> Result
- ++ optimize(f,start,lower,upper) is a top level ANNA function to
- ++ minimize a function, \axiom{f}, of one or more variables with
- ++ simple constraints. The bounds on
- ++ the variables are defined in \axiom{lower} and \axiom{upper}.
- ++
- ++ The parameter \axiom{start} is a list of the initial guesses of the
- ++ values of the variables.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
-
- optimize:(EF,LF) -> Result
- ++ optimize(f,start) is a top level ANNA function to
- ++ minimize a function, \axiom{f}, of one or more variables without
- ++ constraints.
- ++
- ++ The parameter \axiom{start} is a list of the initial guesses of the
- ++ values of the variables.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
-
- optimize:(LEF,LF) -> Result
- ++ optimize(lf,start) is a top level ANNA function to
- ++ minimize a set of functions, \axiom{lf}, of one or more variables
- ++ without constraints i.e. a least-squares problem.
- ++
- ++ The parameter \axiom{start} is a list of the initial guesses of the
- ++ values of the variables.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
-
- goodnessOfFit:(LEF,LF) -> Result
- ++ goodnessOfFit(lf,start) is a top level ANNA function to
- ++ check to goodness of fit of a least squares model i.e. the minimization
- ++ of a set of functions, \axiom{lf}, of one or more variables without
- ++ constraints.
- ++
- ++ The parameter \axiom{start} is a list of the initial guesses of the
- ++ values of the variables.
- ++
- ++ It iterates over the \axiom{domains} of
- ++ \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
- ++ It then calls the numerical routine \axiomType{E04YCF} to get estimates
- ++ of the variance-covariance matrix of the regression coefficients of
- ++ the least-squares problem.
- ++
- ++ It thus returns both the results of the optimization and the
- ++ variance-covariance calculation.
-
- ++ goodnessOfFit(lf,start) is a top level function to iterate over
- ++ the \axiom{domains} of \axiomType{NumericalOptimizationCategory}
- ++ to get the name and other relevant information of the best
- ++ \axiom{measure} and then optimize the function on that \axiom{domain}.
- ++ It then checks the goodness of fit of the least squares model.
-
- == add
-
- preAnalysis:RT -> RT
- zeroMeasure:Measure -> Result
- optimizeSpecific:(UNOALSA,String) -> Result
- measureSpecific:(String,RT,UNOALSA) -> Measure2
- changeName:(Result,String) -> Result
- recoverAfterFail:(UNOALSA,RT,Measure,INT,Result) -> Record(a:Result,b:Measure)
- constant:UNOALSA -> Union(DF, "failed")
- optimizeConstant:DF -> Result
-
- import ExpertSystemToolsPackage,e04AgentsPackage,NumericalOptimizationProblem
-
- constant(args:UNOALSA):Union(DF,"failed") ==
- args case noa =>
- Args := args.noa
- f := Args.fn
- retractIfCan(f)@Union(DoubleFloat,"failed")
- "failed"
-
- optimizeConstant(c:DF): Result ==
- a := coerce(c)$AnyFunctions1(DF)
- text := coerce("Constant Function")$AnyFunctions1(String)
- construct([[objf@Symbol,a],[method@Symbol,text]])$Result
-
- preAnalysis(args:UNOALSA,t:RT):RT ==
- r := selectOptimizationRoutines(t)$RT
- args case lsa =>
- selectSumOfSquaresRoutines(r)$RT
- r
-
- zeroMeasure(m:Measure):Result ==
- a := coerce(0$F)$AnyFunctions1(F)
- text := coerce("Zero Measure")$AnyFunctions1(String)
- r := construct([[objf@Symbol,a],[method@Symbol,text]])$Result
- concat(measure2Result m,r)
-
- measureSpecific(name:String,R:RT,args:UNOALSA): Measure2 ==
- args case noa =>
- arg:NOA := args.noa
- name = "e04dgfAnnaType" => measure(R,arg)$e04dgfAnnaType
- name = "e04fdfAnnaType" => measure(R,arg)$e04fdfAnnaType
- name = "e04gcfAnnaType" => measure(R,arg)$e04gcfAnnaType
- name = "e04jafAnnaType" => measure(R,arg)$e04jafAnnaType
- name = "e04mbfAnnaType" => measure(R,arg)$e04mbfAnnaType
- name = "e04nafAnnaType" => measure(R,arg)$e04nafAnnaType
- name = "e04ucfAnnaType" => measure(R,arg)$e04ucfAnnaType
- error("measureSpecific","invalid type name: " name)$ErrorFunctions
- args case lsa =>
- arg2:LSA := args.lsa
- name = "e04fdfAnnaType" => measure(R,arg2)$e04fdfAnnaType
- name = "e04gcfAnnaType" => measure(R,arg2)$e04gcfAnnaType
- error("measureSpecific","invalid type name: " name)$ErrorFunctions
- error("measureSpecific","invalid argument type")$ErrorFunctions
-
- measure(Args:NumericalOptimizationProblem,R:RT):Measure ==
- args:UNOALSA := retract(Args)$NumericalOptimizationProblem
- sofar := 0$F
- best := "none" :: String
- routs := copy R
- routs := preAnalysis(args,routs)
- empty?(routs)$RT =>
- error("measure", "no routines found")$ErrorFunctions
- rout := inspect(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- meth := empty()$(List String)
- for i in 1..# routs repeat
- rout := extract!(routs)$RT
- e := retract(rout.entry)$AnyFunctions1(Entry)
- n := e.domainName
- if e.defaultMin > sofar then
- m := measureSpecific(n,R,args)
- if m.measure > sofar then
- sofar := m.measure
- best := n
- str := [concat(concat([string(rout.key)$Symbol,"measure: ",
- outputMeasure(m.measure)," - "],
- m.explanations)$(List String))$String]
- else
- str := [concat([string(rout.key)$Symbol
- ," is no better than other routines"])$String]
- meth := append(meth,str)$(List String)
- [sofar,best,meth]
-
- measure(args:NumericalOptimizationProblem):Measure == measure(args,routines()$RT)
-
- optimizeSpecific(args:UNOALSA,name:String):Result ==
- args case noa =>
- arg:NOA := args.noa
- name = "e04dgfAnnaType" => numericalOptimization(arg)$e04dgfAnnaType
- name = "e04fdfAnnaType" => numericalOptimization(arg)$e04fdfAnnaType
- name = "e04gcfAnnaType" => numericalOptimization(arg)$e04gcfAnnaType
- name = "e04jafAnnaType" => numericalOptimization(arg)$e04jafAnnaType
- name = "e04mbfAnnaType" => numericalOptimization(arg)$e04mbfAnnaType
- name = "e04nafAnnaType" => numericalOptimization(arg)$e04nafAnnaType
- name = "e04ucfAnnaType" => numericalOptimization(arg)$e04ucfAnnaType
- error("optimizeSpecific","invalid type name: " name)$ErrorFunctions
- args case lsa =>
- arg2:LSA := args.lsa
- name = "e04fdfAnnaType" => numericalOptimization(arg2)$e04fdfAnnaType
- name = "e04gcfAnnaType" => numericalOptimization(arg2)$e04gcfAnnaType
- error("optimizeSpecific","invalid type name: " name)$ErrorFunctions
- error("optimizeSpecific","invalid type name: " name)$ErrorFunctions
-
- changeName(ans:Result,name:String):Result ==
- st:String := concat([name,"Answer"])$String
- sy:Symbol := coerce(st)$Symbol
- anyAns:Any := coerce(ans)$AnyFunctions1(Result)
- construct([[sy,anyAns]])$Result
-
- recoverAfterFail(args:UNOALSA,routs:RT,m:Measure,
- iint:INT,r:Result):Record(a:Result,b:Measure) ==
- while positive?(iint) repeat
- routineName := m.name
- s := recoverAfterFail(routs,routineName(1..6),iint)$RT
- s case "failed" => iint := 0
- (s = "no action")@Boolean => iint := 0
- fl := coerce(s)$AnyFunctions1(String)
- flrec:Record(key:Symbol,entry:Any):=[failure@Symbol,fl]
- m2 := measure(args::NumericalOptimizationProblem,routs)
- zero?(m2.measure) => iint := 0
- r2:Result := optimizeSpecific(args,m2.name)
- m := m2
- insert!(flrec,r2)$Result
- r := concat(r2,changeName(r,routineName))
- iany := search(ifail@Symbol,r2)$Result
- iany case "failed" => iint := 0
- iint := retract(iany)$AnyFunctions1(INT)
- [r,m]
-
- optimize(Args:NumericalOptimizationProblem,t:RT):Result ==
- args:UNOALSA := retract(Args)$NumericalOptimizationProblem
- routs := copy(t)$RT
- c:Union(DF,"failed") := constant(args)
- c case DF => optimizeConstant(c)
- m := measure(Args,routs)
- zero?(m.measure) => zeroMeasure m
- r := optimizeSpecific(args,n := m.name)
- iany := search(ifail@Symbol,r)$Result
- iint := 0$INT
- if (iany case Any) then
- iint := retract(iany)$AnyFunctions1(INT)
- if positive?(iint) then
- tu:Record(a:Result,b:Measure) := recoverAfterFail(args,routs,m,iint,r)
- r := tu.a
- m := tu.b
- r := concat(measure2Result m,r)
- expl := getExplanations(routs,n(1..6))$RoutinesTable
- expla := coerce(expl)$AnyFunctions1(LST)
- explaa:Record(key:Symbol,entry:Any) := ["explanations"::Symbol,expla]
- r := concat(construct([explaa]),r)
- att:List String := optAttributes(args)
- atta := coerce(att)$AnyFunctions1(List String)
- attr:Record(key:Symbol,entry:Any) := [attributes@Symbol,atta]
- insert!(attr,r)$Result
-
- optimize(args:NumericalOptimizationProblem):Result == optimize(args,routines()$RT)
-
- goodnessOfFit(Args:NumericalOptimizationProblem):Result ==
- r := optimize(Args)
- args1:UNOALSA := retract(Args)$NumericalOptimizationProblem
- args1 case noa => error("goodnessOfFit","Not an appropriate problem")$ErrorFunctions
- args:LSA := args1.lsa
- lf := args.lfn
- n:INT := #(variables(args))
- m:INT := # lf
- me := search(method,r)$Result
- me case "failed" => r
- meth := retract(me)$AnyFunctions1(Result)
- na := search(nameOfRoutine,meth)$Result
- na case "failed" => r
- name := retract(na)$AnyFunctions1(String)
- temp:INT := (n*(n-1)) quo 2
- ns:INT :=
- name = "e04fdfAnnaType" => 6*n+(2+n)*m+1+max(1,temp)
- 8*n+(n+2)*m+temp+1+max(1,temp)
- nv:INT := ns+n
- ww := search(w,r)$Result
- ww case "failed" => r
- ws:MDF := retract(ww)$AnyFunctions1(MDF)
- fr := search(objf,r)$Result
- fr case "failed" => r
- f := retract(fr)$AnyFunctions1(DF)
- s := subMatrix(ws,1,1,ns,nv-1)$MDF
- v := subMatrix(ws,1,1,nv,nv+n*n-1)$MDF
- r2 := e04ycf(0,m,n,f,s,n,v,-1)$NagOptimisationPackage
- concat(r,r2)
-
- optimize(f:EF,start:LF,lower:LOCF,cons:LEF,upper:LOCF):Result ==
- args:NOA := [ef2edf(f),[f2df i for i in start],[ocf2ocdf j for j in lower],
- [ef2edf k for k in cons], [ocf2ocdf l for l in upper]]
- optimize(args::NumericalOptimizationProblem)
-
- optimize(f:EF,start:LF,lower:LOCF,upper:LOCF):Result ==
- optimize(f,start,lower,empty()$LEF,upper)
-
- optimize(f:EF,start:LF):Result ==
- optimize(f,start,empty()$LOCF,empty()$LOCF)
-
- optimize(lf:LEF,start:LF):Result ==
- args:LSA := [[ef2edf i for i in lf],[f2df j for j in start]]
- optimize(args::NumericalOptimizationProblem)
-
- goodnessOfFit(lf:LEF,start:LF):Result ==
- args:LSA := [[ef2edf i for i in lf],[f2df j for j in start]]
- goodnessOfFit(args::NumericalOptimizationProblem)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package OPTPACK AnnaNumericalOptimizationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/e04agents.spad.pamphlet b/src/algebra/e04agents.spad.pamphlet
deleted file mode 100644
index 238fba19..00000000
--- a/src/algebra/e04agents.spad.pamphlet
+++ /dev/null
@@ -1,311 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e04agents.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package E04AGNT e04AgentsPackage}
-<<package E04AGNT e04AgentsPackage>>=
-)abbrev package E04AGNT e04AgentsPackage
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: June 1996
-++ Basic Operations: simple? linear?, quadratic?, nonLinear?
-++ Description:
-++ \axiomType{e04AgentsPackage} is a package of numerical agents to be used
-++ to investigate attributes of an input function so as to decide the
-++ \axiomFun{measure} of an appropriate numerical optimization routine.
-MDF ==> Matrix DoubleFloat
-VEDF ==> Vector Expression DoubleFloat
-EDF ==> Expression DoubleFloat
-EFI ==> Expression Fraction Integer
-PFI ==> Polynomial Fraction Integer
-FI ==> Fraction Integer
-F ==> Float
-DF ==> DoubleFloat
-OCDF ==> OrderedCompletion DoubleFloat
-LOCDF ==> List OrderedCompletion DoubleFloat
-LEDF ==> List Expression DoubleFloat
-PDF ==> Polynomial DoubleFloat
-LDF ==> List DoubleFloat
-INT ==> Integer
-NNI ==> NonNegativeInteger
-LS ==> List Symbol
-EF2 ==> ExpressionFunctions2
-NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-LSA ==> Record(lfn:LEDF, init:LDF)
-
-e04AgentsPackage(): E == I where
- E ==> with
- finiteBound:(LOCDF,DF) -> LDF
- ++ finiteBound(l,b) repaces all instances of an infinite entry in
- ++ \axiom{l} by a finite entry \axiom{b} or \axiom{-b}.
- sortConstraints:NOA -> NOA
- ++ sortConstraints(args) uses a simple bubblesort on the list of
- ++ constraints using the degree of the expression on which to sort.
- ++ Of course, it must match the bounds to the constraints.
- sumOfSquares:EDF -> Union(EDF,"failed")
- ++ sumOfSquares(f) returns either an expression for which the square is
- ++ the original function of "failed".
- splitLinear:EDF -> EDF
- ++ splitLinear(f) splits the linear part from an expression which it
- ++ returns.
- simpleBounds?:LEDF -> Boolean
- ++ simpleBounds?(l) returns true if the list of expressions l are
- ++ simple.
- linear?:LEDF -> Boolean
- ++ linear?(l) returns true if all the bounds l are either linear or
- ++ simple.
- linear?:EDF -> Boolean
- ++ linear?(e) tests if \axiom{e} is a linear function.
- linearMatrix:(LEDF, NNI) -> MDF
- ++ linearMatrix(l,n) returns a matrix of coefficients of the linear
- ++ functions in \axiom{l}. If l is empty, the matrix has at least one
- ++ row.
- linearPart:LEDF -> LEDF
- ++ linearPart(l) returns the list of linear functions of \axiom{l}.
- nonLinearPart:LEDF -> LEDF
- ++ nonLinearPart(l) returns the list of non-linear functions of \axiom{l}.
- quadratic?:EDF -> Boolean
- ++ quadratic?(e) tests if \axiom{e} is a quadratic function.
- variables:LSA -> LS
- ++ variables(args) returns the list of variables in \axiom{args.lfn}
- varList:(EDF,NNI) -> LS
- ++ varList(e,n) returns a list of \axiom{n} indexed variables with name
- ++ as in \axiom{e}.
- changeNameToObjf:(Symbol,Result) -> Result
- ++ changeNameToObjf(s,r) changes the name of item \axiom{s} in \axiom{r}
- ++ to objf.
- expenseOfEvaluation:LSA -> F
- ++ expenseOfEvaluation(o) returns the intensity value of the
- ++ cost of evaluating the input set of functions. This is in terms
- ++ of the number of ``operational units''. It returns a value
- ++ in the range [0,1].
- optAttributes:Union(noa:NOA,lsa:LSA) -> List String
- ++ optAttributes(o) is a function for supplying a list of attributes
- ++ of an optimization problem.
-
- I ==> add
-
- import ExpertSystemToolsPackage, ExpertSystemContinuityPackage
-
- sumOfSquares2:EFI -> Union(EFI,"failed")
- nonLinear?:EDF -> Boolean
- finiteBound2:(OCDF,DF) -> DF
- functionType:EDF -> String
-
- finiteBound2(a:OCDF,b:DF):DF ==
- not finite?(a) =>
- positive?(a) => b
- -b
- retract(a)@DF
-
- finiteBound(l:LOCDF,b:DF):LDF == [finiteBound2(i,b) for i in l]
-
- sortConstraints(args:NOA):NOA ==
- Args := copy args
- c:LEDF := Args.cf
- l:LOCDF := Args.lb
- u:LOCDF := Args.ub
- m:INT := (# c) - 1
- n:INT := (# l) - m
- for j in m..1 by -1 repeat
- for i in 1..j repeat
- s:EDF := c.i
- t:EDF := c.(i+1)
- if linear?(t) and (nonLinear?(s) or quadratic?(s)) then
- swap!(c,i,i+1)$LEDF
- swap!(l,n+i-1,n+i)$LOCDF
- swap!(u,n+i-1,n+i)$LOCDF
- Args
-
- changeNameToObjf(s:Symbol,r:Result):Result ==
- a := remove!(s,r)$Result
- a case Any =>
- insert!([objf@Symbol,a],r)$Result
- r
- r
-
- sum(a:EDF,b:EDF):EDF == a+b
-
- variables(args:LSA): LS == variables(reduce(sum,(args.lfn)))
-
- sumOfSquares(f:EDF):Union(EDF,"failed") ==
- e := edf2efi(f)
- s:Union(EFI,"failed") := sumOfSquares2(e)
- s case EFI =>
- map(fi2df,s)$EF2(FI,DF)
- "failed"
-
- sumOfSquares2(f:EFI):Union(EFI,"failed") ==
- p := retractIfCan(f)@Union(PFI,"failed")
- p case PFI =>
- r := squareFreePart(p)$PFI
- (p=r)@Boolean => "failed"
- tp := totalDegree(p)$PFI
- tr := totalDegree(r)$PFI
- t := tp quo tr
- found := false
- q := r
- for i in 2..t by 2 repeat
- s := q**2
- (s=p)@Boolean =>
- found := true
- leave
- q := r**i
- if found then
- q :: EFI
- else
- "failed"
- "failed"
-
- splitLinear(f:EDF):EDF ==
- out := 0$EDF
- (l := isPlus(f)$EDF) case LEDF =>
- for i in l repeat
- if not quadratic? i then
- out := out + i
- out
- out
-
- edf2pdf(f:EDF):PDF == (retract(f)@PDF)$EDF
-
- varList(e:EDF,n:NNI):LS ==
- s := name(first(variables(edf2pdf(e))$PDF)$LS)$Symbol
- [subscript(s,[t::OutputForm]) for t in expand([1..n])$Segment(Integer)]
-
- functionType(f:EDF):String ==
- n := #(variables(f))$EDF
- p := (retractIfCan(f)@Union(PDF,"failed"))$EDF
- p case PDF =>
- d := totalDegree(p)$PDF
- one?(n*d) => "simple"
- one?(d) => "linear"
- (d=2)@Boolean => "quadratic"
- "non-linear"
- "non-linear"
-
- simpleBounds?(l: LEDF):Boolean ==
- a := true
- for e in l repeat
- not (functionType(e) = "simple")@Boolean =>
- a := false
- leave
- a
-
- simple?(e:EDF):Boolean == (functionType(e) = "simple")@Boolean
-
- linear?(e:EDF):Boolean == (functionType(e) = "linear")@Boolean
-
- quadratic?(e:EDF):Boolean == (functionType(e) = "quadratic")@Boolean
-
- nonLinear?(e:EDF):Boolean == (functionType(e) = "non-linear")@Boolean
-
- linear?(l: LEDF):Boolean ==
- a := true
- for e in l repeat
- s := functionType(e)
- (s = "quadratic")@Boolean or (s = "non-linear")@Boolean =>
- a := false
- leave
- a
-
- simplePart(l:LEDF):LEDF == [i for i in l | simple?(i)]
-
- linearPart(l:LEDF):LEDF == [i for i in l | linear?(i)]
-
- nonLinearPart(l:LEDF):LEDF ==
- [i for i in l | not linear?(i) and not simple?(i)]
-
- linearMatrix(l:LEDF, n:NNI):MDF ==
- empty?(l) => mat([],n)
- L := linearPart l
- M := zero(max(1,# L)$NNI,n)$MDF
- vars := varList(first(l)$LEDF,n)
- row:INT := 1
- for a in L repeat
- for j in monomials(edf2pdf(a))$PDF repeat
- col:INT := 1
- for c in vars repeat
- if ((first(variables(j)$PDF)$LS)=c)@Boolean then
- M(row,col):= first(coefficients(j)$PDF)$LDF
- col := col+1
- row := row + 1
- M
-
- expenseOfEvaluation(o:LSA):F ==
- expenseOfEvaluation(vector(copy o.lfn)$VEDF)
-
- optAttributes(o:Union(noa:NOA,lsa:LSA)):List String ==
- o case noa =>
- n := o.noa
- s1:String := "The object function is " functionType(n.fn)
- if empty?(n.lb) then
- s2:String := "There are no bounds on the variables"
- else
- s2:String := "There are simple bounds on the variables"
- c := n.cf
- if empty?(c) then
- s3:String := "There are no constraint functions"
- else
- t := #(c)
- lin := #(linearPart(c))
- nonlin := #(nonLinearPart(c))
- s3:String := "There are " string(lin)$String " linear and "_
- string(nonlin)$String " non-linear constraints"
- [s1,s2,s3]
- l := o.lsa
- s:String := "non-linear"
- if linear?(l.lfn) then
- s := "linear"
- ["The object functions are " s]
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package E04AGNT e04AgentsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/e04routine.spad.pamphlet b/src/algebra/e04routine.spad.pamphlet
deleted file mode 100644
index 59fc81c3..00000000
--- a/src/algebra/e04routine.spad.pamphlet
+++ /dev/null
@@ -1,687 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e04routine.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain E04DGFA e04dgfAnnaType}
-<<domain E04DGFA e04dgfAnnaType>>=
-)abbrev domain E04DGFA e04dgfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04dgfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04DGF, a general optimization routine which
-++ can handle some singularities in the input function. The function
-++ \axiomFun{measure} measures the usefulness of the routine E04DGF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-
-e04dgfAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep, NagOptimisationPackage, ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:NOA) ==
- string:String := "e04dgf is "
- positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
- string := concat(string,"unsuitable for constrained problems. ")
- [0.0,string]
- string := concat(string,"recommended")
- [getMeasure(R,e04dgf@Symbol)$RoutinesTable, string]
-
- numericalOptimization(args:NOA) ==
- argsFn:EDF := args.fn
- n:NNI := #(variables(argsFn)$EDF)
- fu:DF := float(4373903597,-24,10)$DF
- it:INT := max(50,5*n)
- lin:DF := float(9,-1,10)$DF
- ma:DF := float(1,20,10)$DF
- op:DF := float(326,-14,10)$DF
- x:MDF := mat(args.init,n)
- ArgsFn:Expression Float := edf2ef(argsFn)
- f:Union(fn:FileName,fp:Asp49(OBJFUN)) := [retract(ArgsFn)$Asp49(OBJFUN)]
- e04dgf(n,1$DF,fu,it,lin,true,ma,op,1,1,n,0,x,-1,f)
-
-@
-\section{domain E04FDFA e04fdfAnnaType}
-<<domain E04FDFA e04fdfAnnaType>>=
-)abbrev domain E04FDFA e04fdfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04fdfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04FDF, a general optimization routine which
-++ can handle some singularities in the input function. The function
-++ \axiomFun{measure} measures the usefulness of the routine E04FDF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04fdfAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep, NagOptimisationPackage
- import e04AgentsPackage,ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:NOA) ==
- argsFn := args.fn
- string:String := "e04fdf is "
- positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
- string := concat(string,"unsuitable for constrained problems. ")
- [0.0,string]
- n:NNI := #(variables(argsFn)$EDF)
- (n>1)@Boolean =>
- string := concat(string,"unsuitable for single instances of multivariate problems. ")
- [0.0,string]
- sumOfSquares(argsFn) case "failed" =>
- string := concat(string,"unsuitable.")
- [0.0,string]
- string := concat(string,"recommended since the function is a sum of squares.")
- [getMeasure(R,e04fdf@Symbol)$RoutinesTable, string]
-
- measure(R:RoutinesTable,args:LSA) ==
- string:String := "e04fdf is recommended"
- [getMeasure(R,e04fdf@Symbol)$RoutinesTable, string]
-
- numericalOptimization(args:NOA) ==
- argsFn := args.fn
- lw:INT := 14
- x := mat(args.init,1)
- (a := sumOfSquares(argsFn)) case EDF =>
- ArgsFn := vector([edf2ef(a)])$VEF
- f : Union(fn:FileName,fp:Asp50(LSFUN1)) := [retract(ArgsFn)$Asp50(LSFUN1)]
- out:Result := e04fdf(1,1,1,lw,x,-1,f)
- changeNameToObjf(fsumsq@Symbol,out)
- empty()$Result
-
- numericalOptimization(args:LSA) ==
- argsFn := copy args.lfn
- m:INT := #(argsFn)
- n:NNI := #(variables(args))
- nn:INT := n
- lw:INT :=
- one?(nn) => 9+5*m
- nn*(7+n+2*m+((nn-1) quo 2)$INT)+3*m
- x := mat(args.init,n)
- ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
- f : Union(fn:FileName,fp:Asp50(LSFUN1)) := [retract(ArgsFn)$Asp50(LSFUN1)]
- out:Result := e04fdf(m,n,1,lw,x,-1,f)
- changeNameToObjf(fsumsq@Symbol,out)
-
-@
-\section{domain E04GCFA e04gcfAnnaType}
-<<domain E04GCFA e04gcfAnnaType>>=
-)abbrev domain E04GCFA e04gcfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04gcfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04GCF, a general optimization routine which
-++ can handle some singularities in the input function. The function
-++ \axiomFun{measure} measures the usefulness of the routine E04GCF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04gcfAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep, NagOptimisationPackage,ExpertSystemContinuityPackage
- import e04AgentsPackage,ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:NOA) ==
- argsFn:EDF := args.fn
- string:String := "e04gcf is "
- positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
- string := concat(string,"unsuitable for constrained problems. ")
- [0.0,string]
- n:NNI := #(variables(argsFn)$EDF)
- (n>1)@Boolean =>
- string := concat(string,"unsuitable for single instances of multivariate problems. ")
- [0.0,string]
- a := coerce(float(10,0,10))$OCDF
- seg:SOCDF := -a..a
- sings := singularitiesOf(argsFn,variables(argsFn)$EDF,seg)
- s := #(sdf2lst(sings))
- positive? s =>
- string := concat(string,"not recommended for discontinuous functions.")
- [0.0,string]
- sumOfSquares(args.fn) case "failed" =>
- string := concat(string,"unsuitable.")
- [0.0,string]
- string := concat(string,"recommended since the function is a sum of squares.")
- [getMeasure(R,e04gcf@Symbol)$RoutinesTable, string]
-
- measure(R:RoutinesTable,args:LSA) ==
- string:String := "e04gcf is "
- a := coerce(float(10,0,10))$OCDF
- seg:SOCDF := -a..a
- sings := concat([singularitiesOf(i,variables(args),seg) for i in args.lfn])$SDF
- s := #(sdf2lst(sings))
- positive? s =>
- string := concat(string,"not recommended for discontinuous functions.")
- [0.0,string]
- string := concat(string,"recommended.")
- m := getMeasure(R,e04gcf@Symbol)$RoutinesTable
- m := m-(1-exp(-(expenseOfEvaluation(args))**3))
- [m, string]
-
- numericalOptimization(args:NOA) ==
- argsFn:EDF := args.fn
- lw:INT := 16
- x := mat(args.init,1)
- (a := sumOfSquares(argsFn)) case EDF =>
- ArgsFn := vector([edf2ef(a)$ExpertSystemToolsPackage])$VEF
- f : Union(fn:FileName,fp:Asp19(LSFUN2)) := [retract(ArgsFn)$Asp19(LSFUN2)]
- out:Result := e04gcf(1,1,1,lw,x,-1,f)
- changeNameToObjf(fsumsq@Symbol,out)
- empty()$Result
-
- numericalOptimization(args:LSA) ==
- argsFn := copy args.lfn
- m:NNI := #(argsFn)
- n:NNI := #(variables(args))
- lw:INT :=
- one?(n) => 11+5*m
- 2*n*(4+n+m)+3*m
- x := mat(args.init,n)
- ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
- f : Union(fn:FileName,fp:Asp19(LSFUN2)) := [retract(ArgsFn)$Asp19(LSFUN2)]
- out:Result := e04gcf(m,n,1,lw,x,-1,f)
- changeNameToObjf(fsumsq@Symbol,out)
-
-@
-\section{domain E04JAFA e04jafAnnaType}
-<<domain E04JAFA e04jafAnnaType>>=
-)abbrev domain E04JAFA e04jafAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04jafAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04JAF, a general optimization routine which
-++ can handle some singularities in the input function. The function
-++ \axiomFun{measure} measures the usefulness of the routine E04JAF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04jafAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep, NagOptimisationPackage
- import e04AgentsPackage,ExpertSystemToolsPackage
-
- bound(a:LOCDF,b:LOCDF):Integer ==
- empty?(concat(a,b)) => 1
- one?(#(removeDuplicates(a))) and zero?(first(a)) => 2
- one?(#(removeDuplicates(a))) and one?(#(removeDuplicates(b))) => 3
- 0
-
- measure(R:RoutinesTable,args:NOA) ==
- string:String := "e04jaf is "
- if positive?(#(args.cf)) then
- if not simpleBounds?(args.cf) then
- string :=
- concat(string,"suitable for simple bounds only, not constraint functions.")
- (# string) < 20 =>
- if zero?(#(args.lb) + #(args.ub)) then
- string := concat(string, "usable if there are no constraints")
- [getMeasure(R,e04jaf@Symbol)$RoutinesTable*0.5,string]
- else
- string := concat(string,"recommended")
- [getMeasure(R,e04jaf@Symbol)$RoutinesTable, string]
- [0.0,string]
-
- numericalOptimization(args:NOA) ==
- argsFn:EDF := args.fn
- n:NNI := #(variables(argsFn)$EDF)
- ibound:INT := bound(args.lb,args.ub)
- m:INT := n
- lw:INT := max(13,12 * m + ((m * (m - 1)) quo 2)$INT)$INT
- bl := mat(finiteBound(args.lb,float(1,6,10)$DF),n)
- bu := mat(finiteBound(args.ub,float(1,6,10)$DF),n)
- x := mat(args.init,n)
- ArgsFn:EF := edf2ef(argsFn)
- fr:Union(fn:FileName,fp:Asp24(FUNCT1)) := [retract(ArgsFn)$Asp24(FUNCT1)]
- out:Result := e04jaf(n,ibound,n+2,lw,bl,bu,x,-1,fr)
- changeNameToObjf(f@Symbol,out)
-
-@
-\section{domain E04MBFA e04mbfAnnaType}
-<<domain E04MBFA e04mbfAnnaType>>=
-)abbrev domain E04MBFA e04mbfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04mbfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04MBF, an optimization routine for Linear functions.
-++ The function
-++ \axiomFun{measure} measures the usefulness of the routine E04MBF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04mbfAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep, NagOptimisationPackage
- import e04AgentsPackage,ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:NOA) ==
- (not linear?([args.fn])) or (not linear?(args.cf)) =>
- [0.0,"e04mbf is for a linear objective function and constraints only."]
- [getMeasure(R,e04mbf@Symbol)$RoutinesTable,"e04mbf is recommended" ]
-
- numericalOptimization(args:NOA) ==
- argsFn:EDF := args.fn
- c := args.cf
- listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
- n:NNI := #(v := removeDuplicates(concat(listVars)$LS)$LS)
- A:MDF := linearMatrix(args.cf,n)
- nclin:NNI := # linearPart(c)
- nrowa:NNI := max(1,nclin)
- bl:MDF := mat(finiteBound(args.lb,float(1,21,10)$DF),n)
- bu:MDF := mat(finiteBound(args.ub,float(1,21,10)$DF),n)
- cvec:MDF := mat(coefficients(retract(argsFn)@PDF)$PDF,n)
- x := mat(args.init,n)
- lwork:INT :=
- nclin < n => 2*nclin*(nclin+4)+2+6*n+nrowa
- 2*(n+3)*n+4*nclin+nrowa
- out:Result := e04mbf(20,1,n,nclin,n+nclin,nrowa,A,bl,bu,cvec,true,2*n,lwork,x,-1)
- changeNameToObjf(objlp@Symbol,out)
-
-@
-\section{domain E04NAFA e04nafAnnaType}
-<<domain E04NAFA e04nafAnnaType>>=
-)abbrev domain E04NAFA e04nafAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04nafAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04NAF, an optimization routine for Quadratic functions.
-++ The function
-++ \axiomFun{measure} measures the usefulness of the routine E04NAF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04nafAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep, NagOptimisationPackage
- import e04AgentsPackage,ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:NOA) ==
- string:String := "e04naf is "
- argsFn:EDF := args.fn
- if not (quadratic?(argsFn) and linear?(args.cf)) then
- string :=
- concat(string,"for a quadratic function with linear constraints only.")
- (# string) < 20 =>
- string := concat(string,"recommended")
- [getMeasure(R,e04naf@Symbol)$RoutinesTable, string]
- [0.0,string]
-
- numericalOptimization(args:NOA) ==
- argsFn:EDF := args.fn
- c := args.cf
- listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
- n:NNI := #(v := sort(removeDuplicates(concat(listVars)$LS)$LS)$LS)
- A:MDF := linearMatrix(c,n)
- nclin:NNI := # linearPart(c)
- nrowa:NNI := max(1,nclin)
- big:DF := float(1,10,10)$DF
- fea:MDF := new(1,n+nclin,float(1053,-11,10)$DF)$MDF
- bl:MDF := mat(finiteBound(args.lb,float(1,21,10)$DF),n)
- bu:MDF := mat(finiteBound(args.ub,float(1,21,10)$DF),n)
- alin:EDF := splitLinear(argsFn)
- p:PDF := retract(alin)@PDF
- pl:List PDF := [coefficient(p,i,1)$PDF for i in v]
- cvec:MDF := mat([pdf2df j for j in pl],n)
- h1:MPDF := hessian(p,v)$MVCF(S,PDF,VPDF,LS)
- hess:MDF := map(pdf2df,h1)$ESTOOLS2(PDF,DF)
- h2:MEF := map(df2ef,hess)$ESTOOLS2(DF,EF)
- x := mat(args.init,n)
- istate:MI := zero(1,n+nclin)$MI
- lwork:INT := 2*n*(n+2*nclin)+nrowa
- qphess:Union(fn:FileName,fp:Asp20(QPHESS)) := [retract(h2)$Asp20(QPHESS)]
- out:Result := e04naf(20,1,n,nclin,n+nclin,nrowa,n,n,big,A,bl,bu,cvec,fea,
- hess,true,false,true,2*n,lwork,x,istate,-1,qphess)
- changeNameToObjf(obj@Symbol,out)
-
-@
-\section{domain E04UCFA e04ucfAnnaType}
-<<domain E04UCFA e04ucfAnnaType>>=
-)abbrev domain E04UCFA e04ucfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: November 1997
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04ucfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04UCF, a general optimization routine which
-++ can handle some singularities in the input function. The function
-++ \axiomFun{measure} measures the usefulness of the routine E04UCF
-++ for the given problem. The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04ucfAnnaType(): NumericalOptimizationCategory == Result add
- DF ==> DoubleFloat
- EF ==> Expression Float
- EDF ==> Expression DoubleFloat
- PDF ==> Polynomial DoubleFloat
- VPDF ==> Vector Polynomial DoubleFloat
- LDF ==> List DoubleFloat
- LOCDF ==> List OrderedCompletion DoubleFloat
- MDF ==> Matrix DoubleFloat
- MPDF ==> Matrix Polynomial DoubleFloat
- MF ==> Matrix Float
- MEF ==> Matrix Expression Float
- LEDF ==> List Expression DoubleFloat
- VEF ==> Vector Expression Float
- NOA ==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
- LSA ==> Record(lfn:LEDF, init:LDF)
- EF2 ==> ExpressionFunctions2
- MI ==> Matrix Integer
- INT ==> Integer
- F ==> Float
- NNI ==> NonNegativeInteger
- S ==> Symbol
- LS ==> List Symbol
- MVCF ==> MultiVariableCalculusFunctions
- ESTOOLS2 ==> ExpertSystemToolsPackage2
- SDF ==> Stream DoubleFloat
- LSDF ==> List Stream DoubleFloat
- SOCDF ==> Segment OrderedCompletion DoubleFloat
- OCDF ==> OrderedCompletion DoubleFloat
-
- Rep:=Result
- import Rep,NagOptimisationPackage
- import e04AgentsPackage,ExpertSystemToolsPackage
-
- measure(R:RoutinesTable,args:NOA) ==
- zero?(#(args.lb) + #(args.ub)) =>
- [0.0,"e04ucf is not recommended if there are no bounds specified"]
- zero?(#(args.cf)) =>
- string:String := "e04ucf is usable but not always recommended if there are no constraints"
- [getMeasure(R,e04ucf@Symbol)$RoutinesTable*0.5,string]
- [getMeasure(R,e04ucf@Symbol)$RoutinesTable,"e04ucf is recommended"]
-
- numericalOptimization(args:NOA) ==
- Args := sortConstraints(args)
- argsFn := Args.fn
- c := Args.cf
- listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
- n:NNI := #(v := sort(removeDuplicates(concat(listVars)$LS)$LS)$LS)
- lin:NNI := #(linearPart(c))
- nlcf := nonLinearPart(c)
- nonlin:NNI := #(nlcf)
- if empty?(nlcf) then
- nlcf := new(n,coerce(first(v)$LS)$EDF)$LEDF
- nrowa:NNI := max(1,lin)
- nrowj:NNI := max(1,nonlin)
- A:MDF := linearMatrix(c,n)
- bl:MDF := mat(finiteBound(Args.lb,float(1,25,10)$DF),n)
- bu:MDF := mat(finiteBound(Args.ub,float(1,25,10)$DF),n)
- liwork:INT := 3*n+lin+2*nonlin
- lwork:INT :=
- zero?(lin+nonlin) => 20*n
- zero?(nonlin) => 2*n*(n+10)+11*lin
- 2*n*(n+nonlin+10)+(11+n)*lin + 21*nonlin
- cra:DF := float(1,-2,10)$DF
- fea:DF := float(1053671201,-17,10)$DF
- fun:DF := float(4373903597,-24,10)$DF
- infb:DF := float(1,15,10)$DF
- lint:DF := float(9,-1,10)$DF
- maji:INT := max(50,3*(n+lin)+10*nonlin)
- mini:INT := max(50,3*(n+lin+nonlin))
- nonf:DF := float(105,-10,10)$DF
- opt:DF := float(326,-10,10)$DF
- ste:DF := float(2,0,10)$DF
- istate:MI := zero(1,n+lin+nonlin)$MI
- cjac:MDF :=
- positive?(nonlin) => zero(nrowj,n)$MDF
- zero(nrowj,1)$MDF
- clambda:MDF := zero(1,n+lin+nonlin)$MDF
- r:MDF := zero(n,n)$MDF
- x:MDF := mat(Args.init,n)
- VectCF:VEF := vector([edf2ef e for e in nlcf])$VEF
- ArgsFn:EF := edf2ef(argsFn)
- fasp : Union(fn:FileName,fp:Asp49(OBJFUN)) := [retract(ArgsFn)$Asp49(OBJFUN)]
- casp : Union(fn:FileName,fp:Asp55(CONFUN)) := [retract(VectCF)$Asp55(CONFUN)]
- e04ucf(n,lin,nonlin,nrowa,nrowj,n,A,bl,bu,liwork,lwork,false,cra,3,fea,
- fun,true,infb,infb,fea,lint,true,maji,1,mini,0,-1,nonf,opt,ste,1,
- 1,n,n,3,istate,cjac,clambda,r,x,-1,casp,fasp)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain E04DGFA e04dgfAnnaType>>
-<<domain E04FDFA e04fdfAnnaType>>
-<<domain E04GCFA e04gcfAnnaType>>
-<<domain E04JAFA e04jafAnnaType>>
-<<domain E04MBFA e04mbfAnnaType>>
-<<domain E04NAFA e04nafAnnaType>>
-<<domain E04UCFA e04ucfAnnaType>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index 4fde0560..5108f68d 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -452,35 +452,6 @@
(|WuWenTsunTriangularSet| . WUTSET)
)
(|naglink|
- (|Asp1| . ASP1)
- (|Asp4| . ASP4)
- (|Asp6| . ASP6)
- (|Asp7| . ASP7)
- (|Asp8| . ASP8)
- (|Asp9| . ASP9)
- (|Asp10| . ASP10)
- (|Asp12| . ASP12)
- (|Asp19| . ASP19)
- (|Asp20| . ASP20)
- (|Asp24| . ASP24)
- (|Asp27| . ASP27)
- (|Asp28| . ASP28)
- (|Asp29| . ASP29)
- (|Asp30| . ASP30)
- (|Asp31| . ASP31)
- (|Asp33| . ASP33)
- (|Asp34| . ASP34)
- (|Asp35| . ASP35)
- (|Asp41| . ASP41)
- (|Asp42| . ASP42)
- (|Asp49| . ASP49)
- (|Asp50| . ASP50)
- (|Asp55| . ASP55)
- (|Asp73| . ASP73)
- (|Asp74| . ASP74)
- (|Asp77| . ASP77)
- (|Asp78| . ASP78)
- (|Asp80| . ASP80)
(|FortranCode| . FC)
(|FortranCodePackage1| . FCPAK1)
(|FortranExpression| . FEXPR)
@@ -501,27 +472,6 @@
(|MachineFloat| . MFLOAT)
(|MachineInteger| . MINT)
(|MultiVariableCalculusFunctions| . MCALCFN)
- (|NagDiscreteFourierTransformInterfacePackage| . NAGDIS)
- (|NagEigenInterfacePackage| . NAGEIG)
- (|NAGLinkSupportPackage| . NAGSP)
- (|NagOptimisationInterfacePackage| . NAGOPT)
- (|NagQuadratureInterfacePackage| . NAGQUA)
- (|NagResultChecks| . NAGRES)
- (|NagSpecialFunctionsInterfacePackage| . NAGSPE)
- (|NagPolynomialRootsPackage| . NAGC02)
- (|NagRootFindingPackage| . NAGC05)
- (|NagSeriesSummationPackage| . NAGC06)
- (|NagIntegrationPackage| . NAGD01)
- (|NagOrdinaryDifferentialEquationsPackage| . NAGD02)
- (|NagPartialDifferentialEquationsPackage| . NAGD03)
- (|NagInterpolationPackage| . NAGE01)
- (|NagFittingPackage| . NAGE02)
- (|NagOptimisationPackage| . NAGE04)
- (|NagMatrixOperationsPackage| . NAGF01)
- (|NagEigenPackage| . NAGF02)
- (|NagLinearEquationSolvingPackage| . NAGF04)
- (|NagLapack| . NAGF07)
- (|NagSpecialFunctionsPackage| . NAGS)
(|PackedHermitianSequence| . PACKED)
(|Result| . RESULT)
(|SimpleFortranProgram| . SFORT)
@@ -531,41 +481,8 @@
(|TheSymbolTable| . SYMS)
(|ThreeDimensionalMatrix| . M3D))
(|anna|
- (|AnnaNumericalIntegrationPackage| . INTPACK)
- (|AnnaNumericalOptimizationPackage| . OPTPACK)
- (|AnnaOrdinaryDifferentialEquationPackage| . ODEPACK)
- (|AnnaPartialDifferentialEquationPackage| . PDEPACK)
(|AttributeButtons| . ATTRBUT)
(|BasicFunctions| . BFUNCT)
- (|d01ajfAnnaType| . D01AJFA)
- (|d01akfAnnaType| . D01AKFA)
- (|d01alfAnnaType| . D01ALFA)
- (|d01amfAnnaType| . D01AMFA)
- (|d01anfAnnaType| . D01ANFA)
- (|d01apfAnnaType| . D01APFA)
- (|d01aqfAnnaType| . D01AQFA)
- (|d01asfAnnaType| . D01ASFA)
- (|d01fcfAnnaType| . D01FCFA)
- (|d01gbfAnnaType| . D01GBFA)
- (|d01AgentsPackage| . D01AGNT)
- (|d01TransformFunctionType| . D01TRNS)
- (|d01WeightsPackage| . D01WGTS)
- (|d02AgentsPackage| . D02AGNT)
- (|d02bbfAnnaType| . D02BBFA)
- (|d02bhfAnnaType| . D02BHFA)
- (|d02cjfAnnaType| . D02CJFA)
- (|d02ejfAnnaType| . D02EJFA)
- (|d03AgentsPackage| . D03AGNT)
- (|d03eefAnnaType| . D03EEFA)
- (|d03fafAnnaType| . D03FAFA)
- (|e04AgentsPackage| . E04AGNT)
- (|e04dgfAnnaType| . E04DGFA)
- (|e04fdfAnnaType| . E04FDFA)
- (|e04gcfAnnaType| . E04GCFA)
- (|e04jafAnnaType| . E04JAFA)
- (|e04mbfAnnaType| . E04MBFA)
- (|e04nafAnnaType| . E04NAFA)
- (|e04ucfAnnaType| . E04UCFA)
(|ExpertSystemContinuityPackage| . ESCONT)
(|ExpertSystemContinuityPackage1| . ESCONT1)
(|ExpertSystemToolsPackage| . ESTOOLS)
@@ -577,8 +494,6 @@
(|NumericalOptimizationCategory| . OPTCAT)
(|NumericalOptimizationProblem| . OPTPROB)
(|NumericalPDEProblem| . PDEPROB)
- (|ODEIntensityFunctionsTable| . ODEIFTBL)
- (|IntegrationFunctionsTable| . INTFTBL)
(|OrdinaryDifferentialEquationsSolverCategory| . ODECAT)
(|PartialDifferentialEquationsSolverCategory| . PDECAT)
(|RoutinesTable| . ROUTINE))
diff --git a/src/algebra/f01.spad.pamphlet b/src/algebra/f01.spad.pamphlet
deleted file mode 100644
index c2146298..00000000
--- a/src/algebra/f01.spad.pamphlet
+++ /dev/null
@@ -1,343 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra f01.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGF01 NagMatrixOperationsPackage}
-<<package NAGF01 NagMatrixOperationsPackage>>=
-)abbrev package NAGF01 NagMatrixOperationsPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:45:15 1994
-++Description:
-++This package uses the NAG Library to provide facilities for matrix factorizations and
-++associated transformations.
-++See \downlink{Manual Page}{manpageXXf01}.
-NagMatrixOperationsPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- f01brf : (Integer,Integer,Integer,Integer,_
- DoubleFloat,Boolean,Boolean,List Boolean,Matrix DoubleFloat,Matrix Integer,Matrix Integer,Integer) -> Result
- ++ f01brf(n,nz,licn,lirn,pivot,lblock,grow,abort,a,irn,icn,ifail)
- ++ factorizes a real sparse matrix. The routine either forms
- ++ the LU factorization of a permutation of the entire matrix, or,
- ++ optionally, first permutes the matrix to block lower triangular
- ++ form and then only factorizes the diagonal blocks.
- ++ See \downlink{Manual Page}{manpageXXf01brf}.
- f01bsf : (Integer,Integer,Integer,Matrix Integer,_
- Matrix Integer,Matrix Integer,Matrix Integer,Boolean,DoubleFloat,Boolean,Matrix Integer,Matrix DoubleFloat,Integer) -> Result
- ++ f01bsf(n,nz,licn,ivect,jvect,icn,ikeep,grow,eta,abort,idisp,avals,ifail)
- ++ factorizes a real sparse matrix using the pivotal sequence
- ++ previously obtained by F01BRF when a matrix of the same sparsity
- ++ pattern was factorized.
- ++ See \downlink{Manual Page}{manpageXXf01bsf}.
- f01maf : (Integer,Integer,Integer,Integer,_
- List Boolean,Matrix DoubleFloat,Matrix Integer,Matrix Integer,DoubleFloat,DoubleFloat,Integer) -> Result
- ++ f01maf(n,nz,licn,lirn,abort,avals,irn,icn,droptl,densw,ifail)
- ++ computes an incomplete Cholesky factorization of a real
- ++ sparse symmetric positive-definite matrix A.
- ++ See \downlink{Manual Page}{manpageXXf01maf}.
- f01mcf : (Integer,Matrix DoubleFloat,Integer,Matrix Integer,_
- Integer) -> Result
- ++ f01mcf(n,avals,lal,nrow,ifail)
- ++ computes the Cholesky factorization of a real symmetric
- ++ positive-definite variable-bandwidth matrix.
- ++ See \downlink{Manual Page}{manpageXXf01mcf}.
- f01qcf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Integer) -> Result
- ++ f01qcf(m,n,lda,a,ifail)
- ++ finds the QR factorization of the real m by n matrix A,
- ++ where m>=n.
- ++ See \downlink{Manual Page}{manpageXXf01qcf}.
- f01qdf : (String,String,Integer,Integer,_
- Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ f01qdf(trans,wheret,m,n,a,lda,zeta,ncolb,ldb,b,ifail)
- ++ performs one of the transformations
- ++ See \downlink{Manual Page}{manpageXXf01qdf}.
- f01qef : (String,Integer,Integer,Integer,_
- Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ f01qef(wheret,m,n,ncolq,lda,zeta,a,ifail)
- ++ returns the first ncolq columns of the real m by m
- ++ orthogonal matrix Q, where Q is given as the product of
- ++ Householder transformation matrices.
- ++ See \downlink{Manual Page}{manpageXXf01qef}.
- f01rcf : (Integer,Integer,Integer,Matrix Complex DoubleFloat,_
- Integer) -> Result
- ++ f01rcf(m,n,lda,a,ifail)
- ++ finds the QR factorization of the complex m by n matrix A,
- ++ where m>=n.
- ++ See \downlink{Manual Page}{manpageXXf01rcf}.
- f01rdf : (String,String,Integer,Integer,_
- Matrix Complex DoubleFloat,Integer,Matrix Complex DoubleFloat,Integer,Integer,Matrix Complex DoubleFloat,Integer) -> Result
- ++ f01rdf(trans,wheret,m,n,a,lda,theta,ncolb,ldb,b,ifail)
- ++ performs one of the transformations
- ++ See \downlink{Manual Page}{manpageXXf01rdf}.
- f01ref : (String,Integer,Integer,Integer,_
- Integer,Matrix Complex DoubleFloat,Matrix Complex DoubleFloat,Integer) -> Result
- ++ f01ref(wheret,m,n,ncolq,lda,theta,a,ifail)
- ++ returns the first ncolq columns of the complex m by m
- ++ unitary matrix Q, where Q is given as the product of Householder
- ++ transformation matrices.
- ++ See \downlink{Manual Page}{manpageXXf01ref}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Boolean)
- import AnyFunctions1(String)
- import AnyFunctions1(List Boolean)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Matrix Complex DoubleFloat)
- import AnyFunctions1(Matrix Integer)
-
-
- f01brf(nArg:Integer,nzArg:Integer,licnArg:Integer,_
- lirnArg:Integer,pivotArg:DoubleFloat,lblockArg:Boolean,_
- growArg:Boolean,abortArg:List Boolean,aArg:Matrix DoubleFloat,_
- irnArg:Matrix Integer,icnArg:Matrix Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01brf",_
- ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"pivot"::S_
- ,"lblock"::S,"grow"::S,"ifail"::S,"abort"::S,"ikeep"::S,"w"::S,"idisp"::S,"a"::S_
- ,"irn"::S,"icn"::S,"iw"::S]$Lisp,_
- ["ikeep"::S,"w"::S,"idisp"::S,"iw"::S]$Lisp,_
- [["double"::S,"pivot"::S,["w"::S,"n"::S]$Lisp_
- ,["a"::S,"licn"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"nz"::S,"licn"::S,"lirn"::S_
- ,["ikeep"::S,["*"::S,5$Lisp,"n"::S]$Lisp]$Lisp,["idisp"::S,10$Lisp]$Lisp,["irn"::S,"lirn"::S]$Lisp,["icn"::S,"licn"::S]$Lisp_
- ,"ifail"::S,["iw"::S,["*"::S,8$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["logical"::S,"lblock"::S,"grow"::S,["abort"::S,4$Lisp]$Lisp]$Lisp_
- ]$Lisp,_
- ["ikeep"::S,"w"::S,"idisp"::S,"a"::S,"irn"::S,"icn"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,pivotArg::Any,lblockArg::Any,growArg::Any,ifailArg::Any,abortArg::Any,aArg::Any,irnArg::Any,icnArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01bsf(nArg:Integer,nzArg:Integer,licnArg:Integer,_
- ivectArg:Matrix Integer,jvectArg:Matrix Integer,icnArg:Matrix Integer,_
- ikeepArg:Matrix Integer,growArg:Boolean,etaArg:DoubleFloat,_
- abortArg:Boolean,idispArg:Matrix Integer,avalsArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01bsf",_
- ["n"::S,"nz"::S,"licn"::S,"grow"::S,"eta"::S_
- ,"abort"::S,"rpmin"::S,"ifail"::S,"ivect"::S,"jvect"::S,"icn"::S,"ikeep"::S,"idisp"::S_
- ,"w"::S,"avals"::S,"iw"::S]$Lisp,_
- ["w"::S,"rpmin"::S,"iw"::S]$Lisp,_
- [["double"::S,"eta"::S,["w"::S,"n"::S]$Lisp_
- ,"rpmin"::S,["avals"::S,"licn"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"nz"::S,"licn"::S,["ivect"::S,"nz"::S]$Lisp_
- ,["jvect"::S,"nz"::S]$Lisp,["icn"::S,"licn"::S]$Lisp,["ikeep"::S,["*"::S,5$Lisp,"n"::S]$Lisp]$Lisp_
- ,["idisp"::S,2$Lisp]$Lisp,"ifail"::S,["iw"::S,["*"::S,8$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["logical"::S,"grow"::S,"abort"::S]$Lisp_
- ]$Lisp,_
- ["w"::S,"rpmin"::S,"avals"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,nzArg::Any,licnArg::Any,growArg::Any,etaArg::Any,abortArg::Any,ifailArg::Any,ivectArg::Any,jvectArg::Any,icnArg::Any,ikeepArg::Any,idispArg::Any,avalsArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01maf(nArg:Integer,nzArg:Integer,licnArg:Integer,_
- lirnArg:Integer,abortArg:List Boolean,avalsArg:Matrix DoubleFloat,_
- irnArg:Matrix Integer,icnArg:Matrix Integer,droptlArg:DoubleFloat,_
- denswArg:DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01maf",_
- ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"droptl"::S_
- ,"densw"::S,"ifail"::S,"abort"::S,"wkeep"::S,"ikeep"::S,"inform"::S,"avals"::S_
- ,"irn"::S,"icn"::S,"iwork"::S]$Lisp,_
- ["wkeep"::S,"ikeep"::S,"inform"::S,"iwork"::S]$Lisp,_
- [["double"::S,["wkeep"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp_
- ,["avals"::S,"licn"::S]$Lisp,"droptl"::S,"densw"::S]$Lisp_
- ,["integer"::S,"n"::S,"nz"::S,"licn"::S,"lirn"::S_
- ,["ikeep"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["inform"::S,4$Lisp]$Lisp,["irn"::S,"lirn"::S]$Lisp,["icn"::S,"licn"::S]$Lisp_
- ,"ifail"::S,["iwork"::S,["*"::S,6$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_
- ,["logical"::S,["abort"::S,3$Lisp]$Lisp]$Lisp_
- ]$Lisp,_
- ["wkeep"::S,"ikeep"::S,"inform"::S,"avals"::S,"irn"::S,"icn"::S,"droptl"::S,"densw"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,droptlArg::Any,denswArg::Any,ifailArg::Any,abortArg::Any,avalsArg::Any,irnArg::Any,icnArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01mcf(nArg:Integer,avalsArg:Matrix DoubleFloat,lalArg:Integer,_
- nrowArg:Matrix Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01mcf",_
- ["n"::S,"lal"::S,"ifail"::S,"avals"::S,"nrow"::S,"al"::S,"d"::S]$Lisp,_
- ["al"::S,"d"::S]$Lisp,_
- [["double"::S,["avals"::S,"lal"::S]$Lisp,["al"::S,"lal"::S]$Lisp_
- ,["d"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"lal"::S,["nrow"::S,"n"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["al"::S,"d"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,lalArg::Any,ifailArg::Any,avalsArg::Any,nrowArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01qcf(mArg:Integer,nArg:Integer,ldaArg:Integer,_
- aArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01qcf",_
- ["m"::S,"n"::S,"lda"::S,"ifail"::S,"zeta"::S,"a"::S]$Lisp,_
- ["zeta"::S]$Lisp,_
- [["double"::S,["zeta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["zeta"::S,"a"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ldaArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01qdf(transArg:String,wheretArg:String,mArg:Integer,_
- nArg:Integer,aArg:Matrix DoubleFloat,ldaArg:Integer,_
- zetaArg:Matrix DoubleFloat,ncolbArg:Integer,ldbArg:Integer,_
- bArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01qdf",_
- ["trans"::S,"wheret"::S,"m"::S,"n"::S,"lda"::S_
- ,"ncolb"::S,"ldb"::S,"ifail"::S,"a"::S,"zeta"::S,"b"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_
- ,["zeta"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["work"::S,"ncolb"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_
- ,"ldb"::S,"ifail"::S]$Lisp_
- ,["character"::S,"trans"::S,"wheret"::S]$Lisp_
- ]$Lisp,_
- ["b"::S,"ifail"::S]$Lisp,_
- [([transArg::Any,wheretArg::Any,mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,ifailArg::Any,aArg::Any,zetaArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01qef(wheretArg:String,mArg:Integer,nArg:Integer,_
- ncolqArg:Integer,ldaArg:Integer,zetaArg:Matrix DoubleFloat,_
- aArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01qef",_
- ["wheret"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_
- ,"ifail"::S,"zeta"::S,"a"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["zeta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"ncolq"::S]$Lisp_
- ,["work"::S,"ncolq"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_
- ,"ifail"::S]$Lisp_
- ,["character"::S,"wheret"::S]$Lisp_
- ]$Lisp,_
- ["a"::S,"ifail"::S]$Lisp,_
- [([wheretArg::Any,mArg::Any,nArg::Any,ncolqArg::Any,ldaArg::Any,ifailArg::Any,zetaArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01rcf(mArg:Integer,nArg:Integer,ldaArg:Integer,_
- aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01rcf",_
- ["m"::S,"n"::S,"lda"::S,"ifail"::S,"theta"::S,"a"::S]$Lisp,_
- ["theta"::S]$Lisp,_
- [["integer"::S,"m"::S,"n"::S,"lda"::S,"ifail"::S_
- ]$Lisp_
- ,["double complex"::S,["theta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["theta"::S,"a"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ldaArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01rdf(transArg:String,wheretArg:String,mArg:Integer,_
- nArg:Integer,aArg:Matrix Complex DoubleFloat,ldaArg:Integer,_
- thetaArg:Matrix Complex DoubleFloat,ncolbArg:Integer,ldbArg:Integer,_
- bArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01rdf",_
- ["trans"::S,"wheret"::S,"m"::S,"n"::S,"lda"::S_
- ,"ncolb"::S,"ldb"::S,"ifail"::S,"a"::S,"theta"::S,"b"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_
- ,"ldb"::S,"ifail"::S]$Lisp_
- ,["character"::S,"trans"::S,"wheret"::S]$Lisp_
- ,["double complex"::S,["a"::S,"lda"::S,"n"::S]$Lisp,["theta"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["work"::S,"ncolb"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["b"::S,"ifail"::S]$Lisp,_
- [([transArg::Any,wheretArg::Any,mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,ifailArg::Any,aArg::Any,thetaArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f01ref(wheretArg:String,mArg:Integer,nArg:Integer,_
- ncolqArg:Integer,ldaArg:Integer,thetaArg:Matrix Complex DoubleFloat,_
- aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f01ref",_
- ["wheret"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_
- ,"ifail"::S,"theta"::S,"a"::S,"work"::S]$Lisp,_
- ["work"::S]$Lisp,_
- [["integer"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_
- ,"ifail"::S]$Lisp_
- ,["character"::S,"wheret"::S]$Lisp_
- ,["double complex"::S,["theta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["work"::S,"ncolq"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["a"::S,"ifail"::S]$Lisp,_
- [([wheretArg::Any,mArg::Any,nArg::Any,ncolqArg::Any,ldaArg::Any,ifailArg::Any,thetaArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGF01 NagMatrixOperationsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/f02.spad.pamphlet b/src/algebra/f02.spad.pamphlet
deleted file mode 100644
index 3a9be77d..00000000
--- a/src/algebra/f02.spad.pamphlet
+++ /dev/null
@@ -1,565 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra f02.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGF02 NagEigenPackage}
-<<package NAGF02 NagEigenPackage>>=
-)abbrev package NAGF02 NagEigenPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:45:20 1994
-++Description:
-++This package uses the NAG Library to compute
-++\begin{items}
-++\item eigenvalues and eigenvectors of a matrix
-++\item eigenvalues and eigenvectors of generalized matrix
-++eigenvalue problems
-++\item singular values and singular vectors of a matrix.
-++\end{items}
-++See \downlink{Manual Page}{manpageXXf02}.
-
-NagEigenPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- f02aaf : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ f02aaf(ia,n,a,ifail)
- ++ calculates all the eigenvalue.
- ++ See \downlink{Manual Page}{manpageXXf02aaf}.
- f02abf : (Matrix DoubleFloat,Integer,Integer,Integer,_
- Integer) -> Result
- ++ f02abf(a,ia,n,iv,ifail)
- ++ calculates all the eigenvalues of a real
- ++ symmetric matrix.
- ++ See \downlink{Manual Page}{manpageXXf02abf}.
- f02adf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ f02adf(ia,ib,n,a,b,ifail)
- ++ calculates all the eigenvalues of Ax=(lambda)Bx, where A
- ++ is a real symmetric matrix and B is a real symmetric positive-
- ++ definite matrix.
- ++ See \downlink{Manual Page}{manpageXXf02adf}.
- f02aef : (Integer,Integer,Integer,Integer,_
- Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ f02aef(ia,ib,n,iv,a,b,ifail)
- ++ calculates all the eigenvalues of
- ++ Ax=(lambda)Bx, where A is a real symmetric matrix and B is a
- ++ real symmetric positive-definite matrix.
- ++ See \downlink{Manual Page}{manpageXXf02aef}.
- f02aff : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ f02aff(ia,n,a,ifail)
- ++ calculates all the eigenvalues of a real unsymmetric
- ++ matrix.
- ++ See \downlink{Manual Page}{manpageXXf02aff}.
- f02agf : (Integer,Integer,Integer,Integer,_
- Matrix DoubleFloat,Integer) -> Result
- ++ f02agf(ia,n,ivr,ivi,a,ifail)
- ++ calculates all the eigenvalues of a real
- ++ unsymmetric matrix.
- ++ See \downlink{Manual Page}{manpageXXf02agf}.
- f02ajf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ f02ajf(iar,iai,n,ar,ai,ifail)
- ++ calculates all the eigenvalue.
- ++ See \downlink{Manual Page}{manpageXXf02ajf}.
- f02akf : (Integer,Integer,Integer,Integer,_
- Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ f02akf(iar,iai,n,ivr,ivi,ar,ai,ifail)
- ++ calculates all the eigenvalues of a
- ++ complex matrix.
- ++ See \downlink{Manual Page}{manpageXXf02akf}.
- f02awf : (Integer,Integer,Integer,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ f02awf(iar,iai,n,ar,ai,ifail)
- ++ calculates all the eigenvalues of a complex Hermitian
- ++ matrix.
- ++ See \downlink{Manual Page}{manpageXXf02awf}.
- f02axf : (Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,_
- Integer,Integer,Integer,Integer) -> Result
- ++ f02axf(ar,iar,ai,iai,n,ivr,ivi,ifail)
- ++ calculates all the eigenvalues of a
- ++ complex Hermitian matrix.
- ++ See \downlink{Manual Page}{manpageXXf02axf}.
- f02bbf : (Integer,Integer,DoubleFloat,DoubleFloat,_
- Integer,Integer,Matrix DoubleFloat,Integer) -> Result
- ++ f02bbf(ia,n,alb,ub,m,iv,a,ifail)
- ++ calculates selected eigenvalues of a real
- ++ symmetric matrix by reduction to tridiagonal form, bisection and
- ++ inverse iteration, where the selected eigenvalues lie within a
- ++ given interval.
- ++ See \downlink{Manual Page}{manpageXXf02bbf}.
- f02bjf : (Integer,Integer,Integer,DoubleFloat,_
- Boolean,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ f02bjf(n,ia,ib,eps1,matv,iv,a,b,ifail)
- ++ calculates all the eigenvalues and, if required, all the
- ++ eigenvectors of the generalized eigenproblem Ax=(lambda)Bx
- ++ where A and B are real, square matrices, using the QZ algorithm.
- ++ See \downlink{Manual Page}{manpageXXf02bjf}.
- f02fjf : (Integer,Integer,DoubleFloat,Integer,_
- Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp27(DOT)),Union(fn:FileName,fp:Asp28(IMAGE))) -> Result
- ++ f02fjf(n,k,tol,novecs,nrx,lwork,lrwork,liwork,m,noits,x,ifail,dot,image)
- ++ finds eigenvalues of a real sparse symmetric
- ++ or generalized symmetric eigenvalue problem.
- ++ See \downlink{Manual Page}{manpageXXf02fjf}.
- f02fjf : (Integer,Integer,DoubleFloat,Integer,_
- Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp27(DOT)),Union(fn:FileName,fp:Asp28(IMAGE)),FileName) -> Result
- ++ f02fjf(n,k,tol,novecs,nrx,lwork,lrwork,liwork,m,noits,x,ifail,dot,image,monit)
- ++ finds eigenvalues of a real sparse symmetric
- ++ or generalized symmetric eigenvalue problem.
- ++ See \downlink{Manual Page}{manpageXXf02fjf}.
- f02wef : (Integer,Integer,Integer,Integer,_
- Integer,Boolean,Integer,Boolean,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ f02wef(m,n,lda,ncolb,ldb,wantq,ldq,wantp,ldpt,a,b,ifail)
- ++ returns all, or part, of the singular value decomposition
- ++ of a general real matrix.
- ++ See \downlink{Manual Page}{manpageXXf02wef}.
- f02xef : (Integer,Integer,Integer,Integer,_
- Integer,Boolean,Integer,Boolean,Integer,Matrix Complex DoubleFloat,Matrix Complex DoubleFloat,Integer) -> Result
- ++ f02xef(m,n,lda,ncolb,ldb,wantq,ldq,wantp,ldph,a,b,ifail)
- ++ returns all, or part, of the singular value decomposition
- ++ of a general complex matrix.
- ++ See \downlink{Manual Page}{manpageXXf02xef}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import FortranPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(Boolean)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Matrix Complex DoubleFloat)
- import AnyFunctions1(DoubleFloat)
-
-
- f02aaf(iaArg:Integer,nArg:Integer,aArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02aaf",_
- ["ia"::S,"n"::S,"ifail"::S,"r"::S,"a"::S,"e"::S]$Lisp,_
- ["r"::S,"e"::S]$Lisp,_
- [["double"::S,["r"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp_
- ,["e"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["r"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02abf(aArg:Matrix DoubleFloat,iaArg:Integer,nArg:Integer,_
- ivArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02abf",_
- ["ia"::S,"n"::S,"iv"::S,"ifail"::S,"a"::S,"r"::S,"v"::S,"e"::S]$Lisp,_
- ["r"::S,"v"::S,"e"::S]$Lisp,_
- [["double"::S,["a"::S,"ia"::S,"n"::S]$Lisp_
- ,["r"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"iv"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["r"::S,"v"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,ivArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02adf(iaArg:Integer,ibArg:Integer,nArg:Integer,_
- aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02adf",_
- ["ia"::S,"ib"::S,"n"::S,"ifail"::S,"r"::S,"a"::S,"b"::S,"de"::S]$Lisp,_
- ["r"::S,"de"::S]$Lisp,_
- [["double"::S,["r"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp_
- ,["b"::S,"ib"::S,"n"::S]$Lisp,["de"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["r"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,ibArg::Any,nArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02aef(iaArg:Integer,ibArg:Integer,nArg:Integer,_
- ivArg:Integer,aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02aef",_
- ["ia"::S,"ib"::S,"n"::S,"iv"::S,"ifail"::S_
- ,"r"::S,"v"::S,"a"::S,"b"::S,"dl"::S_
- ,"e"::S]$Lisp,_
- ["r"::S,"v"::S,"dl"::S,"e"::S]$Lisp,_
- [["double"::S,["r"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp_
- ,["a"::S,"ia"::S,"n"::S]$Lisp,["b"::S,"ib"::S,"n"::S]$Lisp,["dl"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"iv"::S_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["r"::S,"v"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,ibArg::Any,nArg::Any,ivArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02aff(iaArg:Integer,nArg:Integer,aArg:Matrix DoubleFloat,_
- ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02aff",_
- ["ia"::S,"n"::S,"ifail"::S,"rr"::S,"ri"::S,"intger"::S,"a"::S]$Lisp,_
- ["rr"::S,"ri"::S,"intger"::S]$Lisp,_
- [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_
- ,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,["intger"::S,"n"::S]$Lisp_
- ,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["rr"::S,"ri"::S,"intger"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02agf(iaArg:Integer,nArg:Integer,ivrArg:Integer,_
- iviArg:Integer,aArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02agf",_
- ["ia"::S,"n"::S,"ivr"::S,"ivi"::S,"ifail"::S_
- ,"rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S_
- ,"a"::S]$Lisp,_
- ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S]$Lisp,_
- [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_
- ,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"ivr"::S,"ivi"::S_
- ,["intger"::S,"n"::S]$Lisp,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02ajf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_
- arArg:Matrix DoubleFloat,aiArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02ajf",_
- ["iar"::S,"iai"::S,"n"::S,"ifail"::S,"rr"::S,"ri"::S,"ar"::S,"ai"::S,"intger"::S_
- ]$Lisp,_
- ["rr"::S,"ri"::S,"intger"::S]$Lisp,_
- [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_
- ,["ar"::S,"iar"::S,"n"::S]$Lisp,["ai"::S,"iai"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ifail"::S_
- ,["intger"::S,"n"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["rr"::S,"ri"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_
- [([iarArg::Any,iaiArg::Any,nArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02akf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_
- ivrArg:Integer,iviArg:Integer,arArg:Matrix DoubleFloat,_
- aiArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02akf",_
- ["iar"::S,"iai"::S,"n"::S,"ivr"::S,"ivi"::S_
- ,"ifail"::S,"rr"::S,"ri"::S,"vr"::S,"vi"::S,"ar"::S_
- ,"ai"::S,"intger"::S]$Lisp,_
- ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S]$Lisp,_
- [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_
- ,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["ar"::S,"iar"::S,"n"::S]$Lisp,["ai"::S,"iai"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ivr"::S_
- ,"ivi"::S,"ifail"::S,["intger"::S,"n"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_
- [([iarArg::Any,iaiArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02awf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_
- arArg:Matrix DoubleFloat,aiArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02awf",_
- ["iar"::S,"iai"::S,"n"::S,"ifail"::S,"r"::S,"ar"::S,"ai"::S,"wk1"::S,"wk2"::S_
- ,"wk3"::S]$Lisp,_
- ["r"::S,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_
- [["double"::S,["r"::S,"n"::S]$Lisp,["ar"::S,"iar"::S,"n"::S]$Lisp_
- ,["ai"::S,"iai"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp,["wk2"::S,"n"::S]$Lisp,["wk3"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["r"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_
- [([iarArg::Any,iaiArg::Any,nArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02axf(arArg:Matrix DoubleFloat,iarArg:Integer,aiArg:Matrix DoubleFloat,_
- iaiArg:Integer,nArg:Integer,ivrArg:Integer,_
- iviArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02axf",_
- ["iar"::S,"iai"::S,"n"::S,"ivr"::S,"ivi"::S_
- ,"ifail"::S,"ar"::S,"ai"::S,"r"::S,"vr"::S,"vi"::S_
- ,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_
- ["r"::S,"vr"::S,"vi"::S,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_
- [["double"::S,["ar"::S,"iar"::S,"n"::S]$Lisp_
- ,["ai"::S,"iai"::S,"n"::S]$Lisp,["r"::S,"n"::S]$Lisp,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp_
- ,["wk2"::S,"n"::S]$Lisp,["wk3"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ivr"::S_
- ,"ivi"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["r"::S,"vr"::S,"vi"::S,"ifail"::S]$Lisp,_
- [([iarArg::Any,iaiArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02bbf(iaArg:Integer,nArg:Integer,albArg:DoubleFloat,_
- ubArg:DoubleFloat,mArg:Integer,ivArg:Integer,_
- aArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02bbf",_
- ["ia"::S,"n"::S,"alb"::S,"ub"::S,"m"::S_
- ,"iv"::S,"mm"::S,"ifail"::S,"r"::S,"v"::S,"icount"::S,"a"::S,"d"::S_
- ,"e"::S,"e2"::S,"x"::S,"g"::S,"c"::S_
- ]$Lisp,_
- ["mm"::S,"r"::S,"v"::S,"icount"::S,"d"::S,"e"::S,"e2"::S,"x"::S,"g"::S,"c"::S]$Lisp,_
- [["double"::S,"alb"::S,"ub"::S,["r"::S,"m"::S]$Lisp_
- ,["v"::S,"iv"::S,"m"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp,["d"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp,["e2"::S,"n"::S]$Lisp_
- ,["x"::S,"n"::S,7$Lisp]$Lisp,["g"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"m"::S,"iv"::S_
- ,"mm"::S,["icount"::S,"m"::S]$Lisp,"ifail"::S]$Lisp_
- ,["logical"::S,["c"::S,"n"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["mm"::S,"r"::S,"v"::S,"icount"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,albArg::Any,ubArg::Any,mArg::Any,ivArg::Any,ifailArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02bjf(nArg:Integer,iaArg:Integer,ibArg:Integer,_
- eps1Arg:DoubleFloat,matvArg:Boolean,ivArg:Integer,_
- aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f02bjf",_
- ["n"::S,"ia"::S,"ib"::S,"eps1"::S,"matv"::S_
- ,"iv"::S,"ifail"::S,"alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S_
- ,"a"::S,"b"::S]$Lisp,_
- ["alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S]$Lisp,_
- [["double"::S,"eps1"::S,["alfr"::S,"n"::S]$Lisp_
- ,["alfi"::S,"n"::S]$Lisp,["beta"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp,["b"::S,"ib"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"n"::S,"ia"::S,"ib"::S,"iv"::S_
- ,["iter"::S,"n"::S]$Lisp,"ifail"::S]$Lisp_
- ,["logical"::S,"matv"::S]$Lisp_
- ]$Lisp,_
- ["alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,iaArg::Any,ibArg::Any,eps1Arg::Any,matvArg::Any,ivArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02fjf(nArg:Integer,kArg:Integer,tolArg:DoubleFloat,_
- novecsArg:Integer,nrxArg:Integer,lworkArg:Integer,_
- lrworkArg:Integer,liworkArg:Integer,mArg:Integer,_
- noitsArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_
- dotArg:Union(fn:FileName,fp:Asp27(DOT)),imageArg:Union(fn:FileName,fp:Asp28(IMAGE))): Result ==
- pushFortranOutputStack(dotFilename := aspFilename "dot")$FOP
- if dotArg case fn
- then outputAsFortran(dotArg.fn)
- else outputAsFortran(dotArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(imageFilename := aspFilename "image")$FOP
- if imageArg case fn
- then outputAsFortran(imageArg.fn)
- else outputAsFortran(imageArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP
- outputAsFortran()$Asp29(MONIT)
- popFortranOutputStack()$FOP
- [(invokeNagman([dotFilename,imageFilename,monitFilename]$Lisp,_
- "f02fjf",_
- ["n"::S,"k"::S,"tol"::S,"novecs"::S,"nrx"::S_
- ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S_
- ,"ifail"::S,"dot"::S,"image"::S,"monit"::S,"d"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_
- ]$Lisp,_
- ["d"::S,"work"::S,"rwork"::S,"iwork"::S,"dot"::S,"image"::S,"monit"::S]$Lisp,_
- [["double"::S,"tol"::S,["d"::S,"k"::S]$Lisp_
- ,["x"::S,"nrx"::S,"k"::S]$Lisp,["work"::S,"lwork"::S]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"dot"::S,"image"::S,"monit"::S_
- ]$Lisp_
- ,["integer"::S,"n"::S,"k"::S,"novecs"::S,"nrx"::S_
- ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["d"::S,"m"::S,"noits"::S,"x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,kArg::Any,tolArg::Any,novecsArg::Any,nrxArg::Any,lworkArg::Any,lrworkArg::Any,liworkArg::Any,mArg::Any,noitsArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02fjf(nArg:Integer,kArg:Integer,tolArg:DoubleFloat,_
- novecsArg:Integer,nrxArg:Integer,lworkArg:Integer,_
- lrworkArg:Integer,liworkArg:Integer,mArg:Integer,_
- noitsArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_
- dotArg:Union(fn:FileName,fp:Asp27(DOT)),imageArg:Union(fn:FileName,fp:Asp28(IMAGE)),monitArg:FileName): Result ==
- pushFortranOutputStack(dotFilename := aspFilename "dot")$FOP
- if dotArg case fn
- then outputAsFortran(dotArg.fn)
- else outputAsFortran(dotArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(imageFilename := aspFilename "image")$FOP
- if imageArg case fn
- then outputAsFortran(imageArg.fn)
- else outputAsFortran(imageArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP
- outputAsFortran(monitArg)
- [(invokeNagman([dotFilename,imageFilename,monitFilename]$Lisp,_
- "f02fjf",_
- ["n"::S,"k"::S,"tol"::S,"novecs"::S,"nrx"::S_
- ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S_
- ,"ifail"::S,"dot"::S,"image"::S,"monit"::S,"d"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_
- ]$Lisp,_
- ["d"::S,"work"::S,"rwork"::S,"iwork"::S,"dot"::S,"image"::S,"monit"::S]$Lisp,_
- [["double"::S,"tol"::S,["d"::S,"k"::S]$Lisp_
- ,["x"::S,"nrx"::S,"k"::S]$Lisp,["work"::S,"lwork"::S]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"dot"::S,"image"::S,"monit"::S_
- ]$Lisp_
- ,["integer"::S,"n"::S,"k"::S,"novecs"::S,"nrx"::S_
- ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["d"::S,"m"::S,"noits"::S,"x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,kArg::Any,tolArg::Any,novecsArg::Any,nrxArg::Any,lworkArg::Any,lrworkArg::Any,liworkArg::Any,mArg::Any,noitsArg::Any,ifailArg::Any,xArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02wef(mArg:Integer,nArg:Integer,ldaArg:Integer,_
- ncolbArg:Integer,ldbArg:Integer,wantqArg:Boolean,_
- ldqArg:Integer,wantpArg:Boolean,ldptArg:Integer,_
- aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- workLength : Integer :=
- mArg >= nArg =>
- wantqArg and wantpArg =>
- max(max(nArg**2 + 5*(nArg - 1),nArg + ncolbArg),4)
- wantqArg =>
- max(max(nArg**2 + 4*(nArg - 1),nArg + ncolbArg),4)
- wantpArg =>
- zero? ncolbArg => max(3*(nArg - 1),2)
- max(5*(nArg - 1),2)
- zero? ncolbArg => max(2*(nArg - 1),2)
- max(3*(nArg - 1),2)
- wantqArg and wantpArg =>
- max(mArg**2 + 5*(mArg - 1),2)
- wantqArg =>
- max(3*(mArg - 1),1)
- wantpArg =>
- zero? ncolbArg => max(mArg**2+3*(mArg - 1),2)
- max(mArg**2+5*(mArg - 1),2)
- zero? ncolbArg => max(2*(mArg - 1),1)
- max(3*(mArg - 1),1)
-
- [(invokeNagman(NIL$Lisp,_
- "f02wef",_
- ["m"::S,"n"::S,"lda"::S,"ncolb"::S,"ldb"::S_
- ,"wantq"::S,"ldq"::S,"wantp"::S,"ldpt"::S,"ifail"::S_
- ,"q"::S,"sv"::S,"pt"::S,"work"::S,"a"::S_
- ,"b"::S]$Lisp,_
- ["q"::S,"sv"::S,"pt"::S,"work"::S]$Lisp,_
- [["double"::S,["q"::S,"ldq"::S,"m"::S]$Lisp_
- ,["sv"::S,"m"::S]$Lisp,["pt"::S,"ldpt"::S,"n"::S]$Lisp,["work"::S,workLength]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_
- ,"ldb"::S,"ldq"::S,"ldpt"::S,"ifail"::S]$Lisp_
- ,["logical"::S,"wantq"::S,"wantp"::S]$Lisp_
- ]$Lisp,_
- ["q"::S,"sv"::S,"pt"::S,"work"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,wantqArg::Any,ldqArg::Any,wantpArg::Any,ldptArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f02xef(mArg:Integer,nArg:Integer,ldaArg:Integer,_
- ncolbArg:Integer,ldbArg:Integer,wantqArg:Boolean,_
- ldqArg:Integer,wantpArg:Boolean,ldphArg:Integer,_
- aArg:Matrix Complex DoubleFloat,bArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result ==
- -- This segment added by hand, to deal with an assumed size array GDN
- tem : Integer := (min(mArg,nArg)-1)
- rLen : Integer :=
- zero? ncolbArg and not wantqArg and not wantpArg => 2*tem
- zero? ncolbArg and wantpArg and not wantqArg => 3*tem
- not wantpArg =>
- positive? ncolbArg or wantqArg => 3*tem
- 5*tem
- cLen : Integer :=
- mArg >= nArg =>
- wantqArg and wantpArg => 2*(nArg + max(nArg**2,ncolbArg))
- wantqArg and not wantpArg => 2*(nArg + max(nArg**2+nArg,ncolbArg))
- 2*(nArg + max(nArg,ncolbArg))
- wantpArg => 2*(mArg**2 + mArg)
- 2*mArg
- svLength : Integer :=
- min(mArg,nArg)
- [(invokeNagman(NIL$Lisp,_
- "f02xef",_
- ["m"::S,"n"::S,"lda"::S,"ncolb"::S,"ldb"::S_
- ,"wantq"::S,"ldq"::S,"wantp"::S,"ldph"::S,"ifail"::S_
- ,"q"::S,"sv"::S,"ph"::S,"rwork"::S,"a"::S_
- ,"b"::S,"cwork"::S]$Lisp,_
- ["q"::S,"sv"::S,"ph"::S,"rwork"::S,"cwork"::S]$Lisp,_
- [["double"::S,["sv"::S,svLength]$Lisp,["rwork"::S,rLen]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_
- ,"ldb"::S,"ldq"::S,"ldph"::S,"ifail"::S]$Lisp_
- ,["logical"::S,"wantq"::S,"wantp"::S]$Lisp_
- ,["double complex"::S,["q"::S,"ldq"::S,"m"::S]$Lisp,["ph"::S,"ldph"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["cwork"::S,cLen]$Lisp]$Lisp_
- ]$Lisp,_
- ["q"::S,"sv"::S,"ph"::S,"rwork"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,wantqArg::Any,ldqArg::Any,wantpArg::Any,ldphArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGF02 NagEigenPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/f04.spad.pamphlet b/src/algebra/f04.spad.pamphlet
deleted file mode 100644
index 8220f040..00000000
--- a/src/algebra/f04.spad.pamphlet
+++ /dev/null
@@ -1,408 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra f04.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGF04 NagLinearEquationSolvingPackage}
-<<package NAGF04 NagLinearEquationSolvingPackage>>=
-)abbrev package NAGF04 NagLinearEquationSolvingPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:45:31 1994
-++Description:
-++This package uses the NAG Library to solve the matrix equation \axiom{AX=B}, where \axiom{B}
-++may be a single vector or a matrix of multiple right-hand sides.
-++The matrix \axiom{A} may be real, complex, symmetric, Hermitian positive-
-++definite, or sparse. It may also be rectangular, in which case a
-++least-squares solution is obtained.
-++See \downlink{Manual Page}{manpageXXf04}.
-NagLinearEquationSolvingPackage(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- f04adf : (Integer,Matrix Complex DoubleFloat,Integer,Integer,_
- Integer,Integer,Matrix Complex DoubleFloat,Integer) -> Result
- ++ f04adf(ia,b,ib,n,m,ic,a,ifail)
- ++ calculates the approximate solution of a set of complex
- ++ linear equations with multiple right-hand sides, using an LU
- ++ factorization with partial pivoting.
- ++ See \downlink{Manual Page}{manpageXXf04adf}.
- f04arf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_
- Integer) -> Result
- ++ f04arf(ia,b,n,a,ifail)
- ++ calculates the approximate solution of a set of real
- ++ linear equations with a single right-hand side, using an LU
- ++ factorization with partial pivoting.
- ++ See \downlink{Manual Page}{manpageXXf04arf}.
- f04asf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_
- Integer) -> Result
- ++ f04asf(ia,b,n,a,ifail)
- ++ calculates the accurate solution of a set of real
- ++ symmetric positive-definite linear equations with a single right-
- ++ hand side, Ax=b, using a Cholesky factorization and iterative
- ++ refinement.
- ++ See \downlink{Manual Page}{manpageXXf04asf}.
- f04atf : (Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,_
- Integer,Integer) -> Result
- ++ f04atf(a,ia,b,n,iaa,ifail)
- ++ calculates the accurate solution of a set of real linear
- ++ equations with a single right-hand side, using an LU
- ++ factorization with partial pivoting, and iterative refinement.
- ++ See \downlink{Manual Page}{manpageXXf04atf}.
- f04axf : (Integer,Matrix DoubleFloat,Integer,Matrix Integer,_
- Matrix Integer,Integer,Matrix Integer,Matrix DoubleFloat) -> Result
- ++ f04axf(n,a,licn,icn,ikeep,mtype,idisp,rhs)
- ++ calculates the approximate solution of a set of real
- ++ sparse linear equations with a single right-hand side, Ax=b or
- ++ T
- ++ A x=b, where A has been factorized by F01BRF or F01BSF.
- ++ See \downlink{Manual Page}{manpageXXf04axf}.
- f04faf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_
- Matrix DoubleFloat,Integer) -> Result
- ++ f04faf(job,n,d,e,b,ifail)
- ++ calculates the approximate solution of a set of real
- ++ symmetric positive-definite tridiagonal linear equations.
- ++ See \downlink{Manual Page}{manpageXXf04faf}.
- f04jgf : (Integer,Integer,Integer,DoubleFloat,_
- Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result
- ++ f04jgf(m,n,nra,tol,lwork,a,b,ifail)
- ++ finds the solution of a linear least-squares problem, Ax=b
- ++ , where A is a real m by n (m>=n) matrix and b is an m element
- ++ vector. If the matrix of observations is not of full rank, then
- ++ the minimal least-squares solution is returned.
- ++ See \downlink{Manual Page}{manpageXXf04jgf}.
- f04maf : (Integer,Integer,Matrix DoubleFloat,Integer,_
- Matrix Integer,Integer,Matrix Integer,Matrix DoubleFloat,Matrix Integer,Matrix Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix Integer,Integer) -> Result
- ++ f04maf(n,nz,avals,licn,irn,lirn,icn,wkeep,ikeep,inform,b,acc,noits,ifail)
- ++ e a sparse symmetric positive-definite system of linear
- ++ equations, Ax=b, using a pre-conditioned conjugate gradient
- ++ method, where A has been factorized by F01MAF.
- ++ See \downlink{Manual Page}{manpageXXf04maf}.
- f04mbf : (Integer,Matrix DoubleFloat,Boolean,DoubleFloat,_
- Integer,Integer,Integer,Integer,DoubleFloat,Integer,Union(fn:FileName,fp:Asp28(APROD)),Union(fn:FileName,fp:Asp34(MSOLVE))) -> Result
- ++ f04mbf(n,b,precon,shift,itnlim,msglvl,lrwork,liwork,rtol,ifail,aprod,msolve)
- ++ solves a system of real sparse symmetric linear equations
- ++ using a Lanczos algorithm.
- ++ See \downlink{Manual Page}{manpageXXf04mbf}.
- f04mcf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_
- Matrix Integer,Integer,Matrix DoubleFloat,Integer,Integer,Integer,Integer) -> Result
- ++ f04mcf(n,al,lal,d,nrow,ir,b,nrb,iselct,nrx,ifail)
- ++ computes the approximate solution of a system of real
- ++ linear equations with multiple right-hand sides, AX=B, where A
- ++ is a symmetric positive-definite variable-bandwidth matrix, which
- ++ has previously been factorized by F01MCF. Related systems may
- ++ also be solved.
- ++ See \downlink{Manual Page}{manpageXXf04mcf}.
- f04qaf : (Integer,Integer,DoubleFloat,DoubleFloat,_
- DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp30(APROD))) -> Result
- ++ f04qaf(m,n,damp,atol,btol,conlim,itnlim,msglvl,lrwork,liwork,b,ifail,aprod)
- ++ solves sparse unsymmetric equations, sparse linear least-
- ++ squares problems and sparse damped linear least-squares problems,
- ++ using a Lanczos algorithm.
- ++ See \downlink{Manual Page}{manpageXXf04qaf}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import FortranPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(DoubleFloat)
- import AnyFunctions1(Boolean)
- import AnyFunctions1(Matrix Complex DoubleFloat)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(Matrix Integer)
-
-
- f04adf(iaArg:Integer,bArg:Matrix Complex DoubleFloat,ibArg:Integer,_
- nArg:Integer,mArg:Integer,icArg:Integer,_
- aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04adf",_
- ["ia"::S,"ib"::S,"n"::S,"m"::S,"ic"::S_
- ,"ifail"::S,"b"::S,"c"::S,"a"::S,"wkspce"::S]$Lisp,_
- ["c"::S,"wkspce"::S]$Lisp,_
- [["double"::S,["wkspce"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"m"::S_
- ,"ic"::S,"ifail"::S]$Lisp_
- ,["double complex"::S,["b"::S,"ib"::S,"m"::S]$Lisp,["c"::S,"ic"::S,"m"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["c"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,ibArg::Any,nArg::Any,mArg::Any,icArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04arf(iaArg:Integer,bArg:Matrix DoubleFloat,nArg:Integer,_
- aArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04arf",_
- ["ia"::S,"n"::S,"ifail"::S,"b"::S,"c"::S,"a"::S,"wkspce"::S]$Lisp,_
- ["c"::S,"wkspce"::S]$Lisp,_
- [["double"::S,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp_
- ,["a"::S,"ia"::S,"n"::S]$Lisp,["wkspce"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["c"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04asf(iaArg:Integer,bArg:Matrix DoubleFloat,nArg:Integer,_
- aArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04asf",_
- ["ia"::S,"n"::S,"ifail"::S,"b"::S,"c"::S,"a"::S,"wk1"::S,"wk2"::S_
- ]$Lisp,_
- ["c"::S,"wk1"::S,"wk2"::S]$Lisp,_
- [["double"::S,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp_
- ,["a"::S,"ia"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp,["wk2"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["c"::S,"a"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04atf(aArg:Matrix DoubleFloat,iaArg:Integer,bArg:Matrix DoubleFloat,_
- nArg:Integer,iaaArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04atf",_
- ["ia"::S,"n"::S,"iaa"::S,"ifail"::S,"a"::S,"b"::S,"c"::S,"aa"::S,"wks1"::S_
- ,"wks2"::S]$Lisp,_
- ["c"::S,"aa"::S,"wks1"::S,"wks2"::S]$Lisp,_
- [["double"::S,["a"::S,"ia"::S,"n"::S]$Lisp_
- ,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp,["aa"::S,"iaa"::S,"n"::S]$Lisp,["wks1"::S,"n"::S]$Lisp,["wks2"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"ia"::S,"n"::S,"iaa"::S,"ifail"::S_
- ]$Lisp_
- ]$Lisp,_
- ["c"::S,"aa"::S,"ifail"::S]$Lisp,_
- [([iaArg::Any,nArg::Any,iaaArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04axf(nArg:Integer,aArg:Matrix DoubleFloat,licnArg:Integer,_
- icnArg:Matrix Integer,ikeepArg:Matrix Integer,mtypeArg:Integer,_
- idispArg:Matrix Integer,rhsArg:Matrix DoubleFloat): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04axf",_
- ["n"::S,"licn"::S,"mtype"::S,"resid"::S,"a"::S,"icn"::S,"ikeep"::S,"idisp"::S,"rhs"::S_
- ,"w"::S]$Lisp,_
- ["resid"::S,"w"::S]$Lisp,_
- [["double"::S,["a"::S,"licn"::S]$Lisp,"resid"::S_
- ,["rhs"::S,"n"::S]$Lisp,["w"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"licn"::S,["icn"::S,"licn"::S]$Lisp_
- ,["ikeep"::S,["*"::S,"n"::S,5$Lisp]$Lisp]$Lisp,"mtype"::S,["idisp"::S,2$Lisp]$Lisp]$Lisp_
- ]$Lisp,_
- ["resid"::S,"rhs"::S]$Lisp,_
- [([nArg::Any,licnArg::Any,mtypeArg::Any,aArg::Any,icnArg::Any,ikeepArg::Any,idispArg::Any,rhsArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04faf(jobArg:Integer,nArg:Integer,dArg:Matrix DoubleFloat,_
- eArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04faf",_
- ["job"::S,"n"::S,"ifail"::S,"d"::S,"e"::S,"b"::S]$Lisp,_
- []$Lisp,_
- [["double"::S,["d"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp_
- ,["b"::S,"n"::S]$Lisp]$Lisp_
- ,["integer"::S,"job"::S,"n"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["d"::S,"e"::S,"b"::S,"ifail"::S]$Lisp,_
- [([jobArg::Any,nArg::Any,ifailArg::Any,dArg::Any,eArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04jgf(mArg:Integer,nArg:Integer,nraArg:Integer,_
- tolArg:DoubleFloat,lworkArg:Integer,aArg:Matrix DoubleFloat,_
- bArg:Matrix DoubleFloat,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04jgf",_
- ["m"::S,"n"::S,"nra"::S,"tol"::S,"lwork"::S_
- ,"svd"::S,"sigma"::S,"irank"::S,"ifail"::S,"work"::S,"a"::S,"b"::S]$Lisp,_
- ["svd"::S,"sigma"::S,"irank"::S,"work"::S]$Lisp,_
- [["double"::S,"tol"::S,"sigma"::S,["work"::S,"lwork"::S]$Lisp_
- ,["a"::S,"nra"::S,"n"::S]$Lisp,["b"::S,"m"::S]$Lisp]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"nra"::S,"lwork"::S_
- ,"irank"::S,"ifail"::S]$Lisp_
- ,["logical"::S,"svd"::S]$Lisp_
- ]$Lisp,_
- ["svd"::S,"sigma"::S,"irank"::S,"work"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,nraArg::Any,tolArg::Any,lworkArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04maf(nArg:Integer,nzArg:Integer,avalsArg:Matrix DoubleFloat,_
- licnArg:Integer,irnArg:Matrix Integer,lirnArg:Integer,_
- icnArg:Matrix Integer,wkeepArg:Matrix DoubleFloat,ikeepArg:Matrix Integer,_
- informArg:Matrix Integer,bArg:Matrix DoubleFloat,accArg:Matrix DoubleFloat,_
- noitsArg:Matrix Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04maf",_
- ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"ifail"::S_
- ,"avals"::S,"irn"::S,"icn"::S,"wkeep"::S,"ikeep"::S_
- ,"inform"::S,"work"::S,"b"::S,"acc"::S,"noits"::S_
- ]$Lisp,_
- ["work"::S]$Lisp,_
- [["double"::S,["avals"::S,"licn"::S]$Lisp,["wkeep"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp_
- ,["work"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp,["b"::S,"n"::S]$Lisp,["acc"::S,2$Lisp]$Lisp_
- ]$Lisp_
- ,["integer"::S,"n"::S,"nz"::S,"licn"::S,["irn"::S,"lirn"::S]$Lisp_
- ,"lirn"::S,["icn"::S,"licn"::S]$Lisp,["ikeep"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["inform"::S,4$Lisp]$Lisp_
- ,["noits"::S,2$Lisp]$Lisp,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["work"::S,"b"::S,"acc"::S,"noits"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,ifailArg::Any,avalsArg::Any,irnArg::Any,icnArg::Any,wkeepArg::Any,ikeepArg::Any,informArg::Any,bArg::Any,accArg::Any,noitsArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04mbf(nArg:Integer,bArg:Matrix DoubleFloat,preconArg:Boolean,_
- shiftArg:DoubleFloat,itnlimArg:Integer,msglvlArg:Integer,_
- lrworkArg:Integer,liworkArg:Integer,rtolArg:DoubleFloat,_
- ifailArg:Integer,aprodArg:Union(fn:FileName,fp:Asp28(APROD)),msolveArg:Union(fn:FileName,fp:Asp34(MSOLVE))): Result ==
--- if both asps are AXIOM generated we do not need lrwork liwork
--- and will set to 1.
--- else believe the user but check that they are >0.
- if (aprodArg case fp) and (msolveArg case fp)
- then
- lrworkArg:=1
- liworkArg:=1
- else
- lrworkArg:=max(1,lrworkArg)
- liworkArg:=max(1,liworkArg)
- pushFortranOutputStack(aprodFilename := aspFilename "aprod")$FOP
- if aprodArg case fn
- then outputAsFortran(aprodArg.fn)
- else outputAsFortran(aprodArg.fp)
- popFortranOutputStack()$FOP
- pushFortranOutputStack(msolveFilename := aspFilename "msolve")$FOP
- if msolveArg case fn
- then outputAsFortran(msolveArg.fn)
- else outputAsFortran(msolveArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([aprodFilename,msolveFilename]$Lisp,_
- "f04mbf",_
- ["n"::S,"precon"::S,"shift"::S,"itnlim"::S,"msglvl"::S_
- ,"lrwork"::S,"liwork"::S,"itn"::S,"anorm"::S,"acond"::S_
- ,"rnorm"::S,"xnorm"::S,"inform"::S,"rtol"::S,"ifail"::S_
- ,"aprod"::S,"msolve"::S,"b"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_
- ]$Lisp,_
- ["x"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"inform"::S,"work"::S,"rwork"::S,"iwork"::S,"aprod"::S,"msolve"::S]$Lisp,_
- [["double"::S,["b"::S,"n"::S]$Lisp,"shift"::S_
- ,["x"::S,"n"::S]$Lisp,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"rtol"::S,["work"::S,"n"::S,5$Lisp]$Lisp,["rwork"::S,"lrwork"::S]$Lisp_
- ,"aprod"::S,"msolve"::S]$Lisp_
- ,["integer"::S,"n"::S,"itnlim"::S,"msglvl"::S_
- ,"lrwork"::S,"liwork"::S,"itn"::S,"inform"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_
- ,["logical"::S,"precon"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"inform"::S,"rtol"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,preconArg::Any,shiftArg::Any,itnlimArg::Any,msglvlArg::Any,lrworkArg::Any,liworkArg::Any,rtolArg::Any,ifailArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04mcf(nArg:Integer,alArg:Matrix DoubleFloat,lalArg:Integer,_
- dArg:Matrix DoubleFloat,nrowArg:Matrix Integer,irArg:Integer,_
- bArg:Matrix DoubleFloat,nrbArg:Integer,iselctArg:Integer,_
- nrxArg:Integer,ifailArg:Integer): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f04mcf",_
- ["n"::S,"lal"::S,"ir"::S,"nrb"::S,"iselct"::S_
- ,"nrx"::S,"ifail"::S,"al"::S,"d"::S,"nrow"::S,"b"::S,"x"::S_
- ]$Lisp,_
- ["x"::S]$Lisp,_
- [["double"::S,["al"::S,"lal"::S]$Lisp,["d"::S,"n"::S]$Lisp_
- ,["b"::S,"nrb"::S,"ir"::S]$Lisp,["x"::S,"nrx"::S,"ir"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"lal"::S,["nrow"::S,"n"::S]$Lisp_
- ,"ir"::S,"nrb"::S,"iselct"::S,"nrx"::S,"ifail"::S]$Lisp_
- ]$Lisp,_
- ["x"::S,"ifail"::S]$Lisp,_
- [([nArg::Any,lalArg::Any,irArg::Any,nrbArg::Any,iselctArg::Any,nrxArg::Any,ifailArg::Any,alArg::Any,dArg::Any,nrowArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f04qaf(mArg:Integer,nArg:Integer,dampArg:DoubleFloat,_
- atolArg:DoubleFloat,btolArg:DoubleFloat,conlimArg:DoubleFloat,_
- itnlimArg:Integer,msglvlArg:Integer,lrworkArg:Integer,_
- liworkArg:Integer,bArg:Matrix DoubleFloat,ifailArg:Integer,_
- aprodArg:Union(fn:FileName,fp:Asp30(APROD))): Result ==
- pushFortranOutputStack(aprodFilename := aspFilename "aprod")$FOP
- if aprodArg case fn
- then outputAsFortran(aprodArg.fn)
- else outputAsFortran(aprodArg.fp)
- popFortranOutputStack()$FOP
- [(invokeNagman([aprodFilename]$Lisp,_
- "f04qaf",_
- ["m"::S,"n"::S,"damp"::S,"atol"::S,"btol"::S_
- ,"conlim"::S,"itnlim"::S,"msglvl"::S,"lrwork"::S,"liwork"::S_
- ,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S_
- ,"xnorm"::S,"inform"::S,"ifail"::S,"aprod"::S,"x"::S,"se"::S,"b"::S,"work"::S,"rwork"::S_
- ,"iwork"::S]$Lisp,_
- ["x"::S,"se"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,"inform"::S,"work"::S,"rwork"::S,"iwork"::S,"aprod"::S]$Lisp,_
- [["double"::S,"damp"::S,"atol"::S,"btol"::S_
- ,"conlim"::S,["x"::S,"n"::S]$Lisp,["se"::S,"n"::S]$Lisp,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,["b"::S,"m"::S]$Lisp_
- ,["work"::S,"n"::S,2$Lisp]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"aprod"::S]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"itnlim"::S,"msglvl"::S_
- ,"lrwork"::S,"liwork"::S,"itn"::S,"inform"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_
- ]$Lisp,_
- ["x"::S,"se"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,"inform"::S,"b"::S,"ifail"::S]$Lisp,_
- [([mArg::Any,nArg::Any,dampArg::Any,atolArg::Any,btolArg::Any,conlimArg::Any,itnlimArg::Any,msglvlArg::Any,lrworkArg::Any,liworkArg::Any,ifailArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGF04 NagLinearEquationSolvingPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/f07.spad.pamphlet b/src/algebra/f07.spad.pamphlet
deleted file mode 100644
index b8f03e94..00000000
--- a/src/algebra/f07.spad.pamphlet
+++ /dev/null
@@ -1,182 +0,0 @@
-\documentclass{article}
-\usepackage{open-axiom}
-\begin{document}
-\title{\$SPAD/src/algebra f07.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGF07 NagLapack}
-<<package NAGF07 NagLapack>>=
-)abbrev package NAGF07 NagLapack
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:45:42 1994
-++Description:
-++This package uses the NAG Library to compute matrix
-++factorizations, and to solve systems of linear equations
-++following the matrix factorizations.
-++See \downlink{Manual Page}{manpageXXf07}.
-NagLapack(): Exports == Implementation where
- S ==> Symbol
- FOP ==> FortranOutputStackPackage
-
- Exports ==> with
- f07adf : (Integer,Integer,Integer,Matrix DoubleFloat) -> Result
- ++ f07adf(m,n,lda,a)
- ++ (DGETRF) computes the LU factorization of a real m by n
- ++ matrix.
- ++ See \downlink{Manual Page}{manpageXXf07adf}.
- f07aef : (String,Integer,Integer,Matrix DoubleFloat,_
- Integer,Matrix Integer,Integer,Matrix DoubleFloat) -> Result
- ++ f07aef(trans,n,nrhs,a,lda,ipiv,ldb,b)
- ++ (DGETRS) solves a real system of linear equations with
- ++ T
- ++ multiple right-hand sides, AX=B or A X=B, where A has been
- ++ factorized by F07ADF (DGETRF).
- ++ See \downlink{Manual Page}{manpageXXf07aef}.
- f07fdf : (String,Integer,Integer,Matrix DoubleFloat) -> Result
- ++ f07fdf(uplo,n,lda,a)
- ++ (DPOTRF) computes the Cholesky factorization of a real
- ++ symmetric positive-definite matrix.
- ++ See \downlink{Manual Page}{manpageXXf07fdf}.
- f07fef : (String,Integer,Integer,Matrix DoubleFloat,_
- Integer,Integer,Matrix DoubleFloat) -> Result
- ++ f07fef(uplo,n,nrhs,a,lda,ldb,b)
- ++ (DPOTRS) solves a real symmetric positive-definite system
- ++ of linear equations with multiple right-hand sides, AX=B, where A
- ++ has been factorized by F07FDF (DPOTRF).
- ++ See \downlink{Manual Page}{manpageXXf07fef}.
- Implementation ==> add
-
- import Lisp
- import DoubleFloat
- import Any
- import Record
- import Integer
- import Matrix DoubleFloat
- import Boolean
- import NAGLinkSupportPackage
- import AnyFunctions1(Integer)
- import AnyFunctions1(Matrix DoubleFloat)
- import AnyFunctions1(String)
- import AnyFunctions1(Matrix Integer)
-
-
- f07adf(mArg:Integer,nArg:Integer,ldaArg:Integer,_
- aArg:Matrix DoubleFloat): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f07adf",_
- ["m"::S,"n"::S,"lda"::S,"info"::S,"ipiv"::S,"a"::S]$Lisp,_
- ["ipiv"::S,"info"::S]$Lisp,_
- [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"m"::S,"n"::S,"lda"::S,["ipiv"::S,"m"::S]$Lisp_
- ,"info"::S]$Lisp_
- ]$Lisp,_
- ["ipiv"::S,"info"::S,"a"::S]$Lisp,_
- [([mArg::Any,nArg::Any,ldaArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f07aef(transArg:String,nArg:Integer,nrhsArg:Integer,_
- aArg:Matrix DoubleFloat,ldaArg:Integer,ipivArg:Matrix Integer,_
- ldbArg:Integer,bArg:Matrix DoubleFloat): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f07aef",_
- ["trans"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_
- ,"info"::S,"a"::S,"ipiv"::S,"b"::S]$Lisp,_
- ["info"::S]$Lisp,_
- [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_
- ,["b"::S,"ldb"::S,"nrhs"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"nrhs"::S,"lda"::S,["ipiv"::S,"n"::S]$Lisp_
- ,"ldb"::S,"info"::S]$Lisp_
- ,["character"::S,"trans"::S]$Lisp_
- ]$Lisp,_
- ["info"::S,"b"::S]$Lisp,_
- [([transArg::Any,nArg::Any,nrhsArg::Any,ldaArg::Any,ldbArg::Any,aArg::Any,ipivArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f07fdf(uploArg:String,nArg:Integer,ldaArg:Integer,_
- aArg:Matrix DoubleFloat): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f07fdf",_
- ["uplo"::S,"n"::S,"lda"::S,"info"::S,"a"::S]$Lisp,_
- ["info"::S]$Lisp,_
- [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_
- ]$Lisp_
- ,["integer"::S,"n"::S,"lda"::S,"info"::S]$Lisp_
- ,["character"::S,"uplo"::S]$Lisp_
- ]$Lisp,_
- ["info"::S,"a"::S]$Lisp,_
- [([uploArg::Any,nArg::Any,ldaArg::Any,aArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
- f07fef(uploArg:String,nArg:Integer,nrhsArg:Integer,_
- aArg:Matrix DoubleFloat,ldaArg:Integer,ldbArg:Integer,_
- bArg:Matrix DoubleFloat): Result ==
- [(invokeNagman(NIL$Lisp,_
- "f07fef",_
- ["uplo"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_
- ,"info"::S,"a"::S,"b"::S]$Lisp,_
- ["info"::S]$Lisp,_
- [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_
- ,["b"::S,"ldb"::S,"nrhs"::S]$Lisp]$Lisp_
- ,["integer"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_
- ,"info"::S]$Lisp_
- ,["character"::S,"uplo"::S]$Lisp_
- ]$Lisp,_
- ["info"::S,"b"::S]$Lisp,_
- [([uploArg::Any,nArg::Any,nrhsArg::Any,ldaArg::Any,ldbArg::Any,aArg::Any,bArg::Any ])_
- @List Any]$Lisp)$Lisp)_
- pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
--- - Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
---
--- - Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in
--- the documentation and/or other materials provided with the
--- distribution.
---
--- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--- names of its contributors may be used to endorse or promote products
--- derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGF07 NagLapack>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}