axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] 20080303.01.tpd.patch (add additional hyperdoc page tr


From: daly
Subject: [Axiom-developer] 20080303.01.tpd.patch (add additional hyperdoc page translations)
Date: Tue, 4 Mar 2008 00:33:57 -0600

This patch adds additional hyperdoc page translations

=======================================================================
diff --git a/changelog b/changelog
index 7966a8b..4d6ce3b 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080303 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080302 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080301 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080229 tpd src/hyper/bookvol11 add additional hyperdoc page translations
diff --git a/src/hyper/bookvol11.pamphlet b/src/hyper/bookvol11.pamphlet
index 4871419..76c0e51 100644
--- a/src/hyper/bookvol11.pamphlet
+++ b/src/hyper/bookvol11.pamphlet
@@ -589,6 +589,7 @@ PAGES=rootpage.xhtml \
             dbopnumer.xhtml \
             dbopnumeric.xhtml \
             dbopoddq.xhtml \
+            dboponedimensionalarray.xhtml \
             dbopoperator.xhtml \
             dboporthonormalbasis.xhtml \
             dbopoutputfixed.xhtml \
@@ -9354,6 +9355,16 @@ dboplaguerrel not implemented
 <<page foot>>
 @
 
+\subsection{dboponedimensionalarray.xhtml}
+<<dboponedimensionalarray.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+dboponedimensionalarray not implemented
+<<page foot>>
+@
+
 \subsection{dbopoperator.xhtml}
 <<dbopoperator.xhtml>>=
 <<standard head>>
@@ -35087,6 +35098,8 @@ infinity; the step size is any positive integer.
  </head>
  <body>
 <<page head>>
+  <div align="center">Linear Algebra</div>
+  <hr/>
   <table>
    <tr>
     <td>
@@ -36235,20 +36248,342 @@ to display the full list of operations defined by
 \subsection{lin1darrays.xhtml}
 <<lin1darrays.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-      lin1darrays not implemented
+  <div align="center">One Dimensional Array</div>
+  <hr/>
+The <a href="db.html?OneDimensionalArray">OneDimensionalArray</a> is used
+for storing data in a one-dimensional indexed data structure. Such an array
+is a homogeneous data structure in that all the entries of the array must
+belong to the same Axiom domain. Each array has a fixed length specified
+by the user and arrays are not extensible. The indexing of 
+one-dimensional arrays is one-based. This means that the "first" element of
+an array is given the index 1. See also
+<a href="db.html?Vector">Vector</a> and
+<a href="db.html?FlexibleArray">FlexibleArray</a>. To create a 
+one-dimensional array, apply the operation
+<a href="dboponedimensionalarray.xhtml">oneDimensionalArray</a> to a list.
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="oneDimensionalArray [i^2 for i in 1..10]" />
+  <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+Another approach is to first create a, a one-dimensional array of 10 0's.
+<a href="db.html?OneDimensionalArray">OneDimensionalArray</a> has a 
+convenient abbreviation 
+<a href="db.html?OneDimensionalArray">ARRAY1</a>.
+<ul>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="makeRequest('p2');"
+    value="a:ARRAY1 INT := new(10,0)" />
+  <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+Set each ith element to i, then display the result.
+<ul>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="handleFree(['p2','p3']);"
+    value="for i in 1..10 repeat a.i:=i ; a" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+Square each element by mapping the function i+->i**2 onto each element.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="handleFree(['p1','p2','p4']);"
+    value="map!(i+->i^2,a); a" />
+  <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+Reverse the elements in place.
+<ul>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="handleFree(['p1','p2','p3','p4','p5']);"
+    value="reverse! a" />
+  <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+Swap the 4th and 5th element.
+<ul>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="handleFree(['p1','p2','p3','p4','p5','p6']);"
+    value="swap!(a,4,5); a" />
+  <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+Sort the elements in place.
+<ul>
+ <li>
+  <input type="submit" id="p7" class="subbut" 
+    onclick="handleFree(['p1','p2','p3','p4','p5','p6','p7']);"
+    value="sort! a" />
+  <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+Create a new one-dimensional array b containing the last 5 elements of a.
+<ul>
+ <li>
+  <input type="submit" id="p8" class="subbut" 
+    onclick="handleFree(['p1','p2','p3','p4','p5','p6','p7','p8']);"
+    value="b:=a(6..10)" />
+  <div id="ansp8"><div></div></div>
+ </li>
+</ul>
+Replace the first 5 elements of a with those of b.
+<ul>
+ <li>
+  <input type="submit" id="p9" class="subbut" 
+    onclick="handleFree(['p1','p2','p3','p4','p5','p6','p7','p8','p9']);"
+    value="copyInto!(a,b,1)" />
+  <div id="ansp9"><div></div></div>
+ </li>
+</ul>
 <<page foot>>
 @
 
 \subsection{lin2darrays.xhtml}
 <<lin2darrays.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-      lin2darrays not implemented
+  <div align="center">Two Dimensional Array</div>
+  <hr/>
+The <a href="db.xhtml?TwoDimensionalArray">TwoDimensionalArray</a> is used
+for storing data in a two-dimensional data structure indexed by row and by
+column. Such an array is a homogeneous data structure in that all the
+entries of the array must belog to the same Axiom domain (although see
+the <a href="axbook/section-2.6.xhtml">Any</a> domain). Each array has a
+fixed number of rows and columns specified by the user and arrays are not
+extensible. In Axiom, the indexing of two-dimensional arrays is one-based.
+This means that both the "first" row of an array and the "first" column of
+an array are given the index 1. Thus, the entry in the upper left corner
+of an array is in position (1,1).
+
+The operation <a href="dbopnew.xhtml">new</a> creates an array with a
+specified number of rows and columns and fills the components of that
+array with a specified entry. The arguments of this operation specify the
+number of rows, the number of columns, and the entry. This creates a
+five-by-four array of integers, all of which are zero.
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="arr:ARRAY2 INT:=new(5,4,0)" />
+  <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+The entries of this array can be set to other integers using the
+operation <a href="dbopsetelt.xhtml">setelt</a>.
+
+Issue this to set the element in the upper left corner of this array to 17.
+<ul>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="handleFree(['p1','p2']);"
+    value="setelt(arr,1,1,17)" />
+  <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+Now the first element of the array is 17.
+<ul>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="handleFree(['p1','p2','p3']);"
+    value="arr" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+Likewise, elements of an array are extracted using the operation
+<a href="dbopelt.xhtml">elt</a>.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="handleFree(['p1','p2','p4']);"
+    value="elt(arr,1,1)" />
+  <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+Another way to use these two operations is as follows. This sets the
+element in position (3,2) of the array to 15.
+<ul>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="handleFree(['p1','p2','p5']);"
+    value="arr(3,2):=15" />
+  <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+This extracts the element in position (,32) of the array.
+<ul>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p6']);"
+    value="arr(3,2)" />
+  <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+The operations <a href="dbopelt.xhtml">elt</a> and 
+<a href="dbopsetelt.xhtml">setelt</a> come equipped with an error check which 
+verifies that the indices are in the proper ranges. For example, the
+above array has five rows and four columns, so if you ask for the entry
+in position (6,2) with arr(6,2) Axiom displays an error message. If there
+is no need for an error check, you can call the operations
+<a href="dbopqelt.xhtml">qelt</a> and 
+<a href="dbopqseteltbang.xhtml">qsetelt!</a> which provide the same 
+functionality but without the error check. Typically, these operations
+are called in well-tested programs.
+
+The operations <a href="dboprow.xhtml">row</a> and
+<a href="dbopcolumn.xhtml">column</a> extract rows and columns, 
+respectively, and return objects of 
+<a href="db.xhtml?OneDimensionalArray">OneDimensionalArray</a> with the
+same underlying element type.
+<ul>
+ <li>
+  <input type="submit" id="p7" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p7']);"
+    value="row(arr,1)" />
+  <div id="ansp7"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p8" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p8']);"
+    value="column(arr,1)" />
+  <div id="ansp8"><div></div></div>
+ </li>
+</ul>
+
+You can determine the dimensions of an array by calling the operations
+<a href="dbopnrows.xhtml">nrows</a> and <a href="dbopncols.xhtml">ncols</a>, 
+which return the number of rows and columns, respectively.
+<ul>
+ <li>
+  <input type="submit" id="p9" class="subbut" 
+    onclick="handleFree(['p1','p9']);"
+    value="nrows(arr)" />
+  <div id="ansp9"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p10" class="subbut" 
+    onclick="handleFree(['p1','p10']);"
+    value="ncols(arr)" />
+  <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+To apply an operation to every element of an array, use 
+<a href="dbopmap.xhtml">map</a>. This creates a new array. This
+expression negates every element.
+<ul>
+ <li>
+  <input type="submit" id="p11" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p11']);"
+    value="map(-,arr)" />
+  <div id="ansp11"><div></div></div>
+ </li>
+</ul>
+This creates an array where all the elements are doubled.
+<ul>
+ <li>
+  <input type="submit" id="p12" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p12']);"
+    value="map((x+->x+x),arr)" />
+  <div id="ansp12"><div></div></div>
+ </li>
+</ul>
+To change the array destructively, use 
+<a href="dbopmapbang.xhtml">map!</a> instead of
+<a href="dbopmap.xhtml">map</a>. If you need to make a copy of any array, 
+use <a href="dbopcopy.xhtml">copy</a>.
+<ul>
+ <li>
+  <input type="submit" id="p13" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p13']);"
+    value="arrc:=copy(arr)" />
+  <div id="ansp13"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p14" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p13','p14']);"
+    value="map!(-,arrc)" />
+  <div id="ansp14"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p15" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p13','p14','p15']);"
+    value="arrc" />
+  <div id="ansp15"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p16" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p16']);"
+    value="arrc:=copy(arr)" />
+  <div id="ansp16"><div></div></div>
+ </li>
+</ul>
+Use <a href="dbopmemberq.xhtml">member?</a> to see if a given element 
+is in an array.
+<ul>
+ <li>
+  <input type="submit" id="p17" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p17']);"
+    value="member?(17,arr)" />
+  <div id="ansp17"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p18" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p18']);"
+    value="member?(10317,arr)" />
+  <div id="ansp18"><div></div></div>
+ </li>
+</ul>
+To see how many times an element appears in an array, use 
+<a href="dbopcount.xhtml">count</a>.
+<ul>
+ <li>
+  <input type="submit" id="p19" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p19']);"
+    value="count(17,arr)" />
+  <div id="ansp19"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p20" class="subbut" 
+    onclick="handleFree(['p1','p2','p5','p20']);"
+    value="count(0,arr)" />
+  <div id="ansp20"><div></div></div>
+ </li>
+</ul>
+
+For more information about the operations available for
+<a href="db.xhtml?TwoDimensionalArray">TwoDimensionalArray</a>, issue
+<ul>
+ <li>
+  <input type="submit" id="p21" class="subbut" 
+    onclick="makeRequest('p21');"
+    value=")show TwoDimensionalArray" />
+  <div id="ansp21"><div></div></div>
+ </li>
+</ul>
+For more information on related topics, see
+<a href="pagematrix.xhtml">Matrix</a> and
+<a href="lin1darrays.xhtml">OneDimensionalArray</a>
 <<page foot>>
 @
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]