Next: , Previous: Internals, Up: Internals


10.1 Foreign Library Kit

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 ‘foo’ and ‘bar’ both define a singular value decomposition (SVD), they would use the function names foo:sv-decomposition and bar:sv-decomposition, 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.

To facilitate the exchange of foreign arrays, the class grid:foreign-array has a slot grid::foreign-metadata. 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.