improved packaging in anticipatin for correcting my split of packages.
[CommonLispStat.git] / src / packages.lisp
blobf8e1eabc356a784a4d34f92aceb0d8811b8026b6
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2008-10-03 02:38:51 tony>
4 ;;; Creation: <2008-03-11 19:18:34 user>
5 ;;; File: packages.lisp
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c)2007--2008, AJ Rossini. BSD, LLGPL, or GPLv2, depending
8 ;;; on how it arrives.
9 ;;; Purpose: package structure description for lispstat
11 ;;; What is this talk of 'release'? Klingons do not make software
12 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
13 ;;; designers and quality assurance people in its wake.
15 ;;; This organization and structure is new to the 21st Century
16 ;;; version.
18 (in-package :cl-user)
20 ;;; LispStat Basics
22 (defpackage :lisp-stat-basics
23 (:use :common-lisp
24 :lisp-stat-object-system
25 :lisp-stat-types
26 :lisp-stat-float
27 :lisp-stat-macros
28 :lisp-stat-compound-data)
29 (:shadowing-import-from :lisp-stat-object-system
30 slot-value call-method call-next-method)
31 (:export permute-array sum prod count-elements mean
32 if-else sample))
35 ;;;
39 (defpackage :lisp-stat-float
40 (:use :common-lisp)
41 (:export +stat-float-typing+ +stat-cfloat-typing+ +stat-float-template+
42 machine-epsilon base-float makedouble
44 make-base-trans-fun-2 make-base-trans-fun
46 BASE-LOG BASE-EXP BASE-EXPT BASE-SQRT BASE-SIN BASE-COS
47 BASE-TAN BASE-ASIN BASE-ACOS BASE-ATAN BASE-SINH
48 BASE-COSH BASE-TANH BASE-ASINH BASE-ACOSH BASE-ATANH
49 BASE-ABS BASE-PHASE BASE-FFLOOR BASE-FCEILING BASE-FTRUNCATE
50 BASE-FROUND BASE-SIGNUM BASE-CIS))
52 ;;;
54 (defpackage :lisp-stat-macros
55 (:use :common-lisp
56 :lisp-stat-compound-data)
57 (:export make-rv-function make-rv-function-1))
59 ;;; NEW CLOS STRUCTURE
61 (defpackage :lisp-stat-data-clos
62 (:use :common-lisp
63 :lisp-matrix)
64 (:export get-variable-matrix get-variable-vector
65 ;; generic container class for data -- if small enough
66 ;; could be value, otherwise might be reference.
67 data-pointer))
69 (defpackage :lisp-stat-regression-linear-clos
70 (:use :common-lisp
71 :lisp-matrix
72 :lisp-stat-data-clos)
73 (:export regression-model))
77 ;;; USER PACKAGES
79 (defpackage :lisp-stat
80 (:documentation "Experimentation package for LispStat. Serious work
81 should be packaged up elsewhere for reproducibility.")
82 (:use :common-lisp
83 :lisp-stat-object-system
84 :lisp-stat-compound-data
85 :lisp-stat-probability
86 :lisp-stat-types
87 :lisp-stat-float
88 :lisp-stat-basics
89 :lisp-stat-data
90 :lisp-stat-math
91 :lisp-stat-matrix
92 :lisp-stat-linalg
93 :lisp-stat-descriptive-statistics
94 :lisp-stat-regression-linear)
95 (:shadowing-import-from :lisp-stat-object-system
96 slot-value call-method call-next-method)
97 (:shadowing-import-from :lisp-stat-math
98 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
99 asin acos atan sinh cosh tanh asinh acosh atanh float random
100 truncate floor ceiling round minusp zerop plusp evenp oddp
101 < <= = /= >= > ;;complex
102 conjugate realpart imagpart phase
103 min max logand logior logxor lognot ffloor fceiling
104 ftruncate fround signum cis)
105 (:export
106 ;; lsobjects :
107 defproto defproto2
108 defmeth send
110 ;; lstypes :
111 fixnump check-nonneg-fixnum check-one-fixnum
112 check-one-real check-one-number
114 ;; lsmacros:
116 ;; lsfloat :
117 machine-epsilon
119 ;; compound :
120 compound-data-p *compound-data-proto* compound-object-p
121 compound-data-seq compound-data-length
122 element-list element-seq
123 sort-data order rank
124 recursive-map-elements map-elements
125 repeat
126 check-sequence
127 get-next-element make-next-element set-next-element
128 sequencep iseq
129 ordered-nneg-seq
130 select which
131 difference rseq
133 ;; lsmath.lsp
134 ^ ** expt + - * / mod rem pmin pmax abs 1+ 1- log exp sqrt sin cos
135 tan asin acos atan sinh cosh tanh asinh acosh atanh float random
136 truncate floor ceiling round minusp zerop plusp evenp oddp < <= =
137 /= >= > ;; complex
138 conjugate realpart imagpart phase min max
139 logand logior logxor lognot ffloor fceiling ftruncate fround
140 signum cis
142 ;; matrices.lisp
143 matrixp num-rows num-cols matmult identity-matrix diagonal row-list
144 column-list inner-product outer-product cross-product transpose
145 bind-columns bind-rows
147 ;; linalg.lisp
148 chol-decomp lu-decomp lu-solve determinant inverse
149 sv-decomp qr-decomp rcondest make-rotation spline
150 kernel-dens kernel-smooth
151 fft make-sweep-matrix sweep-operator ax+y eigen
152 check-real
153 covariance-matrix matrix print-matrix solve
154 backsolve eigenvalues eigenvectors accumulate cumsum combine
155 lowess
157 ;; in linalg.lisp, possibly not supported by matlisp
158 spline kernel-dens kernel-smooth
160 ;; optimize.lsp
161 newtonmax nelmeadmax
163 ;; lispstat-macros
164 make-rv-function make-rv-function-1
166 ;; data.lisp
167 open-file-dialog read-data-file read-data-columns load-data
168 load-example *variables* *ask-on-redefine*
169 def variables savevar undef
171 ;; statistics.lsp
172 standard-deviation quantile median interquartile-range
173 fivnum sample
175 ;; dists
176 log-gamma set-seed
177 uniform-rand normal-cdf normal-quant normal-dens
178 normal-rand bivnorm-cdf cauchy-cdf cauchy-quant cauchy-dens
179 cauchy-rand gamma-cdf gamma-quant gamma-dens gamma-rand
180 chisq-cdf chisq-quant chisq-dens chisq-rand beta-cdf beta-quant
181 beta-dens beta-rand t-cdf t-quant t-dens t-rand f-cdf f-quant
182 f-dens f-rand poisson-cdf poisson-quant poisson-pmf poisson-rand
183 binomial-cdf binomial-quant binomial-pmf binomial-rand
185 ;;; Here is where we have a problem -- lispstat core should be core
186 ;;; data management and config problems, with packages providing
187 ;;; specialized extensions to LispStat, i.e. regression, nonlin
188 ;;; regression, bayesian regression via laplace approximation, etc.
190 ;;; The following could be considered "recommended packages", similar
191 ;;; to the idea of the recommended packages in R.
193 ;; regression.lsp
194 regression-model regression-model-proto x y intercept sweep-matrix
195 basis weights included total-sum-of-squares residual-sum-of-squares
196 predictor-names response-name case-labels
198 ;; nonlin.lsp
199 nreg-model nreg-model-proto mean-function theta-hat epsilon
200 count-limit verbose
202 ;; bayes.lsp
203 bayes-model bayes-model-proto bayes-internals))
207 (defpackage :lisp-stat-user
208 (:documentation "Experimentation package for LispStat.
209 Serious work should be placed in a similar package elsewhere for
210 reproducibility. But this should hint as to what needs to be
211 done for a user- or analysis-package.")
212 (:nicknames :ls-user)
213 (:use :common-lisp
214 :lisp-stat)
215 (:shadowing-import-from :lisp-stat
216 slot-value call-method call-next-method
218 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
219 asin acos atan sinh cosh tanh asinh acosh atanh float random
220 truncate floor ceiling round minusp zerop plusp evenp oddp
221 < <= = /= >= > > ;; complex
222 conjugate realpart imagpart phase
223 min max logand logior logxor lognot ffloor fceiling
224 ftruncate fround signum cis
226 <= float imagpart))