home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / maths / rlab / docs / RLAB-R~1 < prev    next >
Encoding:
Text File  |  1996-11-02  |  24.0 KB  |  615 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE> Rlab2 Reference Manual: Introduction</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <IMG SRC="prev.gif" ALT="Previous">
  7. <A HREF="rlab-ref-2.html"><IMG SRC="next.gif" ALT="Next"></A>
  8. <A HREF="rlab-ref.html#toc1"><IMG SRC="toc.gif" ALT="Contents"></A>
  9. <HR>
  10. <H2><A NAME="s1">1. Introduction</A></H2>
  11.  
  12.  
  13. <P>Rlab stands for ``our'' lab. It is available to almost everyone who
  14. needs a computational tool for scientific and engineering
  15. applications, because it is freely available, and it runs on many
  16. platforms.</P>
  17. <P>For many years scientists and engineers have developed and
  18. implemented programs in low-level programming languages such as
  19. Algol, Fortran, Pascal, and C. As computers get faster, and more
  20. people program them, high level languages have become more
  21. popular. Most high level languages are tailored towards a
  22. particular task, or class of tasks, this is not a shortcoming, but
  23. a direct consequence of the high level nature of a language. If a
  24. language is supposed to be easy, convenient, for a particular set
  25. of tasks, some assumptions about those tasks must be made. There is
  26. a cost associated with the assumptions made with any high level
  27. language. In the realm of scientific languages the price is usually
  28. slower program execution time. However, as tasks become more
  29. complex, and computers get faster, the penalty for slower execution
  30. time is less. Often the slower execution time is more than
  31. compensated for by the significantly reduced development time.</P>
  32. <P>Rlab, a high level language for engineers and scientists makes
  33. several assumptions:</P>
  34. <P>
  35. <UL>
  36. <LI> The user is interested in computational exercises. Rlab
  37. offers little if any convenience for those who need help with
  38. symbolic programming.
  39.    </LI>
  40. <LI> The operations, and conventions of linear algebra are useful
  41. in accomplishing most tasks. Rlab offers simple access to the
  42. most popular linear algebra libraries, BLAS, and
  43. LAPACK. Furthermore, Rlab's basic data structures are matrix
  44. oriented, with the vector dot-product an integral part of
  45. the built-in operations.
  46.  
  47. Due to the array oriented operations, and the high-level
  48. interface to FFTPACK, and a discrete IIR filtering function,
  49. Rlab servers well as an environment for signal analysis and
  50. exploration. 
  51. </LI>
  52. <LI> The language should be simple, yet predictable, with its
  53. origins in popular scientific languages that most
  54. engineers/scientists are likely to already be familiar
  55. with. Thus, Rlab takes after the C and Fortran programming
  56. languages, and to some extent Matlab, a popular (commercial)
  57. high level matrix language.
  58. </LI>
  59. </UL>
  60. </P>
  61. <P>I hope you find it useful ...</P>
  62.  
  63.  
  64. <H2><A NAME="ss1.1">1.1 Background</A></H2>
  65.  
  66.  
  67. <P>I started working with high level languages when I realized I was
  68. spending far too much time writing Fortran and C language programs
  69. as a part of engineering analyses, test data reduction, and
  70. continuing education. I searched for a better engineering
  71. programming tool; except for Matlab, and some Matlab-like programs
  72. (all commercial), I came up empty-handed (this was in 1989).  I did
  73. not feel Matlab's language design was powerful enough, but I would
  74. have used it had it been lower in cost and available on more
  75. platforms. I diverted my ``off-hour'' studies to interpreter
  76. construction, and started prototyping Rlab.  Within a year, I
  77. released version 0.10 to the Internet for comment. Now, almost five
  78. years later, Rlab has undergone significant changes and improvements
  79. primarily due to excellent assistance from users around the world.</P>
  80. <P>Rlab does not try to be a Matlab clone. Instead, it borrows what I
  81. believe are the best features of the Matlab language and provides
  82. improved language syntax and semantics. The syntax has been improved
  83. to allow users more expression and reduce ambiguities. The variable
  84. scoping rules have been improved to facilitate creation of larger
  85. programs and program libraries. A heterogeneous associative array
  86. has been added to allow users to create and operate on arbitrary
  87. data structures.</P>
  88. <P>This manual is intended to provide everything someone would need to
  89. know to use Rlab. Sometimes this document may be terse, and
  90. sometimes verbose. Instead of providing formal definitions of the
  91. syntax and semantics of the language the program will be described
  92. via discussion and examples. While this is likely to take more space
  93. than a precise description of the language, it will be more useful
  94. to most users. With that in mind, some might ask ``why not call it
  95. the Rlab User's Manual''? Well, there probably should be two
  96. manuals, but I am only one person and do not have the time or the
  97. patience for both.</P>
  98.  
  99.  
  100.  
  101. <H2><A NAME="ss1.2">1.2 Installation</A></H2>
  102.  
  103.  
  104.  
  105. <H3>Overview</H3>
  106.  
  107.  
  108. <P>Rlab has been ported to <EM>many</EM> platforms, so it should not be
  109. too difficult to get it to compile on your particular computer.  At
  110. one time or another Rlab has been ported to the following platforms:</P>
  111. <P>
  112. <OL>
  113. <LI> SCO Unix</LI>
  114. <LI> UnixWare</LI>
  115. <LI> Linux, both a.out and ELF</LI>
  116. <LI> SunOS-4.1.x</LI>
  117. <LI> Solaris 2.x</LI>
  118. <LI> SGI Irix</LI>
  119. <LI> HP-UX 9.0x</LI>
  120. <LI> AIX 3.2.x</LI>
  121. <LI> DEC Ultrix 4.x</LI>
  122. <LI> Digital Unix (OSF v2.x on an Alpha)</LI>
  123. <LI> Acorn RISC-OS</LI>
  124. <LI> DOS (DJGPP)</LI>
  125. <LI> OS/2 </LI>
  126. <LI> Mac-OS</LI>
  127. </OL>
  128. </P>
  129. <P>Although Rlab(2) is not currently ported to all the mentioned
  130. platforms, the code is still fairly portable. The basic code is
  131. ANSI-C, so any platform with an ANSI-C compiler and library should
  132. be able to run the most basic part of Rlab; the interpreter,
  133. numerical functions, and data visualization. Although the author
  134. prefers Plplot, Gnuplot is probably the more portable of the two
  135. graphics packages.</P>
  136.  
  137.  
  138. <H3>Quick Install</H3>
  139.  
  140.  
  141. <P>This section will present the most basic of Rlab installations, as
  142. briefly as possible. The assumptions are that everything will be
  143. installed in <CODE>/usr/local</CODE>, you will use Gnuplot for graphics,
  144. and your platform has an ANSI-C compiler.</P>
  145. <P>
  146. <OL>
  147. <LI> Download the necessary files:
  148.  
  149. <OL>
  150. <LI> The Rlab source code: 
  151. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rlab2.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rlab2.tgz</A>
  152. </LI>
  153. <LI> The BLAS source code:
  154. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rblas.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rblas.tgz</A>
  155. </LI>
  156. <LI> The LAPACK source code:
  157. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rlap.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rlap.tgz</A>
  158. </LI>
  159. <LI> The FFTPACK source code:
  160. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rfft.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rfft.tgz</A>
  161. </LI>
  162. <LI> The RANLIB source code:
  163. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rnlib.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rnlib.tgz</A>
  164. </LI>
  165. </OL>
  166.  
  167.  
  168. <P>You can also get these files (with similar names) at:</P>
  169. <P>
  170. <A HREF="ftp://mirriwinni.cse.rmit.edu.au/pub/rlab">ftp://mirriwinni.cse.rmit.edu.au/pub/rlab</A></P>
  171. <P>You might also choose to install a pre-compiled (or binary)
  172. version of Rlab. This is usually the fastest, and simplest
  173. method. You can check the Rlab web-page at: </P>
  174. <P>
  175. <A HREF="httpp://www.eskimo.com/~ians/rlab.html">httpp://ftp.eskimo.com/~ians/rlab.html</A></P>
  176. <P>Archive sites that contain pre-compiled versions are often listed
  177. there.</P>
  178. <P>    </P>
  179.  
  180. </LI>
  181. <LI> Compile and install each library. This is pretty simple. The
  182. library sources are all C-language, and there are no special
  183. porting considerations. There is a configure script which
  184. will generate a <CODE>Makefile</CODE> for each package. The basic
  185. steps for each library are (using rblas.tgz as an example):
  186.  
  187. <OL>
  188. <LI> <CODE>gunzip rblas.tgz</CODE></LI>
  189. <LI> <CODE>tar -xvf rblas.tar</CODE></LI>
  190. <LI> <CODE>cd rblas*</CODE></LI>
  191. <LI> <CODE>./configure</CODE></LI>
  192. <LI> <CODE>make</CODE></LI>
  193. <LI> <CODE>make install</CODE></LI>
  194. </OL>
  195.  
  196.  
  197. </LI>
  198. <LI> Build Rlab, do:
  199. <OL>
  200. <LI> <CODE>gunzip rlab.tgz</CODE></LI>
  201. <LI> <CODE>tar -xvf rlab.tar</CODE></LI>
  202. <LI> <CODE>./configure --with-gnuplot</CODE></LI>
  203. <LI> <CODE>make gc</CODE></LI>
  204. <LI> <CODE>make rlab</CODE></LI>
  205. <LI> <CODE>make check</CODE></LI>
  206. <LI> <CODE>make install</CODE></LI>
  207. </OL>
  208. </LI>
  209. </OL>
  210. </P>
  211. <P>At this point you should have Rlab installed and ready to run. Of
  212. course there are many opportunities for trouble. If you do run into
  213. trouble you should try reading the Detailed Installation section, or
  214. check the <CODE>PROBLEMS</CODE> file contained in the Rlab source
  215. distribution. </P>
  216.  
  217.  
  218.  
  219. <H3>Detailed Installation</H3>
  220.  
  221.  
  222. <P>This section provides significantly more detail and discussion than
  223. the Quick Installation Section. First a note about installation and
  224. packaging philosophy. Rlab is not bundled together with the sources
  225. for every package that it uses for several reasons. The first is
  226. package size. The total package size would be well over five
  227. mega-bytes. Secondly, most of the library (BLAS, LAPACK, etc.) code
  228. does not change very frequently, rebuilding it every time you
  229. re-build Rlab would be a waste. Finally, many of the supporting
  230. packages like the BLAS, and FFTPACK might already be on your
  231. computer in some sort of "optimized" form, maybe supplied by the
  232. vendor. </P>
  233. <P>A fully functional Rlab installation can consist of many parts. So,
  234. it is good to be patient, and take the build one step at a time.
  235. Rlab is developed on a Unix platform (Linux), and these installation
  236. steps are geared towards building it on Unix-like systems.  The
  237. first step to building RLab is to decide what configuration you
  238. would like to build. Most of the options are:</P>
  239. <P>
  240. <DL>
  241.  
  242. <DT><B>Graphics</B><DD><P>Rlab can use Plplot or Gnuplot to handle the
  243. data visualization chores. Plplot is a library that Rlab can
  244. link to. Gnuplot is a stand-alone program that Rlab can use via
  245. its I/O capabilities to interactively plot/visualize data.</P>
  246.  
  247. <DT><B>Dynamic-Linking</B><DD><P>If your computer's operating system
  248. supports dynamic linking (shared objects) well, then you can
  249. use this feature within Rlab to load functions at runtime.</P>
  250.  
  251. <DT><B>SuperLU</B><DD><P>The SuperLU package is a library for direct
  252. factorization of large sparse matrices using a supernodal
  253. technique. <EM>not implemented yet</EM></P>
  254.  
  255. <DT><B>UMFPACK</B><DD><P>The UMFPACK library contains routines for
  256. performing direct factorization of large sparse matrices. The
  257. license on this package is pretty restrictive (research and
  258. educational only).</P>
  259.  
  260. <DT><B>Metis</B><DD><P>Metis is a package for partitioning and ordering
  261. graphs. This library can be used by Rlab to compute fill
  262. reducing permutation vectors for sparse matrices.</P>
  263.  
  264. <DT><B>Garbage-Collection (GC)</B><DD><P>Rlab-2 is designed to use Boehm's
  265. generational garbage collector. The code for the collector
  266. comes with Rlab, The configure/build process will try to use GC
  267. by default. If you absolutely can't get GC to build, then you
  268. can disable it.</P>
  269.  
  270. <DT><B>Using a Fortran Compiler</B><DD><P>A Fortran-77 compiler can be
  271. used for most of the supporting numerical analyses libraries
  272. (BLAS, LAPACK, FFTPACK, and RANLIB). Sometime using a Fortran
  273. compiler will produce libraries with better performance
  274. (speed). Sometimes the difference is large, and sometimes
  275. not. It really depends upon the computer architecture and the
  276. compilers. </P>
  277. <P>One of the drawbacks to using a Fortran compiler is the almost
  278. total lack of standardization of consistent conventions from
  279. vendor to vendor. This makes the task of auto-configuring for
  280. Fortran compilation too difficult. If you want to compile the
  281. libraries with a Fortran compiler there are examples and
  282. guidelines for some of the more popular platforms. If you have
  283. never attempted this before, you should consider building Rlab
  284. entirely with a C-compiler first, so that you have a working
  285. version while you get the Fortran libraries built.</P>
  286.  
  287. </DL>
  288. </P>
  289. <P>Enabling any of the above options requires that you have built and
  290. installed some sort of program or library on your system. There are
  291. other libraries and programs that you will need to build Rlab:</P>
  292. <P>
  293. <DL>
  294.  
  295. <DT><B>BLAS</B><DD><P>The Basic Linear Algebra Subroutines provide services
  296. for almost all of the other numerical subroutines. </P>
  297.  
  298. <P>
  299. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rblas.tar.gz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rblas.tar.gz</A></P>
  300.  
  301. <DT><B>LAPACK</B><DD><P>The Linear Algebra PACKage provides the majority of
  302. linear algebra functionality for Rlab.</P>
  303. <P>
  304. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rlap.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rlap.tgz</A></P>
  305.  
  306. <DT><B>FFTPACK</B><DD><P>Fast Fourier Transform PACKage provides the discrete
  307. Fourier transform and inverse transform capability.</P>
  308. <P>
  309. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rfft.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rfft.tgz</A></P>
  310.  
  311. <DT><B>RANLIB</B><DD><P>A library of Fortran routines for random number
  312. generation. This library provides all of the functionality for
  313. producing random numbers from a selection of distributions.</P>
  314. <P>
  315. <A HREF="ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rnlib.tgz">ftp://ftp.eskimo.com/u/i/ians/rlab/sources/rnlib.tgz</A></P>
  316.  
  317. </DL>
  318. </P>
  319. <P>All of the above libraries should be available from the same place
  320. you picked up the Rlab sources. Many of them are also available from
  321. Netlib (
  322. <A HREF="ftp://netlib.att.com/">ftp://netlib.att.com/</A>)</P>
  323. <P>Rlab uses GNU autoconfigure to automatically detect operating system
  324. features and installed programs. Under the luckiest of circumstances
  325. you can configure Rlab by simply typing <CODE>./configure</CODE>. Under
  326. more normal circumstances you may need to give configure some help
  327. finding libraries, etc. Some of the most commonly used configure
  328. options are:</P>
  329. <P>
  330. <DL>
  331.  
  332. <DT><B>--prefix=dir</B><DD><P><CODE>dir</CODE> is the root directory where Rlab,
  333. and its support files will be installed. Without user
  334. intervention <CODE>dir</CODE> defaults to <CODE>/usr/local/lib</CODE>.</P>
  335.  
  336. <DT><B>--with-LIBS=dir</B><DD><P><CODE>dir</CODE> is a directory where configure
  337. should look for libraries. This could be <CODE>/usr/local/lib</CODE>
  338. on many systems.</P>
  339.  
  340. <DT><B>--with-NALIBS=dir</B><DD><P><CODE>dir</CODE> is a directory where
  341. configure should look for numerical analysis
  342. libraries. Specifically, configure looks for <CODE>libClapack</CODE>,
  343. <CODE>libCblas</CODE>, <CODE>libCfftpack</CODE>, and
  344. <CODE>libCfftpack</CODE>. These libraries can be static, or shared
  345. libraries. Configure tries to compile, and link a simple
  346. program with each library. If configure can do this
  347. successfully, then it adds the library name to the list of
  348. "found" libraries.</P>
  349.  
  350. <DT><B>--with-FLIBS=dir</B><DD><P><CODE>dir</CODE> is the directory where the
  351. f2c libraries can be found. The f2c libraries are necessary to
  352. resolve undefined externals in the translated Fortran sources
  353. for the libraries. </P>
  354.  
  355. </DL>
  356. </P>
  357.  
  358.  
  359.  
  360.  
  361.  
  362. <H2><A NAME="ss1.3">1.3 Getting Started</A></H2>
  363.  
  364.  
  365. <P>This section provides a quick-start so the reader can run rlab
  366. and try the examples, and ideas presented herein. It is assumed that
  367. the user will run rlab from the command-line on some sort of
  368. Unix-like system. Although Rlab runs on DOS, OS/2, Apple, and other
  369. operating systems, only Unix systems will be covered in this
  370. manual. </P>
  371. <P>To run rlab type:</P>
  372. <P>
  373. <BLOCKQUOTE><CODE>
  374. <PRE>
  375. $ rlab
  376. Welcome to RLaB. New users type `help INTRO'
  377. RLaB version 2.0b1b Copyright (C) 1992-95 Ian Searle
  378. RLaB comes with ABSOLUTELY NO WARRANTY; for details type `help WARRANTY'
  379. This is free software, and you are welcome to redistribute it under
  380. certain conditions; type `help CONDITIONS' for details
  381. </PRE>
  382. </CODE></BLOCKQUOTE>
  383. </P>
  384. <P>The <CODE>></CODE> displayed after the startup message is the rlab
  385. prompt. At this point rlab is waiting for input. The expected input
  386. is a program. The simplest and most often used introductory program
  387. is:</P>
  388. <P>
  389. <BLOCKQUOTE><CODE>
  390. <PRE>
  391. > "Hello World"
  392. Hello World
  393. </PRE>
  394. </CODE></BLOCKQUOTE>
  395. </P>
  396. <P>Rlab echoes its input, unless it is directed not to. To silence Rlab
  397. end each statement with a <CODE>;</CODE></P>
  398. <P>Rlab provides an <EM>environment</EM>. The environment consists of a
  399. <EM>global workspace</EM> occupied by variables. <EM>Local workspaces</EM>
  400. are created on demand by functions. When executing commands/programs
  401. interactively from the command line the programs execute within the
  402. global workspace. Those familiar with Fortran or the C-language can
  403. think of the global workspace as the main program.</P>
  404. <P>Any program that can be executed interactively, can also be executed
  405. in <EM>batch mode</EM> by typing the program in a file, and executing
  406. Rlab with the filename as an argument.</P>
  407. <P>
  408. <BLOCKQUOTE><CODE>
  409. <PRE>
  410. % cat > file.r
  411. 1 + 2 * ( 3 - 4 )
  412. % rlab file.r
  413.        -1
  414. </PRE>
  415. </CODE></BLOCKQUOTE>
  416. </P>
  417. <P>To exit Rlab type: <CODE>quit</CODE> or <CODE>Ctrl-d</CODE> at the prompt.</P>
  418.  
  419.  
  420. <H3>On-Line Help</H3>
  421.  
  422.  
  423. <P>On-line help offers condensed versions of the reference pages for
  424. each function, and brief discussion of the major concepts needed to
  425. run rlab. A listing of the available help topics is obtained by
  426. typing: <CODE>help</CODE> at the prompt. If, for example, you want help
  427. with the <CODE>eig</CODE> function, you would type: <CODE>help eig</CODE>.</P>
  428. <P>The help system is simple by design. Each help topic or subject is
  429. merely a text file, which is displayed to the terminal when
  430. requested. This simplicity makes it correspondingly easy for users
  431. to add to or modify the help system. If you find something in
  432. particular that is missing, or is peculiar to your installation of
  433. rlab, you can easily add to the help by creating a file, and placing
  434. it in the rlab help directory.</P>
  435.  
  436.  
  437.  
  438. <H3>Error Messages</H3>
  439.  
  440.  
  441. <P>Two types of error messages occur when executing rlab programs: <EM>syntax</EM> errors, and <EM>run-time</EM> errors. Syntax errors are a
  442. result of the parser's inability to make sense out of the
  443. input. When a syntax error occurs, rlab will issue an error message,
  444. and identify the syntax error.</P>
  445. <P>
  446. <BLOCKQUOTE><CODE>
  447. <PRE>
  448. > (1 + 2))
  449. syntax error
  450. (1 + 2))
  451.       ^
  452. </PRE>
  453. </CODE></BLOCKQUOTE>
  454. </P>
  455. <P>In the previous example, the error message identifies the extra
  456. right parentheses as the offending character. Sometimes that syntax
  457. error does not appear to make sense, for example:</P>
  458. <P>
  459. <BLOCKQUOTE><CODE>
  460. <PRE>
  461. > ((1 + 2)
  462. syntax error
  463. ((1 + 2)
  464.        ^
  465. </PRE>
  466. </CODE></BLOCKQUOTE>
  467. </P>
  468. <P>The error message identifies the right parentheses as the
  469. error. But, most of us would think one of the left-parentheses is
  470. the error. Actually, it is the lack of a second right-parentheses
  471. that is the error. Rlab has a very precise definition of the
  472. language syntax and semantics that do not always make sense to the
  473. user.</P>
  474. <P>Run-time errors occur when a program, with legal syntax, tries to
  475. perform an illegal operation. For example:</P>
  476. <P>
  477. <BLOCKQUOTE><CODE>
  478. <PRE>
  479. > a + 2
  480. Entity types: Undefined and Matrix_Dense_Real
  481. ERROR: rlab2: addition operation not supported
  482. </PRE>
  483. </CODE></BLOCKQUOTE>
  484. </P>
  485. <P>This expression is valid, except in this context <CODE>a</CODE> is
  486. undefined. The error message tries to tell us this by saying that
  487. the addition cannot operate on <CODE>Undefined</CODE> and
  488. <CODE>Matrix_Dense_Real</CODE> types.</P>
  489. <P>With either type of error execution will halt. If you are running
  490. Rlab interactively, execution will return to the prompt. If Rlab is
  491. running batch, then the process will terminate.</P>
  492.  
  493.  
  494.  
  495.  
  496. <H2><A NAME="ss1.4">1.4 Migrating From Rlab1 to Rlab2</A></H2>
  497.  
  498.  
  499. <P>Moving from Rlab1 to Rlab2 is not very difficult. Most of the
  500. changes between the two versions are internal to facilitate
  501. simpler addition of new data-objects, and better memory
  502. management. However, there are a few noteworthy changes made. These
  503. changes make programming safer for all levels of users, and are a
  504. result of extensive user feedback.</P>
  505. <P>
  506. <OL>
  507. <LI> So that users may keep Rlab1 installed on their computer,
  508. Rlab2 is called <CODE>rlab2</CODE>, and the rfiles, help-files, etc are
  509. kept in a separate directory hierarchy. A separate path environment
  510. variable is required to make this work. <CODE>RLAB2_PATH</CODE> replaces
  511. <CODE>RLAB_SEARCH_PATH</CODE>. You should keep both variables in your
  512. environment if you have both Rlab1 and Rlab2 installed.
  513. </LI>
  514. <LI> The most significant change is with the way function
  515. arguments are handled by the interpreter. In Rlab-1 function
  516. arguments were passed by reference. In Rlab-2 function arguments
  517. are passed by value. 
  518.  
  519. One of the reasons I used pass by reference in Rlab-1 was
  520. efficiency. Many pass by value schemes copy a function's arguments
  521. prior to passing execution to the function body. If the function
  522. does not modify the arguments, then the copy was un-necessary. The
  523. internal design of Rlab-2 allows function arguments to be passed by
  524. value without un-necessary copies. If the function does not modify
  525. an argument, then the argument is <EM>not</EM> copied. Only arguments
  526. that are modified are copied.
  527.  
  528. My experience with many users is that very few actually take
  529. advantage of pass by reference, and a great many are ``safer'' if
  530. pass by value is the default.  Rlab-1 programs that don't take
  531. special advantage of pass by reference (the great majority) will
  532. work fine with Rlab-2.  
  533. </LI>
  534. <LI> Rlab2 uses a garbage collector for memory management. This
  535. means you can forget about memory-leaks! It also means performance
  536. is better.
  537. </LI>
  538. <LI> Most all of the rfiles have been re-vamped. Not because they
  539. needed it. Most (99%) of Rlab1 rfiles will run without modification
  540. in Rlab2. The only Rlab1 files that won't work correctly are the
  541. ones that rely upon function argument pass-by-reference. My
  542. experience tells me that this is very, very few rfiles.
  543.  
  544. An example of modified rfiles are show(), and who() that take
  545. advantage of subtle, but new features in Rlab2.
  546. </LI>
  547. <LI> read() and write() only work in binary now. They still
  548. offer a good degree of Matlab compatibility. readb(), and
  549. writeb() are still there, but function the same as read() and
  550. write(). ASCII read and writes can still be done with readm(),
  551. and writem(). If there is a demand for the old read()/write(),
  552. I will restore them. 
  553. </LI>
  554. <LI> Sparse real and complex matrices. These are brand new. The
  555. implementation is still not complete. The matrix assignment,
  556. partitioning, <CODE> +, -, *</CODE> operations are functional. But, there
  557. is still lots to do here before they are "seamlessly" integrated
  558. with the rest of the classes.
  559. </LI>
  560. <LI>  The help directory/files have been modified. This manual,
  561. and the online help files originate from the same SGML
  562. sources. There is also an HTML version of this manual for those who
  563. want to get at online help that way.
  564. </LI>
  565. </OL>
  566. </P>
  567.  
  568.  
  569.  
  570. <H2><A NAME="ss1.5">1.5 Document reproduction and errors</A></H2>
  571.  
  572.  
  573.  
  574. <P>The Rlab Reference Manual is freely available. Permission is granted
  575. to reproduce the document in any way providing that it is
  576. distributed for free, except for any reasonable charges for
  577. printing, distribution, staff time, etc. Direct commercial
  578. exploitation is not permitted.  Extracts may be made from this
  579. document providing an acknowledgment of the original SGML source is
  580. maintained.</P>
  581.  
  582. <P>Reports of errors and suggestions for improvement in this document
  583. in Rlab itself are welcome.  Please mail these to
  584. <CODE>rlab-list@eskimo.com</CODE>.</P>
  585.  
  586.  
  587.  
  588. <H2><A NAME="ss1.6">1.6 Acknowledgments</A></H2>
  589.  
  590.  
  591. <P>The availability of ``free'' software, such as GNU Emacs, GNU gcc,
  592. gdb, gnuplot, Plplot, and last, but certainly not least, the Netlib
  593. archives has made this project possible.  The Rlab author thanks
  594. both the authors and sponsors of the GNU, LAPACK, RANLIB, FFTPACK,
  595. and Plplot projects.</P>
  596. <P>Many individuals have contributed to Rlab in various ways. A list of
  597. contributors can be found in the source distribution file
  598. <CODE>ACKNOWLEDGMENT</CODE>. A special thanks to Phillip Musumeci who has
  599. tirelessly provided a ftp-site for many years, and co-authored the
  600. original RLaB Primer. Matthew Wette who has also provided ftp-sites
  601. so that Rlab is available in the U.S.A. Special thanks are also due
  602. to Tzong-Shuoh Yang who did the original Macintosh port, and has
  603. provided many rfiles, and to Maurizio Ferrari who has ported Rlab to
  604. the RISC-OS (Acorn) platform, and to Karl Storck for improving and
  605. maintaining the Gnuplot interface.</P>
  606.  
  607.  
  608. <HR>
  609. <IMG SRC="prev.gif" ALT="Previous">
  610. <A HREF="rlab-ref-2.html"><IMG SRC="next.gif" ALT="Next"></A>
  611. <A HREF="rlab-ref.html#toc1"><IMG SRC="toc.gif" ALT="Contents"></A>
  612. </BODY>
  613. </HTML>
  614.