hints on directory standards.
[CommonLispStat.git] / src / procedures / template.lisp
blobf5a96d9097a1831baad0428ff3b9a60e7f2a9988
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-10-09 12:01:02 tony>
4 ;;; Creation: <2009-03-12 17:14:56 tony>
5 ;;; File: template.lisp
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c)2009--, AJ Rossini. Currently licensed under MIT
8 ;;; license. See file LICENSE.mit in top-level directory
9 ;;; for information.
10 ;;; Purpose: Template header file for Statistical Procedures
12 ;;; What is this talk of 'release'? Klingons do not make software
13 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
14 ;;; designers and quality assurance people in its wake.
16 ;;; This organization and structure is new to the 21st Century
17 ;;; version.. Think, "21st Century Schizoid Man".
19 (in-package :cls-statproc)
21 ;;; Basic Idea: do a grep-and-replace to identify the procedure as a
22 ;;; new procedure. The name of the procedure should not use "/" as
23 ;;; part of the identifier. (for example,
24 ;;; M-x query-replace procedure t-test
26 ;;; Set up the data and metadata requirements (input components)
27 (define-statistical-proc-metadata procedure/metadata ())
29 ;;; Set up the procedure class (processing)
30 (define-statistical-proc-class procedure/class ())
32 ;;; Set up the class for the results (output components)
33 (define-statistical-proc-results procedure/results ()
34 '((:variables '(var1 var2 ...))
35 (:evaluate '(defun proc (var1 var2 ...) "doc-string" t))
36 (:return-form '())
37 (:documentation "...")))
42 ;;; Define how the generics should work with this
43 (defmethod print-object ((obj procedure/class)))
44 (defmethod print-object ((obj procedure/results)))
45 (defmethod print-object ((obj procedure/metadata)))
48 (defmethod proc-consistent-data-p ((metadata procedure/metadata)
49 (data dataframe-like)))
51 (defmethod process-data ((obj procedure/class)
52 (data dataframe-like)))
55 (defmethod display-results ((results procedure/results)))
57 (defmethod print-results ((results procedure/results)))
59 (defmethod visualize-results ((results procedure/results)))
61 (defmethod simulate-data-from-results ((results procedure/results)
62 &key (newdata (obj2 procedure/data))))
64 (defmethod simulate-data-from-proc ((obj procedure/results)))