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 <> @ +\subsection{dboponedimensionalarray.xhtml} +<>= +<> + + +<> +dboponedimensionalarray not implemented +<> +@ + \subsection{dbopoperator.xhtml} <>= <> @@ -35087,6 +35098,8 @@ infinity; the step size is any positive integer. <> +
Linear Algebra
+
@@ -36235,20 +36248,342 @@ to display the full list of operations defined by \subsection{lin1darrays.xhtml} <>= <> + <> - lin1darrays not implemented +
One Dimensional Array
+
+The OneDimensionalArray 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 +Vector and +FlexibleArray. To create a +one-dimensional array, apply the operation +oneDimensionalArray to a list. +
    +
  • + +
    +
  • +
+Another approach is to first create a, a one-dimensional array of 10 0's. +OneDimensionalArray has a +convenient abbreviation +ARRAY1. +
    +
  • + +
    +
  • +
+Set each ith element to i, then display the result. +
    +
  • + +
    +
  • +
+Square each element by mapping the function i+->i**2 onto each element. +
    +
  • + +
    +
  • +
+Reverse the elements in place. +
    +
  • + +
    +
  • +
+Swap the 4th and 5th element. +
    +
  • + +
    +
  • +
+Sort the elements in place. +
    +
  • + +
    +
  • +
+Create a new one-dimensional array b containing the last 5 elements of a. +
    +
  • + +
    +
  • +
+Replace the first 5 elements of a with those of b. +
    +
  • + +
    +
  • +
<> @ \subsection{lin2darrays.xhtml} <>= <> + <> - lin2darrays not implemented +
Two Dimensional Array
+
+The TwoDimensionalArray 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 Any 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 new 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. +
    +
  • + +
    +
  • +
+The entries of this array can be set to other integers using the +operation setelt. + +Issue this to set the element in the upper left corner of this array to 17. +
    +
  • + +
    +
  • +
+Now the first element of the array is 17. +
    +
  • + +
    +
  • +
+Likewise, elements of an array are extracted using the operation +elt. +
    +
  • + +
    +
  • +
+Another way to use these two operations is as follows. This sets the +element in position (3,2) of the array to 15. +
    +
  • + +
    +
  • +
+This extracts the element in position (,32) of the array. +
    +
  • + +
    +
  • +
+The operations elt and +setelt 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 +qelt and +qsetelt! which provide the same +functionality but without the error check. Typically, these operations +are called in well-tested programs. + +The operations row and +column extract rows and columns, +respectively, and return objects of +OneDimensionalArray with the +same underlying element type. +
    +
  • + +
    +
  • +
  • + +
    +
  • +
+ +You can determine the dimensions of an array by calling the operations +nrows and ncols, +which return the number of rows and columns, respectively. +
    +
  • + +
    +
  • +
  • + +
    +
  • +
+To apply an operation to every element of an array, use +map. This creates a new array. This +expression negates every element. +
    +
  • + +
    +
  • +
+This creates an array where all the elements are doubled. +
    +
  • + +
    +
  • +
+To change the array destructively, use +map! instead of +map. If you need to make a copy of any array, +use copy. +
    +
  • + +
    +
  • +
  • + +
    +
  • +
  • + +
    +
  • +
  • + +
    +
  • +
+Use member? to see if a given element +is in an array. +
    +
  • + +
    +
  • +
  • + +
    +
  • +
+To see how many times an element appears in an array, use +count. +
    +
  • + +
    +
  • +
  • + +
    +
  • +
+ +For more information about the operations available for +TwoDimensionalArray, issue +
    +
  • + +
    +
  • +
+For more information on related topics, see +Matrix and +OneDimensionalArray <> @