Commit ebf8d506 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Merge branch 'master' into multiple-systems

Conflicts:
	antik-OBSOLETE.asd
	grid/functions.lisp
	physical-quantities/grid.lisp
parents bf4620d4 ceee01b4
;; Antik system definition ;; Antik system definition
;; Liam Healy 2010-12-24 09:43:28EST antik.asd ;; Liam Healy 2010-12-24 09:43:28EST antik.asd
;; Time-stamp: <2013-03-09 10:38:42EST antik-OBSOLETE.asd> ;; Time-stamp: <2013-11-09 09:21:01EST antik-OBSOLETE.asd>
;; Copyright 2010, 2011, 2012, 2013 Liam M. Healy ;; Copyright 2010, 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -96,6 +96,32 @@ ...@@ -96,6 +96,32 @@
(:file "foreign-array" :depends-on ("types" "element-types")) (:file "foreign-array" :depends-on ("types" "element-types"))
(:file "vector-matrix" :depends-on ("element-types" "subclass")) (:file "vector-matrix" :depends-on ("element-types" "subclass"))
(:file "methods" :depends-on ("foreign-array" "vector-matrix")))) (:file "methods" :depends-on ("foreign-array" "vector-matrix"))))
(:module physical-quantities
:serial t
:depends-on (init input-output)
:components
((:file "format-output")
(:file "units")
(:file "scalar")
(:file "grid")
(:file "funcall")
(:file "unit-definitions")
(:file "sysunit-definitions")
(:file "physical-quantities")
(:file "undimension")
(:file "arithmetic")
(:file "iso8601")
(:file "dtspec")
(:file "time-interval")
(:file "angle")
(:file "angle-component")
(:file "state")
(:file "timepoint")
(:file "relative-time")
(:file "read-time")
(:file "formats")
(:file "convert-timescale")
(:file "dtmath")))
(:module mathematics (:module mathematics
:serial t :serial t
:components :components
...@@ -134,7 +160,8 @@ ...@@ -134,7 +160,8 @@
:components :components
((:module optimize ((:module optimize
:components :components
((:file "one-dim"))) ((:file "one-dim")
(:file "least-squares")))
(:module linear-algebra (:module linear-algebra
:components :components
((:file "linear-algebra"))) ((:file "linear-algebra")))
......
;; Functions on cartesian space ;; Functions on cartesian space
;; Liam Healy 2010-12-26 20:58:14EST cartesian.lisp ;; Liam Healy 2010-12-26 20:58:14EST cartesian.lisp
;; Time-stamp: <2012-06-03 22:34:26EDT cartesian.lisp> ;; Time-stamp: <2013-10-22 18:18:45EDT cartesian.lisp>
;; Copyright 2011, 2012 Liam M. Healy ;; Copyright 2011, 2012, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
;; ;;
;; This program is free software: you can redistribute it and/or modify ;; This program is free software: you can redistribute it and/or modify
...@@ -32,20 +32,16 @@ ...@@ -32,20 +32,16 @@
(defun right-angle (vector) (defun right-angle (vector)
"Find an arbitrary right angle to the vector." "Find an arbitrary right angle to the vector."
(let* ((vec (pqval vector)) ;; See [[id:7154d151-388f-48d9-b1d1-ca811fc04222][Perpendicular vector]]
(bigind ;; See http://www.gamedev.net/topic/572770-finding-vector-perpendicular-to-line-in-3d/
;; Find which component is the largest ;; Take the cross product with the coordinate unit vector of the smallest component.
(iterate (for i vector-element-index vector) (let ((vec (pqval vector)))
(finding i maximizing (abs (grid:aref vec i))))) (grid:normalize
(project (grid:copy-to vec)) (grid:cross
(return (grid:copy-to vec))) vec
;; Find vector projected into the plane perpendicular (coordinate-unit-vector
(setf (grid:aref project bigind) 0.0 (iterate (for i vector-element-index vec)
;; The return vector is the original vector with a different (finding i minimizing (abs (grid:aref vec i)))))))))
;; value in what was the largest component.
(grid:aref return bigind)
(cl:- (cl:/ (grid:inner project project) (grid:aref vec bigind))))
(grid:normalize return)))
(defun coplanar (vect1-or-matrix &optional vect2 vect3) (defun coplanar (vect1-or-matrix &optional vect2 vect3)
"The cosine of the angle between vect1 and the cross product of vect2 and vect3. "The cosine of the angle between vect1 and the cross product of vect2 and vect3.
......
No preview for this file type
...@@ -186,14 +186,18 @@ This section will describe the definitions for organizing computations. At pres ...@@ -186,14 +186,18 @@ This section will describe the definitions for organizing computations. At pres
@node Parameters, , Introduction to organization, Organization of Computation @node Parameters, , Introduction to organization, Organization of Computation
@section Parameters @section Parameters
@cindex Parameters @cindex Parameters
Parameters are named values that are defined and used in computations or in presentation; the concept is distinct from Common Lisp's @url{http://www.lispworks.com/documentation/HyperSpec/Body/m_defpar.htm#defparameter,defparameter} macro. They are organized into named categories; Antik itself defines one category, @code{NF}, which is used for numerical formatting. Each parameter is defined with a default value and description. The value can be changed with @code{(setf parameter-value)} and used with @code{parameter-value}, or changed locally (analogous to @code{let} for CL variables) with @code{with-parameters}. Parameters are named values that are defined and used in computations or in presentation. The @url{http://www.lispworks.com/documentation/HyperSpec/Body/m_defpar.htm#defparameter,defparameter} macro defines parameters (dynamic variables) but Antik has definitions that permit grouping them and including properties such as the type, which will be checked when values are assigned, and defining synonyms. The grouping is in named categories; Antik itself defines one category, @code{NF}, which is used for numerical formatting. Each category used will become a package, and the symbols exported from that package. The value can be changed with @code{(setf parameter-value)} and used with @code{parameter-value}, or changed locally (analogous to @code{let} for CL variables) with @code{with-parameters}. It is also permissible to assign as a normal variable (e.g., with let and setf), but no type checking is performed.
@example @example
;;; First create the category
(define-parameter-category kepler)
;;; Then define some parameters ;;; Then define some parameters
(define-parameter kepler foo 122 fixnum "A fixnum parameter of kepler.") (define-parameter kepler foo
(define-parameter kepler bar "hi" string "A string parameter of kepler.") :value 122
:type fixnum
:documentation "A fixnum parameter of kepler.")
(define-parameter kepler bar
:value "hi"
:type string
:documentation "A string parameter of kepler.")
;;; Get their values ;;; Get their values
(parameter-value kepler bar) (parameter-value kepler bar)
...@@ -212,7 +216,7 @@ foo: 122, bar: "hi" ...@@ -212,7 +216,7 @@ foo: 122, bar: "hi"
NIL NIL
;;; Locally change values ;;; Locally change values
(with-parameters (kepler foo 143 bar "bye") (with-parameters (kepler (foo 143) (bar "bye"))
(show-foo-bar)) (show-foo-bar))
foo: 143, bar: "bye" foo: 143, bar: "bye"
NIL NIL
...@@ -222,43 +226,40 @@ foo: 122, bar: "hi" ...@@ -222,43 +226,40 @@ foo: 122, bar: "hi"
NIL NIL
;;; Make a mistake ;;; Make a mistake
(with-parameters (kepler foo 143 bar -44) (with-parameters (kepler (foo 143) (bar -44))
(show-foo-bar)) (show-foo-bar))
Error: Value -44 is of type FIXNUM, not of the required type STRING. Error: Value -44 is of type FIXNUM, not of the required type STRING.
;;; Globally change values ;;; Globally change values
(set-parameter-value kepler bar "a new value") (setf (parameter-value kepler bar) "a new value")
(show-foo-bar)
foo: 122, bar: "a new value" foo: 122, bar: "a new value"
;;; Set multple values ;;; Set multiple values
(set-parameters kepler bar "xyz" foo 1) (set-parameters kepler bar "xyz" foo 1)
(show-foo-bar)
foo: 1, bar: "xyz"
;;; Get information about the categories and parameters ;;; Get information about the categories and parameters
(parameter-help) (parameter-help)
Parameter categories: KEPLER. Parameter categories: KEPLER and NF.
(parameter-help :kepler) (parameter-help :kepler)
Parameters in KEPLER: BAR and FOO. Parameters in KEPLER: BAR and FOO.
(parameter-help :kepler :bar) (parameter-help :kepler :bar)
BAR: A string parameter of kepler. BAR: A string parameter of kepler.
Type is: STRING, default value is "hi". Type is STRING,
Current value is "xyz".
(parameter-value* kepler (mkstr "FO" "O"))
122
@end example @end example
@include include/macro-antik-define-parameter-category.texinfo
@include include/macro-antik-define-parameter.texinfo @include include/macro-antik-define-parameter.texinfo
@include include/fun-antik-parameter-help.texinfo @include include/fun-antik-parameter-help.texinfo
@include include/macro-antik-parameters-set.texinfo
@include include/macro-antik-parameter-value.texinfo @include include/macro-antik-parameter-value.texinfo
@include include/macro-antik-parameter-value-star.texinfo @include include/macro-antik-set-parameter.texinfo
@include include/macro-antik-reset-parameters.texinfo @include include/macro-antik-set-parameters.texinfo
@include include/macro-antik-set-parameter-value.texinfo
@include include/macro-antik-with-parameters.texinfo @include include/macro-antik-with-parameters.texinfo
@node Grids, Physical Quantities, Organization of Computation, Top @node Grids, Physical Quantities, Organization of Computation, Top
@chapter Grids @chapter Grids
@cindex Vectors @cindex Vectors
...@@ -1225,7 +1226,6 @@ NIL ...@@ -1225,7 +1226,6 @@ NIL
@include include/class-antik-physical-quantity.texinfo @include include/class-antik-physical-quantity.texinfo
@include include/fun-antik-check-dimension.texinfo @include include/fun-antik-check-dimension.texinfo
@include include/fun-antik-make-pq.texinfo @include include/fun-antik-make-pq.texinfo
@include include/fun-antik-new-units.texinfo
@include include/fun-antik-pqval.texinfo @include include/fun-antik-pqval.texinfo
@include include/macro-antik-with-pq.texinfo @include include/macro-antik-with-pq.texinfo
@include include/var-antik-star-zero-is-dimensionless-star.texinfo @include include/var-antik-star-zero-is-dimensionless-star.texinfo
...@@ -1274,47 +1274,39 @@ For units defined by Antik, see the source file @file{antik/physical-quantities/ ...@@ -1274,47 +1274,39 @@ For units defined by Antik, see the source file @file{antik/physical-quantities/
@node Systems of units, , Dimensions, Physical dimension @node Systems of units, , Dimensions, Physical dimension
@subsection Systems of units @subsection Systems of units
A @dfn{system of units} is a set of units, one for each of the physical dimensions that Antik can handle. A system of units is needed by Antik for printing output and in special cases for converting physical quantities that have a physical dimension defined (e.g. length), but no units. The system of units defined by A @dfn{system of units} is a set of units, one for each of the physical dimensions that Antik can handle. A system of units is needed by Antik for printing output and in special cases for converting physical quantities that have a physical dimension defined (e.g. length), but no units. The system of units defined by
@code{*system-of-units*} is used to determine the units in which the output is printed. There are pre-defined several systems of units, @code{*siu*}, @code{*englishu*}, @code{*cgsu*}: @code{(nf-option :system-of-units)} is used to determine the units in which the output is printed. There are pre-defined several systems of units, @code{si}, @code{english}, @code{cgs}:
@example @example
ANTIK-USER> (defparameter *length1* #_10_m) ANTIK-USER> (defparameter *length1* #_10_m)
*LENGTH1* *LENGTH1*
ANTIK-USER> *length1* ANTIK-USER> *length1*
#_10.000000000000000_m #_10.000000000000000_m
ANTIK-USER> (setf *system-of-units* *englishu*) ANTIK-USER> (set-system-of-units :english)
(((1 0 0 0 0 0 0 0 0) . FOOT) ((0 0 0 0 0 0 0 0 1) . RADIAN) ; No value
((0 0 1 0 0 0 0 0 0) . SLUG) ((0 1 0 0 0 0 0 0 0) . SECOND)
((1 -2 1 0 0 0 0 0 0) . POUND-FORCE) ((2 -3 1 0 0 0 0 0 0) . HORSEPOWER)
((2 -2 1 0 0 0 0 0 0) . FOOT-POUND)
((-1 -2 1 0 0 0 0 0 0) . POUNDS-PER-SQUARE-INCH))
ANTIK-USER> *length1* ANTIK-USER> *length1*
#_32.808398950131235_ft #_32.808398950131235_ft
@end example @end example
So by setting the system of units, you can convert values as needed, So by setting the system of units, you can convert values as needed,
@example @example
ANTIK-USER> (setf *system-of-units* *siu*) ANTIK-USER> (set-system-of-units :si)
; No value
ANTIK-USER> #_12_feet ANTIK-USER> #_12_feet
#_3.657600000000000d0_m #_3.657600000000000d0_m
ANTIK-USER> (setf *system-of-units* *englishu*) ANTIK-USER> (set-system-of-units :english)
ANTIK-USER> #_3_m ANTIK-USER> #_3_m
#_9.842519685039370d0_ft #_9.842519685039370d0_ft
@end example @end example
A new system of units may be defined with @code{define-sysunits}. One need not define all physical dimensions, but if a unit is needed for a particular dimension and it's not defined, an error will be signalled. For convenience, a system of units may be defined by alteration of an existing system of units. For example, suppose that you wish to have a system of units that is like SI except that lengths are measured in km instead of meters. This will define such a system: A new system of units may be defined with @code{define-system-of-units}. One need not define all physical dimensions, but if a unit is needed for a particular dimension and it's not defined, an error will be signalled. For convenience, a system of units may be defined by augmentation of an existing system of units. For example, suppose that you wish to have a system of units that is like SI except that lengths are measured in km instead of meters. This will define such a system:
@example @example
(define-sysunits *kmu* (km) *siu* "Kilometer system.") (define-system-of-units kmdeg (km degree) si)
@end example @end example
To set the default system of units, use @code{set-default-sysunits}. To define a symbol macro to set a default system of units, use @code{setsys}. The SI system is the initial default system of units. It may be reset as the system of units with the symbol macro @code{si}. The SI system is the initial system of units.
For formatted output of angles, the units (degrees or radians) may be set with the nf option @code{:degrees}, so the system of units may be maintained whether degrees or radians are desired on output.
@include include/macro-antik-define-sysunits.texinfo @include include/macro-antik-define-system-of-units.texinfo
@include include/fun-antik-set-default-sysunits.texinfo @include include/fun-antik-set-system-of-units.texinfo
@include include/macro-antik-setsys.texinfo @include include/macro-antik-with-system-of-units.texinfo
@include include/var-antik-star-system-of-units-star.texinfo @include include/macro-antik-with-si-units.texinfo
@include include/var-antik-star-siu-star.texinfo
@include include/var-antik-star-englishu-star.texinfo
@include include/var-antik-star-cgsu-star.texinfo
@node Physical constants, Date and time, Physical dimension, Physical Quantities @node Physical constants, Date and time, Physical dimension, Physical Quantities
@section Physical constants @section Physical constants
......
...@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-dimension.html#Physical-dimens ...@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-dimension.html#Physical-dimens
<h4 class="subsection">5.3.1 Introduction</h4> <h4 class="subsection">5.3.1 Introduction</h4>
<p><a name="index-Class_002c-physical_002dquantity-318"></a>Antik has a class <code>physical-quantity</code> which is used to represent values that have physical dimension, such as mass or length; e.g. <p><a name="index-Class_002c-physical_002dquantity-312"></a>Antik has a class <code>physical-quantity</code> which is used to represent values that have physical dimension, such as mass or length; e.g.
<pre class="example"> ANTIK-USER&gt; #_35_km <pre class="example"> ANTIK-USER&gt; #_35_km
#_35000.000000000000000_m #_35000.000000000000000_m
ANTIK-USER&gt; (* #_5_m #_8_kg) ANTIK-USER&gt; (* #_5_m #_8_kg)
......
...@@ -36,42 +36,42 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Three-Dimensional-Space.html#Three-Dime ...@@ -36,42 +36,42 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Three-Dimensional-Space.html#Three-Dime
<h3 class="section">8.1 Cartesian</h3> <h3 class="section">8.1 Cartesian</h3>
<p><a name="index-Cartesian-space-406"></a><a name="index-Functions_002c-Cartesian-space-407"></a> <p><a name="index-Cartesian-space-392"></a><a name="index-Functions_002c-Cartesian-space-393"></a>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:coordinate-unit-vector</b><var> i &amp;optional length<a name="index-antik_003acoordinate_002dunit_002dvector-408"></a></var><br> &mdash; Function: <b>antik:coordinate-unit-vector</b><var> i &amp;optional length<a name="index-antik_003acoordinate_002dunit_002dvector-394"></a></var><br>
<blockquote><p><a name="index-antik_003acoordinate_002dunit_002dvector-409"></a>A coordinate unit vector. <blockquote><p><a name="index-antik_003acoordinate_002dunit_002dvector-395"></a>A coordinate unit vector.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:coplanar</b><var> vect1-or-matrix &amp;optional vect2 vect3<a name="index-antik_003acoplanar-410"></a></var><br> &mdash; Function: <b>antik:coplanar</b><var> vect1-or-matrix &amp;optional vect2 vect3<a name="index-antik_003acoplanar-396"></a></var><br>
<blockquote><p><a name="index-antik_003acoplanar-411"></a>The sine of the angle between vect1 and the cross product <blockquote><p><a name="index-antik_003acoplanar-397"></a>The cosine of the angle between vect1 and the cross product of vect2 and vect3.
of vect2 and vect3. This should be near zero. This should be near zero if the vectors are coplanar.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:distance</b><var> a b<a name="index-antik_003adistance-412"></a></var><br> &mdash; Function: <b>antik:distance</b><var> a b &amp;optional combination-function<a name="index-antik_003adistance-398"></a></var><br>
<blockquote><p><a name="index-antik_003adistance-413"></a>The length of the vector and the vector difference a-b. <blockquote><p><a name="index-antik_003adistance-399"></a>The length of the vector and the vector difference a-b.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:first-3vector</b><var> vec<a name="index-antik_003afirst_002d3vector-414"></a></var><br> &mdash; Function: <b>antik:first-3vector</b><var> vec<a name="index-antik_003afirst_002d3vector-400"></a></var><br>
<blockquote><p><a name="index-antik_003afirst_002d3vector-415"></a>Extract the first 3-vector. <blockquote><p><a name="index-antik_003afirst_002d3vector-401"></a>Extract the first 3-vector.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:right-angle</b><var> vector<a name="index-antik_003aright_002dangle-416"></a></var><br> &mdash; Function: <b>antik:right-angle</b><var> vector<a name="index-antik_003aright_002dangle-402"></a></var><br>
<blockquote><p><a name="index-antik_003aright_002dangle-417"></a>Find an arbitrary right angle to the vector. <blockquote><p><a name="index-antik_003aright_002dangle-403"></a>Find an arbitrary right angle to the vector.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:second-3vector</b><var> vec<a name="index-antik_003asecond_002d3vector-418"></a></var><br> &mdash; Function: <b>antik:second-3vector</b><var> vec<a name="index-antik_003asecond_002d3vector-404"></a></var><br>
<blockquote><p><a name="index-antik_003asecond_002d3vector-419"></a>Extract the second 3-vector. <blockquote><p><a name="index-antik_003asecond_002d3vector-405"></a>Extract the second 3-vector.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Function: <b>antik:vector-angle</b><var> a b<a name="index-antik_003avector_002dangle-420"></a></var><br> &mdash; Function: <b>antik:vector-angle</b><var> a b<a name="index-antik_003avector_002dangle-406"></a></var><br>
<blockquote><p><a name="index-antik_003avector_002dangle-421"></a>The short angle between a and b, and the rotation vector. <blockquote><p><a name="index-antik_003avector_002dangle-407"></a>The short angle between a and b, and the rotation vector.
</p></blockquote></div> </p></blockquote></div>
</body></html> </body></html>
......
...@@ -36,25 +36,25 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil ...@@ -36,25 +36,25 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil
<h4 class="subsection">4.6.1 Classes</h4> <h4 class="subsection">4.6.1 Classes</h4>
<p><a name="index-Class_002c-foreign_002darray-252"></a> <p><a name="index-Class_002c-foreign_002darray-246"></a>
<div class="defun"> <div class="defun">
&mdash; Class: <b>grid:foreign-array</b><var><a name="index-grid_003aforeign_002darray-253"></a></var><br> &mdash; Class: <b>grid:foreign-array</b><var><a name="index-grid_003aforeign_002darray-247"></a></var><br>
<blockquote><p><a name="index-grid_003aforeign_002darray-254"></a>Class precedence list: <code>foreign-array, standard-object, t</code> <blockquote><p><a name="index-grid_003aforeign_002darray-248"></a>Class precedence list: <code>foreign-array, standard-object, t</code>
<p>Arrays that can be referenced by foreign functions. <p>Arrays that can be referenced by foreign functions.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Class: <b>grid:matrix</b><var><a name="index-grid_003amatrix-255"></a></var><br> &mdash; Class: <b>grid:matrix</b><var><a name="index-grid_003amatrix-249"></a></var><br>
<blockquote><p><a name="index-grid_003amatrix-256"></a>Class precedence list: <code>matrix, foreign-array, standard-object, t</code> <blockquote><p><a name="index-grid_003amatrix-250"></a>Class precedence list: <code>matrix, foreign-array, standard-object, t</code>
<p>Foreign matrices. <p>Foreign matrices.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Class: <b>grid:mvector</b><var><a name="index-grid_003amvector-257"></a></var><br> &mdash; Class: <b>grid:mvector</b><var><a name="index-grid_003amvector-251"></a></var><br>
<blockquote><p><a name="index-grid_003amvector-258"></a>Class precedence list: <code>mvector, foreign-array, standard-object, t</code> <blockquote><p><a name="index-grid_003amvector-252"></a>Class precedence list: <code>mvector, foreign-array, standard-object, t</code>
<p>Foreign vectors. <p>Foreign vectors.
</p></blockquote></div> </p></blockquote></div>
......
...@@ -37,8 +37,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil ...@@ -37,8 +37,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil
<h4 class="subsection">4.6.3 Condition</h4> <h4 class="subsection">4.6.3 Condition</h4>
<div class="defun"> <div class="defun">
&mdash; Condition: <b>grid:array-mismatch</b><var><a name="index-grid_003aarray_002dmismatch-288"></a></var><br> &mdash; Condition: <b>grid:array-mismatch</b><var><a name="index-grid_003aarray_002dmismatch-282"></a></var><br>
<blockquote><p><a name="index-grid_003aarray_002dmismatch-289"></a>Class precedence list: <code>array-mismatch, error, serious-condition, condition, t</code> <blockquote><p><a name="index-grid_003aarray_002dmismatch-283"></a>Class precedence list: <code>array-mismatch, error, serious-condition, condition, t</code>
<p>An error indicating that the two arrays do not have <p>An error indicating that the two arrays do not have
the same dimensions. the same dimensions.
......
...@@ -55,6 +55,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Mathematics.html#Mathematics">Mathemati ...@@ -55,6 +55,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Mathematics.html#Mathematics">Mathemati
<blockquote><p><a name="index-antik_003ahandling_002dcomplex_002dnumber-80"></a>A handler to make the complex number. <blockquote><p><a name="index-antik_003ahandling_002dcomplex_002dnumber-80"></a>A handler to make the complex number.
</p></blockquote></div> </p></blockquote></div>
<!-- This needs node information -->
<h3 class="section">2.3 Iterate generalized numbers</h3> <h3 class="section">2.3 Iterate generalized numbers</h3>
<p>Extensions to the <a href="http://common-lisp.net/project/iterate/"><samp><span class="command">iterate</span></samp></a> <p>Extensions to the <a href="http://common-lisp.net/project/iterate/"><samp><span class="command">iterate</span></samp></a>
......
...@@ -35,72 +35,72 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil ...@@ -35,72 +35,72 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil
<h4 class="subsection">4.6.4 Constants and Variables</h4> <h4 class="subsection">4.6.4 Constants and Variables</h4>
<div class="defun"> <div class="defun">
&mdash; Constant: <b>grid:+foreign-pointer-class+</b><var><a name="index-grid_003a_002bforeign_002dpointer_002dclass_002b-290"></a></var><br> &mdash; Constant: <b>grid:+foreign-pointer-class+</b><var><a name="index-grid_003a_002bforeign_002dpointer_002dclass_002b-284"></a></var><br>
<blockquote><p><a name="index-grid_003a_002bforeign_002dpointer_002dclass_002b-291"></a>The class in which foreign pointers fall. <blockquote><p><a name="index-grid_003a_002bforeign_002dpointer_002dclass_002b-285"></a>The class in which foreign pointers fall.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Constant: <b>grid:+foreign-pointer-type+</b><var><a name="index-grid_003a_002bforeign_002dpointer_002dtype_002b-292"></a></var><br> &mdash; Constant: <b>grid:+foreign-pointer-type+</b><var><a name="index-grid_003a_002bforeign_002dpointer_002dtype_002b-286"></a></var><br>
<blockquote><p><a name="index-grid_003a_002bforeign_002dpointer_002dtype_002b-293"></a>The type of foreign pointers. <blockquote><p><a name="index-grid_003a_002bforeign_002dpointer_002dtype_002b-287"></a>The type of foreign pointers.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*array-element-types-no-complex*</b><var><a name="index-grid_003a_002aarray_002delement_002dtypes_002dno_002dcomplex_002a-294"></a></var><br> &mdash; Variable: <b>grid:*array-element-types-no-complex*</b><var><a name="index-grid_003a_002aarray_002delement_002dtypes_002dno_002dcomplex_002a-288"></a></var><br>
<blockquote><p><a name="index-grid_003a_002aarray_002delement_002dtypes_002dno_002dcomplex_002a-295"></a>All the array element types supported except for complex types. <blockquote><p><a name="index-grid_003a_002aarray_002delement_002dtypes_002dno_002dcomplex_002a-289"></a>All the array element types supported except for complex types.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*array-element-types*</b><var><a name="index-grid_003a_002aarray_002delement_002dtypes_002a-296"></a></var><br> &mdash; Variable: <b>grid:*array-element-types*</b><var><a name="index-grid_003a_002aarray_002delement_002dtypes_002a-290"></a></var><br>
<blockquote><p><a name="index-grid_003a_002aarray_002delement_002dtypes_002a-297"></a>All the array element types supported. <blockquote><p><a name="index-grid_003a_002aarray_002delement_002dtypes_002a-291"></a>All the array element types supported.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*complex-types*</b><var><a name="index-grid_003a_002acomplex_002dtypes_002a-298"></a></var><br> &mdash; Variable: <b>grid:*complex-types*</b><var><a name="index-grid_003a_002acomplex_002dtypes_002a-292"></a></var><br>
<blockquote><p><a name="index-grid_003a_002acomplex_002dtypes_002a-299"></a>All the supported complex array element types. <blockquote><p><a name="index-grid_003a_002acomplex_002dtypes_002a-293"></a>All the supported complex array element types.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*cstd-cl-type-mapping*</b><var><a name="index-grid_003a_002acstd_002dcl_002dtype_002dmapping_002a-300"></a></var><br> &mdash; Variable: <b>grid:*cstd-cl-type-mapping*</b><var><a name="index-grid_003a_002acstd_002dcl_002dtype_002dmapping_002a-294"></a></var><br>
<blockquote><p><a name="index-grid_003a_002acstd_002dcl_002dtype_002dmapping_002a-301"></a>An alist of the <code>c</code> standard types as keywords, and the <code>cl</code> type <blockquote><p><a name="index-grid_003a_002acstd_002dcl_002dtype_002dmapping_002a-295"></a>An alist of the <code>c</code> standard types as keywords, and the <code>cl</code> type
The exception is complex types, which don't have a definition The exception is complex types, which don't have a definition
in the <code>c</code> standard; in that case, the <code>c</code> type is the foreign struct in the <code>c</code> standard; in that case, the <code>c</code> type is the foreign struct
definition. definition.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*cstd-integer-types*</b><var><a name="index-grid_003a_002acstd_002dinteger_002dtypes_002a-302"></a></var><br> &mdash; Variable: <b>grid:*cstd-integer-types*</b><var><a name="index-grid_003a_002acstd_002dinteger_002dtypes_002a-296"></a></var><br>
<blockquote><p><a name="index-grid_003a_002acstd_002dinteger_002dtypes_002a-303"></a>List of integer types supported by <code>cffi</code>, from the <code>cffi</code> docs. <blockquote><p><a name="index-grid_003a_002acstd_002dinteger_002dtypes_002a-297"></a>List of integer types supported by <code>cffi</code>, from the <code>cffi</code> docs.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*double-types*</b><var><a name="index-grid_003a_002adouble_002dtypes_002a-304"></a></var><br> &mdash; Variable: <b>grid:*double-types*</b><var><a name="index-grid_003a_002adouble_002dtypes_002a-298"></a></var><br>
<blockquote><p><a name="index-grid_003a_002adouble_002dtypes_002a-305"></a>All the supported double float element types. <blockquote><p><a name="index-grid_003a_002adouble_002dtypes_002a-299"></a>All the supported double float element types.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*float-complex-types*</b><var><a name="index-grid_003a_002afloat_002dcomplex_002dtypes_002a-306"></a></var><br> &mdash; Variable: <b>grid:*float-complex-types*</b><var><a name="index-grid_003a_002afloat_002dcomplex_002dtypes_002a-300"></a></var><br>
<blockquote><p><a name="index-grid_003a_002afloat_002dcomplex_002dtypes_002a-307"></a>All the float or complex array element types supported. <blockquote><p><a name="index-grid_003a_002afloat_002dcomplex_002dtypes_002a-301"></a>All the float or complex array element types supported.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*float-types*</b><var><a name="index-grid_003a_002afloat_002dtypes_002a-308"></a></var><br> &mdash; Variable: <b>grid:*float-types*</b><var><a name="index-grid_003a_002afloat_002dtypes_002a-302"></a></var><br>
<blockquote><p><a name="index-grid_003a_002afloat_002dtypes_002a-309"></a>All the float array element types. <blockquote><p><a name="index-grid_003a_002afloat_002dtypes_002a-303"></a>All the float array element types.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*grid-types*</b><var><a name="index-grid_003a_002agrid_002dtypes_002a-310"></a></var><br> &mdash; Variable: <b>grid:*grid-types*</b><var><a name="index-grid_003a_002agrid_002dtypes_002a-304"></a></var><br>
<blockquote><p><a name="index-grid_003a_002agrid_002dtypes_002a-311"></a>A list of (disjoint) types that are accepted as grids. Not every <blockquote><p><a name="index-grid_003a_002agrid_002dtypes_002a-305"></a>A list of (disjoint) types that are accepted as grids. Not every
object of the given type is necessarily a grid, however. object of the given type is necessarily a grid, however.
</p></blockquote></div> </p></blockquote></div>
<div class="defun"> <div class="defun">
&mdash; Variable: <b>grid:*print-contents*</b><var><a name="index-grid_003a_002aprint_002dcontents_002a-312"></a></var><br> &mdash; Variable: <b>grid:*print-contents*</b><var><a name="index-grid_003a_002aprint_002dcontents_002a-306"></a></var><br>
<blockquote><p><a name="index-grid_003a_002aprint_002dcontents_002a-313"></a>Print the contents of the foreign-array.