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

Update documentation for system of units as symbol in table

parent 6640ba5e
No preview for this file type
......@@ -253,17 +253,13 @@ Type is STRING,
Current value is "xyz".
@end example
@include include/macro-antik-define-parameter-category.texinfo
@include include/macro-antik-define-parameter.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-star.texinfo
@include include/macro-antik-reset-parameters.texinfo
@include include/macro-antik-set-parameter-value.texinfo
@include include/macro-antik-set-parameter.texinfo
@include include/macro-antik-set-parameters.texinfo
@include include/macro-antik-with-parameters.texinfo
@node Grids, Physical Quantities, Organization of Computation, Top
@chapter Grids
@cindex Vectors
......@@ -1278,47 +1274,39 @@ For units defined by Antik, see the source file @file{antik/physical-quantities/
@node Systems of units, , Dimensions, Physical dimension
@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
@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{*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
ANTIK-USER> (defparameter *length1* #_10_m)
*LENGTH1*
ANTIK-USER> *length1*
#_10.000000000000000_m
ANTIK-USER> (set-default-system-of-units *englishu*)
(((1 0 0 0 0 0 0 0 0) . FOOT) ((0 0 0 0 0 0 0 0 1) . RADIAN)
((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> (set-system-of-units :english)
; No value
ANTIK-USER> *length1*
#_32.808398950131235_ft
@end example
So by setting the system of units, you can convert values as needed,
@example
ANTIK-USER> (set-default-system-of-units *siu*)
ANTIK-USER> (set-system-of-units :si)
; No value
ANTIK-USER> #_12_feet
#_3.657600000000000d0_m
ANTIK-USER> (set-default-system-of-units *englishu*)
ANTIK-USER> (set-system-of-units :english)
ANTIK-USER> #_3_m
#_9.842519685039370d0_ft
@end example
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 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
(define-system-of-units *kmu* (km) *siu* "Kilometer system.")
(define-system-of-units kmdeg (km degree) si)
@end example
To set the default system of units, use @code{set-default-system-of-units}. To define a symbol macro to set a default system of units, use @code{make-set-system-of-units-symbol}. 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.
@include include/macro-antik-define-system-of-units.texinfo
@include include/fun-antik-set-default-system-of-units.texinfo
@include include/macro-antik-make-set-system-of-units-symbol.texinfo
@include include/macro-antik-with-si-units.texinfo
@include include/fun-antik-set-system-of-units.texinfo
@include include/macro-antik-with-system-of-units.texinfo
@include include/macro-antik-with-system-of-units-star.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
@include include/macro-antik-with-si-units.texinfo
@node Physical constants, Date and time, Physical dimension, Physical Quantities
@section Physical constants
......
......@@ -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>
<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
#_35000.000000000000000_m
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
<h3 class="section">8.1 Cartesian</h3>
<p><a name="index-Cartesian-space-410"></a><a name="index-Functions_002c-Cartesian-space-411"></a>
<p><a name="index-Cartesian-space-392"></a><a name="index-Functions_002c-Cartesian-space-393"></a>
<div class="defun">
&mdash; Function: <b>antik:coordinate-unit-vector</b><var> i &amp;optional length<a name="index-antik_003acoordinate_002dunit_002dvector-412"></a></var><br>
<blockquote><p><a name="index-antik_003acoordinate_002dunit_002dvector-413"></a>A coordinate unit vector.
&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-395"></a>A coordinate unit vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:coplanar</b><var> vect1-or-matrix &amp;optional vect2 vect3<a name="index-antik_003acoplanar-414"></a></var><br>
<blockquote><p><a name="index-antik_003acoplanar-415"></a>The cosine of the angle between vect1 and the cross product of vect2 and vect3.
&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-397"></a>The cosine of the angle between vect1 and the cross product of vect2 and vect3.
This should be near zero if the vectors are coplanar.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:distance</b><var> a b &amp;optional combination-function<a name="index-antik_003adistance-416"></a></var><br>
<blockquote><p><a name="index-antik_003adistance-417"></a>The length of the vector and the vector difference a-b.
&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-399"></a>The length of the vector and the vector difference a-b.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:first-3vector</b><var> vec<a name="index-antik_003afirst_002d3vector-418"></a></var><br>
<blockquote><p><a name="index-antik_003afirst_002d3vector-419"></a>Extract the first 3-vector.
&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-401"></a>Extract the first 3-vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:right-angle</b><var> vector<a name="index-antik_003aright_002dangle-420"></a></var><br>
<blockquote><p><a name="index-antik_003aright_002dangle-421"></a>Find an arbitrary right angle to the vector.
&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-403"></a>Find an arbitrary right angle to the vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:second-3vector</b><var> vec<a name="index-antik_003asecond_002d3vector-422"></a></var><br>
<blockquote><p><a name="index-antik_003asecond_002d3vector-423"></a>Extract the second 3-vector.
&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-405"></a>Extract the second 3-vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:vector-angle</b><var> a b<a name="index-antik_003avector_002dangle-424"></a></var><br>
<blockquote><p><a name="index-antik_003avector_002dangle-425"></a>The short angle between a and b, and the rotation vector.
&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-407"></a>The short angle between a and b, and the rotation vector.
</p></blockquote></div>
</body></html>
......
......@@ -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>
<p><a name="index-Class_002c-foreign_002darray-252"></a>
<p><a name="index-Class_002c-foreign_002darray-246"></a>
<div class="defun">
&mdash; Class: <b>grid:foreign-array</b><var><a name="index-grid_003aforeign_002darray-253"></a></var><br>
<blockquote><p><a name="index-grid_003aforeign_002darray-254"></a>Class precedence list: <code>foreign-array, standard-object, t</code>
&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-248"></a>Class precedence list: <code>foreign-array, standard-object, t</code>
<p>Arrays that can be referenced by foreign functions.
</p></blockquote></div>
<div class="defun">
&mdash; Class: <b>grid:matrix</b><var><a name="index-grid_003amatrix-255"></a></var><br>
<blockquote><p><a name="index-grid_003amatrix-256"></a>Class precedence list: <code>matrix, foreign-array, standard-object, t</code>
&mdash; Class: <b>grid:matrix</b><var><a name="index-grid_003amatrix-249"></a></var><br>
<blockquote><p><a name="index-grid_003amatrix-250"></a>Class precedence list: <code>matrix, foreign-array, standard-object, t</code>
<p>Foreign matrices.
</p></blockquote></div>
<div class="defun">
&mdash; Class: <b>grid:mvector</b><var><a name="index-grid_003amvector-257"></a></var><br>
<blockquote><p><a name="index-grid_003amvector-258"></a>Class precedence list: <code>mvector, foreign-array, standard-object, t</code>
&mdash; Class: <b>grid:mvector</b><var><a name="index-grid_003amvector-251"></a></var><br>
<blockquote><p><a name="index-grid_003amvector-252"></a>Class precedence list: <code>mvector, foreign-array, standard-object, t</code>
<p>Foreign vectors.
</p></blockquote></div>
......
......@@ -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>
<div class="defun">
&mdash; Condition: <b>grid:array-mismatch</b><var><a name="index-grid_003aarray_002dmismatch-288"></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>
&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-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
the same dimensions.
......
......@@ -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>
<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>
<blockquote><p><a name="index-grid_003a_002bforeign_002dpointer_002dclass_002b-291"></a>The class in which foreign pointers fall.
&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-285"></a>The class in which foreign pointers fall.
</p></blockquote></div>
<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>
<blockquote><p><a name="index-grid_003a_002bforeign_002dpointer_002dtype_002b-293"></a>The type of foreign pointers.
&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-287"></a>The type of foreign pointers.
</p></blockquote></div>
<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>
<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.
&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-289"></a>All the array element types supported except for complex types.
</p></blockquote></div>
<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>
<blockquote><p><a name="index-grid_003a_002aarray_002delement_002dtypes_002a-297"></a>All the array element types supported.
&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-291"></a>All the array element types supported.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>grid:*complex-types*</b><var><a name="index-grid_003a_002acomplex_002dtypes_002a-298"></a></var><br>
<blockquote><p><a name="index-grid_003a_002acomplex_002dtypes_002a-299"></a>All the supported complex array element types.
&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-293"></a>All the supported complex array element types.
</p></blockquote></div>
<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>
<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
&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-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
in the <code>c</code> standard; in that case, the <code>c</code> type is the foreign struct
definition.
</p></blockquote></div>
<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>
<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.
&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-297"></a>List of integer types supported by <code>cffi</code>, from the <code>cffi</code> docs.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>grid:*double-types*</b><var><a name="index-grid_003a_002adouble_002dtypes_002a-304"></a></var><br>
<blockquote><p><a name="index-grid_003a_002adouble_002dtypes_002a-305"></a>All the supported double float element types.
&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-299"></a>All the supported double float element types.
</p></blockquote></div>
<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>
<blockquote><p><a name="index-grid_003a_002afloat_002dcomplex_002dtypes_002a-307"></a>All the float or complex array element types supported.
&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-301"></a>All the float or complex array element types supported.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>grid:*float-types*</b><var><a name="index-grid_003a_002afloat_002dtypes_002a-308"></a></var><br>
<blockquote><p><a name="index-grid_003a_002afloat_002dtypes_002a-309"></a>All the float array element types.
&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-303"></a>All the float array element types.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>grid:*grid-types*</b><var><a name="index-grid_003a_002agrid_002dtypes_002a-310"></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
&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-305"></a>A list of (disjoint) types that are accepted as grids. Not every
object of the given type is necessarily a grid, however.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>grid:*print-contents*</b><var><a name="index-grid_003a_002aprint_002dcontents_002a-312"></a></var><br>
<blockquote><p><a name="index-grid_003a_002aprint_002dcontents_002a-313"></a>Print the contents of the foreign-array.
&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-307"></a>Print the contents of the foreign-array.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>grid:*print-foreign-array-readably*</b><var><a name="index-grid_003a_002aprint_002dforeign_002darray_002dreadably_002a-314"></a></var><br>
<blockquote><p><a name="index-grid_003a_002aprint_002dforeign_002darray_002dreadably_002a-315"></a>Print the contents of the foreign-array with the #m reader macro.
&mdash; Variable: <b>grid:*print-foreign-array-readably*</b><var><a name="index-grid_003a_002aprint_002dforeign_002darray_002dreadably_002a-308"></a></var><br>
<blockquote><p><a name="index-grid_003a_002aprint_002dforeign_002darray_002dreadably_002a-309"></a>Print the contents of the foreign-array with the #m reader macro.
</p></blockquote></div>
</body></html>
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">12 Copying</h2>
<p><a name="index-Copying-Antik-software-470"></a>All code and documentation in this collection is copyright as indicated
<p><a name="index-Copying-Antik-software-452"></a>All code and documentation in this collection is copyright as indicated
at the top of this document. It may be copied under the
<a href="http://www.gnu.org/licenses/gpl.html">GPL v3</a>.
......
......@@ -37,13 +37,13 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Operations.html#Operations">Operations<
<h4 class="subsection">4.3.2 Copying</h4>
<div class="defun">
&mdash; Generic Function: <b>grid:copy</b><var> object &amp;key specification grid-type dimensions element-type destination<a name="index-grid_003acopy-143"></a></var><br>
<blockquote><p><a name="index-grid_003acopy-144"></a>Copy contents into existing or new object.
&mdash; Generic Function: <b>grid:copy</b><var> object &amp;key specification grid-type dimensions element-type destination<a name="index-grid_003acopy-137"></a></var><br>
<blockquote><p><a name="index-grid_003acopy-138"></a>Copy contents into existing or new object.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:copy-to</b><var> object &amp;optional type<a name="index-grid_003acopy_002dto-145"></a></var><br>
<blockquote><p><a name="index-grid_003acopy_002dto-146"></a>Make a grid of the specified type from the object.
&mdash; Function: <b>grid:copy-to</b><var> object &amp;optional type<a name="index-grid_003acopy_002dto-139"></a></var><br>
<blockquote><p><a name="index-grid_003acopy_002dto-140"></a>Make a grid of the specified type from the object.
</p></blockquote></div>
Copying is performed with the function <code>copy</code>. This works between
<code>grid:foreign-array</code>s, pointers, and CL arrays. There are two
......
......@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Grids.html#Grids">Grids</a>
<h3 class="section">4.2 Creating a grid</h3>
<p><a name="index-Grid_002c-creating-105"></a><a name="index-Creating-a-grid-106"></a>
<p><a name="index-Grid_002c-creating-99"></a><a name="index-Creating-a-grid-100"></a>
<ul class="menu">
<li><a accesskey="1" href="Reader-macro-and-function-_003ccode_003egrid_003c_002fcode_003e.html#Reader-macro-and-function-_003ccode_003egrid_003c_002fcode_003e">Reader macro and function <code>grid</code></a>
......
......@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-Quantities.html#Physical-Quant
<h3 class="section">5.5 Date and time</h3>
<p><a name="index-Class_002c-date-and-time-356"></a><a name="index-Date-357"></a><a name="index-Time-_0028of-day_0029-358"></a><a name="index-Date-and-time_002c-creating-359"></a><a name="index-Reader-macro_002c-date-and-time-360"></a><a name="index-ISO8601-361"></a><a name="index-UTC-_0028coordinated-universal-time_0029-362"></a><a name="index-TAI-_0028atomic-time_0029-363"></a><a name="index-Coordinated-Universal-Time-_0028UTC_0029-364"></a><a name="index-International-Atomic-Time-_0028TAI_0029-365"></a><a name="index-UT1-366"></a><a name="index-Astronomical-time-_0028UT1_0029-367"></a><a name="index-Timezones-368"></a>Dates and times can be represented in Antik with the <code>timepoint</code> class. A timepoint is a specific point in Newtonian time, so includes a date and time, and a <dfn>timescale</dfn> (best thought of as a timezone). Timepoints are most conveniently made with the <dfn>#d</dfn> reader macro; the default timescale is <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>, and the standard format for specification of timepoints is
<p><a name="index-Class_002c-date-and-time-338"></a><a name="index-Date-339"></a><a name="index-Time-_0028of-day_0029-340"></a><a name="index-Date-and-time_002c-creating-341"></a><a name="index-Reader-macro_002c-date-and-time-342"></a><a name="index-ISO8601-343"></a><a name="index-UTC-_0028coordinated-universal-time_0029-344"></a><a name="index-TAI-_0028atomic-time_0029-345"></a><a name="index-Coordinated-Universal-Time-_0028UTC_0029-346"></a><a name="index-International-Atomic-Time-_0028TAI_0029-347"></a><a name="index-UT1-348"></a><a name="index-Astronomical-time-_0028UT1_0029-349"></a><a name="index-Timezones-350"></a>Dates and times can be represented in Antik with the <code>timepoint</code> class. A timepoint is a specific point in Newtonian time, so includes a date and time, and a <dfn>timescale</dfn> (best thought of as a timezone). Timepoints are most conveniently made with the <dfn>#d</dfn> reader macro; the default timescale is <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>, and the standard format for specification of timepoints is
<a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>
<pre class="example"> ANTIK-USER&gt; #d2011-08-04T12:00
2011-08-04 12:00:00.000
......@@ -65,36 +65,36 @@ In order to convert to and from UT1, it is necessary to obtain earth orientation
<p>Dates are output in ISO8601 format. The function <code>write-us-date</code> can be used to format in US style.
<div class="defun">
&mdash; Class: <b>antik:timepoint</b><var><a name="index-antik_003atimepoint-369"></a></var><br>
<blockquote><p><a name="index-antik_003atimepoint-370"></a>Class precedence list: <code>timepoint, dtspec, standard-object, t</code>
&mdash; Class: <b>antik:timepoint</b><var><a name="index-antik_003atimepoint-351"></a></var><br>
<blockquote><p><a name="index-antik_003atimepoint-352"></a>Class precedence list: <code>timepoint, dtspec, standard-object, t</code>
<p>Specification of a point in time, including a scale.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>antik:*real-ut1-utc*</b><var><a name="index-antik_003a_002areal_002dut1_002dutc_002a-371"></a></var><br>
<blockquote><p><a name="index-antik_003a_002areal_002dut1_002dutc_002a-372"></a>If <code>nil</code>, <code>ut1</code> will be taken the same as <code>utc</code>.
&mdash; Variable: <b>antik:*real-ut1-utc*</b><var><a name="index-antik_003a_002areal_002dut1_002dutc_002a-353"></a></var><br>
<blockquote><p><a name="index-antik_003a_002areal_002dut1_002dutc_002a-354"></a>If <code>nil</code>, <code>ut1</code> will be taken the same as <code>utc</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:read-time</b><var> string<a name="index-antik_003aread_002dtime-373"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtime-374"></a>Parse the datime or time interval string and create a timepoint object.
&mdash; Function: <b>antik:read-time</b><var> string<a name="index-antik_003aread_002dtime-355"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtime-356"></a>Parse the datime or time interval string and create a timepoint object.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:read-timepoint</b><var> string &amp;optional pos-ymdhms scale<a name="index-antik_003aread_002dtimepoint-375"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtimepoint-376"></a>Read a timepoint from a string with specification for the position in the string of each component; pos-ymdhms is a list of year, month, day, hour, minute, and second as sequence numbers for the integers in the string. Scale is the timescale (zone) as a string or symbol. If pos-ymdhms has only three components, or only a date is provided, the timepoint created will be specifed as day-only. The default reads an <code>iso8601</code> string like <code>1999-03-30t12:33:45</code>.
&mdash; Function: <b>antik:read-timepoint</b><var> string &amp;optional pos-ymdhms scale<a name="index-antik_003aread_002dtimepoint-357"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtimepoint-358"></a>Read a timepoint from a string with specification for the position in the string of each component; pos-ymdhms is a list of year, month, day, hour, minute, and second as sequence numbers for the integers in the string. Scale is the timescale (zone) as a string or symbol. If pos-ymdhms has only three components, or only a date is provided, the timepoint created will be specifed as day-only. The default reads an <code>iso8601</code> string like <code>1999-03-30t12:33:45</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:read-us-date</b><var> string &amp;optional day-only<a name="index-antik_003aread_002dus_002ddate-377"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dus_002ddate-378"></a>Read dates and times in customary <code>us</code> format MM/DD/YYYY; times may
&mdash; Function: <b>antik:read-us-date</b><var> string &amp;optional day-only<a name="index-antik_003aread_002dus_002ddate-359"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dus_002ddate-360"></a>Read dates and times in customary <code>us</code> format MM/DD/YYYY; times may
be included as well if day-only is nil.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:write-us-date</b><var> datime<a name="index-antik_003awrite_002dus_002ddate-379"></a></var><br>
<blockquote><p><a name="index-antik_003awrite_002dus_002ddate-380"></a>Write dates and times in customary <code>us</code> format MM/DD/YYYY.
&mdash; Function: <b>antik:write-us-date</b><var> datime<a name="index-antik_003awrite_002dus_002ddate-361"></a></var><br>
<blockquote><p><a name="index-antik_003awrite_002dus_002ddate-362"></a>Write dates and times in customary <code>us</code> format MM/DD/YYYY.
</p></blockquote></div>
</body></html>
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">11 Download and installation</h2>
<p><a name="index-Installation-of-Antik-467"></a><a name="index-Download-of-Antik-468"></a><a name="index-Dependencies-of-Antik-on-external-libraries-469"></a>The recommended way to download and install this software is through
<p><a name="index-Installation-of-Antik-449"></a><a name="index-Download-of-Antik-450"></a><a name="index-Dependencies-of-Antik-on-external-libraries-451"></a>The recommended way to download and install this software is through
<a href="http://www.quicklisp.org/">quicklisp</a>. Install quicklisp following
the directions, then do one of:
<pre class="example"> (ql:quickload "antik")
......
......@@ -34,7 +34,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Grids.html#Grids">Grids</a>
<h3 class="section">4.7 Efficiency</h3>
<p><a name="index-Efficiency-of-computation-for-grids-316"></a><a name="index-Grid_002c-efficiency-of-computation-317"></a>Access to elements of foreign arrays, for getting or setting, can be
<p><a name="index-Efficiency-of-computation-for-grids-310"></a><a name="index-Grid_002c-efficiency-of-computation-311"></a>Access to elements of foreign arrays, for getting or setting, can be
very slow if they are not declared. These declarations can take
<a href="http://www.lispworks.com/documentation/HyperSpec/Body/03_c.htm">several forms</a>: <samp><span class="command">declare</span></samp>, <samp><span class="command">declaim</span></samp>,
<samp><span class="command">proclaim</span></samp>, or <samp><span class="command">the</span></samp>. With the exception of the
......
......@@ -37,23 +37,23 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Operations.html#Operations">Operations<
<h4 class="subsection">4.3.1 Elements</h4>
<div class="defun">
&mdash; Generic Function: <b>grid:aref</b><var> grid &amp;rest indices<a name="index-grid_003aaref-135"></a></var><br>
<blockquote><p><a name="index-grid_003aaref-136"></a>Select the element from the grid.
&mdash; Generic Function: <b>grid:aref</b><var> grid &amp;rest indices<a name="index-grid_003aaref-129"></a></var><br>
<blockquote><p><a name="index-grid_003aaref-130"></a>Select the element from the grid.
</p></blockquote></div>
<div class="defun">
&mdash; Generic Function: <b>grid:aref*</b><var> grid linearized-index<a name="index-grid_003aaref_002a-137"></a></var><br>
<blockquote><p><a name="index-grid_003aaref_002a-138"></a>Select the element from the grid using a linearized index.
&mdash; Generic Function: <b>grid:aref*</b><var> grid linearized-index<a name="index-grid_003aaref_002a-131"></a></var><br>
<blockquote><p><a name="index-grid_003aaref_002a-132"></a>Select the element from the grid using a linearized index.
</p></blockquote></div>
<div class="defun">
&mdash; Generic Function: <b>(setf grid:aref)</b><var><a name="index-g_t_0028setf-grid_003aaref_0029-139"></a></var><br>
<blockquote><p><a name="index-g_t_0028setf-grid_003aaref_0029-140"></a>Set the element from the grid.
&mdash; Generic Function: <b>(setf grid:aref)</b><var><a name="index-g_t_0028setf-grid_003aaref_0029-133"></a></var><br>
<blockquote><p><a name="index-g_t_0028setf-grid_003aaref_0029-134"></a>Set the element from the grid.
</p></blockquote></div>
<div class="defun">
&mdash; Generic Function: <b>(setf grid:aref*)</b><var><a name="index-g_t_0028setf-grid_003aaref_002a_0029-141"></a></var><br>
<blockquote><p><a name="index-g_t_0028setf-grid_003aaref_002a_0029-142"></a>Set the element from the grid using a linearized index.
&mdash; Generic Function: <b>(setf grid:aref*)</b><var><a name="index-g_t_0028setf-grid_003aaref_002a_0029-135"></a></var><br>
<blockquote><p><a name="index-g_t_0028setf-grid_003aaref_002a_0029-136"></a>Set the element from the grid using a linearized index.
</p></blockquote></div>
Individual elements are obtained using <code>grid:aref</code> (analogous to
Lisp's <code>cl:aref</code>), and are set with <code>setf grid:aref</code>. For example,
......
......@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Internals.html#Internals">Internals</a>
<h3 class="section">10.1 Foreign Library Kit</h3>
<p><a name="index-Foreign-array-metadata-466"></a>Antik is designed with the idea that scientific and engineering libraries, particularly foreign (non-Lisp) libraries, can easily be integrated, so that data can be exchanged with and among the libraries. Function and other definitions, when duplicated, will be named the same, differing only in the package. For example, if libraries &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; and &lsquo;<samp><span class="samp">bar</span></samp>&rsquo; both define a singular value decomposition (SVD), they would use the function names <code>foo:sv-decomposition</code> and <code>bar:sv-decomposition</code>, and the arguments would be as similar as possible. Then a user may call either one on a matrix (two-dimensional) grid, and compare results.
<p><a name="index-Foreign-array-metadata-448"></a>Antik is designed with the idea that scientific and engineering libraries, particularly foreign (non-Lisp) libraries, can easily be integrated, so that data can be exchanged with and among the libraries. Function and other definitions, when duplicated, will be named the same, differing only in the package. For example, if libraries &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; and &lsquo;<samp><span class="samp">bar</span></samp>&rsquo; both define a singular value decomposition (SVD), they would use the function names <code>foo:sv-decomposition</code> and <code>bar:sv-decomposition</code>, and the arguments would be as similar as possible. Then a user may call either one on a matrix (two-dimensional) grid, and compare results.
<p>To facilitate the exchange of foreign arrays, the class <code>grid:foreign-array</code> has a slot <code>grid::foreign-metadata</code>. The interface code for a foreign library can save information there as a plist that the library needs in order to use the array, such as the dimensions.
......
......@@ -37,80 +37,80 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Capabilities-and-Internals.html#Capabil
<h4 class="subsection">4.6.2 Functions and Macros</h4>
<div class="defun">
&mdash; Function: <b>grid:all-types</b><var> alist &amp;optional right-side<a name="index-grid_003aall_002dtypes-259"></a></var><br>
<blockquote><p><a name="index-grid_003aall_002dtypes-260"></a>A list of all types defined by symbol or definition.
&mdash; Function: <b>grid:all-types</b><var> alist &amp;optional right-side<a name="index-grid_003aall_002dtypes-253"></a></var><br>
<blockquote><p><a name="index-grid_003aall_002dtypes-254"></a>A list of all types defined by symbol or definition.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:cffi-cl</b><var> cffi-type<a name="index-grid_003acffi_002dcl-261"></a></var><br>
<blockquote><p><a name="index-grid_003acffi_002dcl-262"></a>The <code>cl</code> type from the <code>cffi</code> element type.
&mdash; Function: <b>grid:cffi-cl</b><var> cffi-type<a name="index-grid_003acffi_002dcl-255"></a></var><br>
<blockquote><p><a name="index-grid_003acffi_002dcl-256"></a>The <code>cl</code> type from the <code>cffi</code> element type.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:check-dimensions</b><var> dimensions &amp;optional errorp<a name="index-grid_003acheck_002ddimensions-263"></a></var><br>
<blockquote><p><a name="index-grid_003acheck_002ddimensions-264"></a>Check that dimension specification for a grid is a list of positive integers.
&mdash; Function: <b>grid:check-dimensions</b><var> dimensions &amp;optional errorp<a name="index-grid_003acheck_002ddimensions-257"></a></var><br>
<blockquote><p><a name="index-grid_003acheck_002ddimensions-258"></a>Check that dimension specification for a grid is a list of positive integers.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:cl-cffi</b><var> cl-type<a name="index-grid_003acl_002dcffi-265"></a></var><br>
<blockquote><p><a name="index-grid_003acl_002dcffi-266"></a>The <code>cffi</code> element type from the <code>cl</code> type.
&mdash; Function: <b>grid:cl-cffi</b><var> cl-type<a name="index-grid_003acl_002dcffi-259"></a></var><br>
<blockquote><p><a name="index-grid_003acl_002dcffi-260"></a>The <code>cffi</code> element type from the <code>cl</code> type.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:data-class-name</b><var> category-or-rank element-type &amp;optional making-class<a name="index-grid_003adata_002dclass_002dname-267"></a></var><br>
<blockquote><p><a name="index-grid_003adata_002dclass_002dname-268"></a>The class name from the type of element.
&mdash; Function: <b>grid:data-class-name</b><var> category-or-rank element-type &amp;optional making-class<a name="index-grid_003adata_002dclass_002dname-261"></a></var><br>
<blockquote><p><a name="index-grid_003adata_002dclass_002dname-262"></a>The class name from the type of element.
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>grid:dcref</b><var> double &amp;optional index<a name="index-grid_003adcref-269"></a></var><br>
<blockquote><p><a name="index-grid_003adcref-270"></a>Reference <code>c</code> double(s).
&mdash; Macro: <b>grid:dcref</b><var> double &amp;optional index<a name="index-grid_003adcref-263"></a></var><br>
<blockquote><p><a name="index-grid_003adcref-264"></a>Reference <code>c</code> double(s).
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:element-size</b><var> object<a name="index-grid_003aelement_002dsize-271"></a></var><br>
<blockquote><p><a name="index-grid_003aelement_002dsize-272"></a>The size of each element as stored in <code>c</code>.
&mdash; Function: <b>grid:element-size</b><var> object<a name="index-grid_003aelement_002dsize-265"></a></var><br>
<blockquote><p><a name="index-grid_003aelement_002dsize-266"></a>The size of each element as stored in <code>c</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:element-types</b><var> element-types<a name="index-grid_003aelement_002dtypes-273"></a></var><br>
<blockquote><p><a name="index-grid_003aelement_002dtypes-274"></a>All the element types available of a given category.
&mdash; Function: <b>grid:element-types</b><var> element-types<a name="index-grid_003aelement_002dtypes-267"></a></var><br>
<blockquote><p><a name="index-grid_003aelement_002dtypes-268"></a>All the element types available of a given category.
</p></blockquote></div>
<div class="defun">
&mdash; Generic Function: <b>grid:element-type</b><var> grid<a name="index-grid_003aelement_002dtype-275"></a></var><br>
<blockquote><p><a name="index-grid_003aelement_002dtype-276"></a>The element type of the grid.
&mdash; Generic Function: <b>grid:element-type</b><var> grid<a name="index-grid_003aelement_002dtype-269"></a></var><br>
<blockquote><p><a name="index-grid_003aelement_002dtype-270"></a>The element type of the grid.
</p></blockquote></div>
<div class="defun">
&mdash; Method: <b>grid:element-type</b> (<var>foreign-array foreign-array</var>)<var><a name="index-grid_003aelement_002dtype-277"></a></var><br>
&mdash; Method: <b>grid:element-type</b> (<var>foreign-array foreign-array</var>)<var><a name="index-grid_003aelement_002dtype-271"></a></var><br>
<blockquote><p>automatically generated reader method
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:lookup-type</b><var> symbol alist &amp;optional reverse error<a name="index-grid_003alookup_002dtype-278"></a></var><br>
<blockquote><p><a name="index-grid_003alookup_002dtype-279"></a>Lookup the symbol defined in the alist. If error is non-nil it
&mdash; Function: <b>grid:lookup-type</b><var> symbol alist &amp;optional reverse error<a name="index-grid_003alookup_002dtype-272"></a></var><br>
<blockquote><p><a name="index-grid_003alookup_002dtype-273"></a>Lookup the symbol defined in the alist. If error is non-nil it
should be a string describing the class of types, and this function
will signal an error if the type wasn't found.
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>grid:metadata-slot</b><var> object name<a name="index-grid_003ametadata_002dslot-280"></a></var><br>
<blockquote><p><a name="index-grid_003ametadata_002dslot-281"></a>Access a slot in the foreign-metadata.
&mdash; Macro: <b>grid:metadata-slot</b><var> object name<a name="index-grid_003ametadata_002dslot-274"></a></var><br>
<blockquote><p><a name="index-grid_003ametadata_002dslot-275"></a>Access a slot in the foreign-metadata.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:number-class</b><var> type<a name="index-grid_003anumber_002dclass-282"></a></var><br>
<blockquote><p><a name="index-grid_003anumber_002dclass-283"></a>Find the class corresponding to the numeric type.
&mdash; Function: <b>grid:number-class</b><var> type<a name="index-grid_003anumber_002dclass-276"></a></var><br>
<blockquote><p><a name="index-grid_003anumber_002dclass-277"></a>Find the class corresponding to the numeric type.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:spec-scalar-p</b><var> specification<a name="index-grid_003aspec_002dscalar_002dp-284"></a></var><br>
<blockquote><p><a name="index-grid_003aspec_002dscalar_002dp-285"></a>Specification is for a scalar; if so, return that type.
&mdash; Function: <b>grid:spec-scalar-p</b><var> specification<a name="index-grid_003aspec_002dscalar_002dp-278"></a></var><br>
<blockquote><p><a name="index-grid_003aspec_002dscalar_002dp-279"></a>Specification is for a scalar; if so, return that type.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>grid:st-pointerp</b><var> decl<a name="index-grid_003ast_002dpointerp-286"></a></var><br>
<blockquote><p><a name="index-grid_003ast_002dpointerp-287"></a>If this st represents a pointer, return the type of the object.
&mdash; Function: <b>grid:st-pointerp</b><var> decl<a name="index-grid_003ast_002dpointerp-280"></a></var><br>
<blockquote><p><a name="index-grid_003ast_002dpointerp-281"></a>If this st represents a pointer, return the type of the object.
</p></blockquote></div>
</body></html>
......
......@@ -32,7 +32,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Creating-a-grid.html#Creating-a-grid">C
<hr>
</div>
<p><a name="index-Grid_002c-creation-functions-118"></a><a name="index-Functions-for-creation-of-grids-119"></a>
<p><a name="index-Grid_002c-creation-functions-112"></a><a name="index-Functions-for-creation-of-grids-113"></a>
<h4 class="subsection">4.2.4 Functions for creation of grids</h4>
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">4 Grids</h2>