The listoflist Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The listoflist Reference Manual

This is the listoflist Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:01:43 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction


* Overview 

  The LISTOFLIST package (depends on xarray) contains functions and
  methods for handling list-of-lists as array substitutes as well as
  conversions between the two data structures.  The general API is
  that of XARRAY, but we have added a few convenience functions, as
  well. 

  This is part of the core suite of Common Lisp Statistics System
  (CLS) packages.

* Tasks to do

Originally the following was in the TODO.lisp file.

#+name: Header
#+begin_src lisp :tangle "TODO.lisp"
;;; -*- mode: lisp -*-
;;; Time-stamp: <2012-10-06 09:16:41 tony>
;;; Creation:   <2009-12-10 08:10:39 tony>
;;; File:       TODO.lisp
;;; Author:     AJ Rossini 
;;; Copyright:  (c)2009--, AJ Rossini.  See file LICENSE.mit in
;;;             top-level directory for information.
;;; Purpose:    development support and short-term memory. 

;;; What is this talk of 'release'? Klingons do not make software
;;; 'releases'.  Our software 'escapes', leaving a bloody trail of
;;; designers and quality assurance people in its wake.

;;; This organization and structure is new to the 21st Century
;;; version..   Think, "21st Century Schizoid Man".

#+end_src

* Initialization

#+NAME LoadingLOL
#+BEGIN_SRC lisp :tangle "TODO.lisp"
  (in-package :cl-user)
  (asdf:oos 'asdf:compile-op :listoflist :force t)
;;  (asdf:oos 'asdf:load-op :listoflist)
;;  (ql:quicklisp :listoflist)
#+END_SRC

* Snips to repair and solve

** Unit tests

#+NAME UnitTestExec
#+BEGIN_SRC lisp :tangle "TODO.lisp"
(in-package :listoflist-unittests)
;; (describe (run-tests :suite 'lol-ut))   ;; only from commandline
(run-tests :suite 'lol-ut)
#+END_SRC

#+RESULTS:
: #



** Example Use

#+NAME Examples
#+BEGIN_SRC lisp :tangle "TODO.lisp"
(in-package :lol-user)

(listoflistp '((0d0  1d0  2d0  3d0)
	       (10d0 11d0 12d0 13d0)))
(listoflistp (list (list 0d0  1d0  2d0  3d0)
		   (list 10d0 11d0 12d0 13d0)))
#+END_SRC

* Discussion




Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 listoflist

Author

AJ Rossini

License

MIT

Description

makes listoflist an xarray’able data structure.

Dependencies
Source

listoflist.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Next: , Previous: , Up: Modules   [Contents][Index]

3.1 listoflist/src

Parent

listoflist (system)

Location

src/

Components

Previous: , Up: Modules   [Contents][Index]

3.2 listoflist/unittest

Dependency

src (module)

Parent

listoflist (system)

Location

src/

Component

unittests.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 listoflist.asd

Location

listoflist.asd

Systems

listoflist (system)

Packages

listoflist-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 listoflist/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 listoflist/src/listoflist.lisp

Dependency

package.lisp (file)

Parent

src (module)

Location

src/listoflist.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.4 listoflist/unittest/unittests.lisp

Parent

unittest (module)

Location

src/unittests.lisp


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 listoflist-asd

Source

listoflist.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 listoflist-unittests

unit-testing structure for LISTOFLIST using LIFT.

Source

package.lisp (file)

Nicknames
Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.3 listoflist-user

verification, sandbox, and illustration package for LISTOFLIST.

Source

package.lisp (file)

Nickname

lol-user

Use List

Previous: , Up: Packages   [Contents][Index]

5.4 listoflist

XARRAY support for list-of-list data structures.

Source

package.lisp (file)

Nickname

lol

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Functions

Function: equal-listoflist X Y

FIXME: This function, when written, should walk through 2 listoflists and return T/nil based on equality.

Package

listoflist

Source

listoflist.lisp (file)

Function: listoflist->array LOL &key TYPE

From a listoflists structure, make an array.

FIXME: need to verify that the listoflists is a valid structure (same size rows, typing if required, etc.

<example>
(defparameter *mdfl-test*
(list (list ’a 1 2.1)
(list ’b 2 1.1)
(list ’c 1 2.0)
(list ’d 2 3.0)))
(length *mdfl-test*)
(length (elt *mdfl-test* 0))

(defparameter *mdfl-test-dt* (make-datatable-from-listoflists *mdfl-test*)) (array-dimensions *mdfl-test-dt*)
</example>

Package

listoflist

Source

listoflist.lisp (file)

Function: listoflistp LISTS

Test for conformance of structure: list whose sublists are of the same size (if ragged is T, then just test that list has elements of type list).

FIXME: should have a flag to verify equivalence of types in case needed to map to a RHO:DATA-FRAME.

Package

listoflist

Source

listoflist.lisp (file)

Function: sublists-of-same-size-p LISTS

Take a list of list, and verify that the sublists are all of the same size. returns size-of-sublist if all sublists same size, otherwise nil

Package

listoflist

Source

listoflist.lisp (file)

Function: transpose-listoflist LISTOFLIST

This function does the moral-equivalent of a matrix transpose on a rectangular list-of-lists data structure.

Assumes listoflist is rectangular, need to see what happens if ragged (or at least check). Could use the listoflistp predicate to confirm.

Package

listoflist

Source

listoflist.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Functions

Function: array->listoflist ARR &key TYPE

FIXME: need to write this.

Package

listoflist

Source

listoflist.lisp (file)

Function: carray*-lol DIMENSIONS &rest ELEMENTS

Return a (simple-array element-type dimensions) containing elements, coerced to element-type, where the elemen-type is obtained using numeric-type-classifier.

Package

listoflist

Source

listoflist.lisp (file)

Function: carray-lol ELEMENT-TYPE DIMENSIONS &rest ELEMENTS

Return a (simple-array element-type dimensions) containing elements, coerced to element-type.

Package

listoflist

Source

listoflist.lisp (file)

Function: cvector*-lol &rest ELEMENTS

Return a (simple-array element-type (*)) containing elements, coerced to element-type, where the elemen-type is obtained using numeric-type-classifier.

Package

listoflist

Source

listoflist.lisp (file)

Function: fill-array-with-list ARRAY LIST

Fills array with elements from list, coerced to the appropriate type. No error checking, meant to be used internally. Return array.

Package

listoflist

Source

listoflist.lisp (file)

Function: listoflists-dimensions LOL

We assume row-major, that is each sublist denotes a row, and columns are formed by taking the jth element from each list to form the jth column

Package

listoflist

Source

listoflist.lisp (file)

Function: listsoflists-consistent-dimensions-p &rest LIST-OF-LIST-NAMES

Check if the lengths of the lists are equal (T, otherwise NIL), to justify further processing and initial conditions.

Package

listoflist

Source

listoflist.lisp (file)

Function: numeric-type-classifier LIST

Numeric type classifier, finds the smallest subtype that can accomodate the elements of list, in the ordering fixnum < integer < float < complex < t. Rational, float (any kind) are classified as double-float, and complex numbers as (complex double-float). Meant to be used by simple array-constructing functions. Upgraded-array-element-type is called on end result.

Package

listoflist

Source

listoflist.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, listoflist.asd: The listoflist<dot>asd file
File, Lisp, listoflist/src/listoflist.lisp: The listoflist/src/listoflist<dot>lisp file
File, Lisp, listoflist/src/package.lisp: The listoflist/src/package<dot>lisp file
File, Lisp, listoflist/unittest/unittests.lisp: The listoflist/unittest/unittests<dot>lisp file

L
Lisp File, listoflist.asd: The listoflist<dot>asd file
Lisp File, listoflist/src/listoflist.lisp: The listoflist/src/listoflist<dot>lisp file
Lisp File, listoflist/src/package.lisp: The listoflist/src/package<dot>lisp file
Lisp File, listoflist/unittest/unittests.lisp: The listoflist/unittest/unittests<dot>lisp file
listoflist.asd: The listoflist<dot>asd file
listoflist/src: The listoflist/src module
listoflist/src/listoflist.lisp: The listoflist/src/listoflist<dot>lisp file
listoflist/src/package.lisp: The listoflist/src/package<dot>lisp file
listoflist/unittest: The listoflist/unittest module
listoflist/unittest/unittests.lisp: The listoflist/unittest/unittests<dot>lisp file

M
Module, listoflist/src: The listoflist/src module
Module, listoflist/unittest: The listoflist/unittest module

Jump to:   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   C   E   F   L   N   S   T  
Index Entry  Section

A
array->listoflist: Internal functions

C
carray*-lol: Internal functions
carray-lol: Internal functions
cvector*-lol: Internal functions

E
equal-listoflist: Exported functions

F
fill-array-with-list: Internal functions
Function, array->listoflist: Internal functions
Function, carray*-lol: Internal functions
Function, carray-lol: Internal functions
Function, cvector*-lol: Internal functions
Function, equal-listoflist: Exported functions
Function, fill-array-with-list: Internal functions
Function, listoflist->array: Exported functions
Function, listoflistp: Exported functions
Function, listoflists-dimensions: Internal functions
Function, listsoflists-consistent-dimensions-p: Internal functions
Function, numeric-type-classifier: Internal functions
Function, sublists-of-same-size-p: Exported functions
Function, transpose-listoflist: Exported functions

L
listoflist->array: Exported functions
listoflistp: Exported functions
listoflists-dimensions: Internal functions
listsoflists-consistent-dimensions-p: Internal functions

N
numeric-type-classifier: Internal functions

S
sublists-of-same-size-p: Exported functions

T
transpose-listoflist: Exported functions

Jump to:   A   C   E   F   L   N   S   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   L   P   S  
Index Entry  Section

L
listoflist: The listoflist system
listoflist: The listoflist package
listoflist-asd: The listoflist-asd package
listoflist-unittests: The listoflist-unittests package
listoflist-user: The listoflist-user package

P
Package, listoflist: The listoflist package
Package, listoflist-asd: The listoflist-asd package
Package, listoflist-unittests: The listoflist-unittests package
Package, listoflist-user: The listoflist-user package

S
System, listoflist: The listoflist system

Jump to:   L   P   S