Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /branches/vis12/doc/diderot.tex
ViewVC logotype

Annotation of /branches/vis12/doc/diderot.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 43 - (view) (download) (as text)
Original Path: trunk/doc/diderot.tex

1 : jhr 16 \documentclass[11pt]{article}
2 :    
3 :     \input{defs}
4 :    
5 :     \setlength{\textwidth}{6in}
6 :     \setlength{\oddsidemargin}{0.25in}
7 :     \setlength{\evensidemargin}{0.25in}
8 :     \setlength{\parskip}{5pt}
9 :    
10 : jhr 17 \title{Diderot design}
11 : jhr 16 \author{
12 :     Gordon Kindlmann \\
13 :     University of Chicago \\
14 :     {\small\tt{}glk@cs.uchicago.edu} \\
15 :     \and
16 :     John Reppy \\
17 :     University of Chicago \\
18 :     {\small\tt{}jhr@cs.uchicago.edu} \\
19 : jhr 17 \and
20 :     Thomas Schultz \\
21 :     University of Chicago \\
22 :     {\small\tt{}t.schultz@uchicago.edu} \\
23 : jhr 16 }
24 :     \date{\today}
25 :    
26 :     \begin{document}
27 :    
28 :     \maketitle
29 :     \thispagestyle{empty}
30 :    
31 :     \section{Introduction}
32 : glk 20 This document is a semi-formal design of Diderot.
33 : jhr 16
34 :     \section{Types}
35 : jhr 17 The syntax of Diderot types is given in \figref{fig:types}.
36 :     \begin{figure}[t]
37 :     \begin{displaymath}
38 :     \begin{array}{rclr}
39 : glk 21 \rho & ::= & $\ldots$ & \text{NRRD scalar types} \\[1em]
40 : jhr 17 \iota & ::= & \TYbool & \text{booleans} \\
41 :     & \mid & \TYint & \text{integers} \\[1em]
42 : glk 21 % \mu for memory, where images of rawtensors will live (or on disk)
43 : jhr 43 \mu & ::= & \TYrawten{\Seq{d}}{\rho} & \begin{minipage}[l]{3in}\begin{flushright}
44 : glk 21 tensors of order $o$ and dimension $d$,\\with coefficients of type $\rho$
45 :     \end{flushright}\end{minipage}\\[1em]
46 : jhr 43 \theta & ::= & \TYtensor{\Seq{d}} & \begin{minipage}[l]{3in}\begin{flushright}
47 : glk 21 tensors of order $o$ and dimension $d$,\\with real coefficients
48 :     \end{flushright}\end{minipage}\\[1em]
49 : jhr 17 \tau & ::= & \iota \\
50 :     & \mid & \theta \\
51 :     & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\
52 : glk 21 & \mid & \TYimage{d}{\mu} & \text{$d$-dimension image of $\mu$ values}\\
53 : jhr 17 & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\
54 : glk 21 & \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values with $k$ derivatives} \\
55 : jhr 17 \end{array}%
56 :     \end{displaymath}%
57 :     where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions,
58 :     and $k\in\Nat$ is the differentiability of a field.
59 :     \caption{Diderot types}
60 :     \label{fig:types}
61 :     \end{figure}%
62 :     We use some type abbreviations for common cases:
63 : jhr 16 \begin{eqnarray*}
64 : jhr 43 \TYreal & = & \TYtensor{\epsilon} \quad\text{for any $d$} \\
65 :     \TYvec{d} & = & \TYtensor{d}
66 : jhr 16 \end{eqnarray*}%
67 :    
68 :     \section{Operations}
69 :    
70 :     \subsection{Scalar operations}
71 : glk 22 \noindent{}\point Arithmetic:
72 : jhr 16 \begin{displaymath}
73 : jhr 17 \begin{array}{cl}
74 :     \BinopTy{{\odot}}{\tau}{\tau}{\tau}
75 :     & \text{for $\odot\in\SET{{+},{-},{*},{/}}$ and $\tau\in\SET{\TYint,\TYreal}$} \\
76 :     \UnopTy{{-}}{\tau}{\tau}
77 :     & \text{for $\tau\in\SET{\TYint,\TYreal}$}
78 :     \end{array}%
79 : jhr 16 \end{displaymath}%
80 :    
81 : glk 22 \noindent{}\point Comparisons:
82 : jhr 16 \begin{displaymath}
83 :     \BinopTy{{\odot}}{\tau}{\tau}{\TYbool}
84 :     \qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$}
85 :     \end{displaymath}%
86 :    
87 :    
88 :     \subsection{Matrix operations}
89 :    
90 :     \subsection{Tensor operations}
91 :    
92 : glk 22 \noindent{}\point Addition:
93 : jhr 16 \begin{displaymath}
94 : jhr 43 \BinopTy{{\odot}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}
95 : glk 22 \qquad\text{for $\odot\in\SET{{+},{-}}$}
96 :     \end{displaymath}%
97 :    
98 :     \noindent{}\point Negation:
99 :     \begin{displaymath}
100 : jhr 43 \UnopTy{-}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}
101 : glk 22 \end{displaymath}%
102 :    
103 :     \noindent{}\point Scalar division:
104 :     \begin{displaymath}
105 : jhr 43 \BinopTy{{/}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}}
106 : glk 22 \end{displaymath}%
107 :    
108 :     \noindent{}\point Scalar multiplication (scalar times order-N):
109 :     \begin{displaymath}
110 : jhr 16 \begin{array}{c}
111 : jhr 43 \BinopTy{{?}}{\TYreal}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}} \\
112 :     \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}}
113 : jhr 16 \end{array}%
114 :     \end{displaymath}%
115 : glk 22 Possible direct notation syntax (TBD): ~~ {\tt *} ~~ `` '' (space)
116 : jhr 16
117 : glk 22 \noindent{}\point Tensor scalar multiplication (contraction of two order-N
118 :     tensors down to a scalar, \eg{} dot product of vectors, double dot
119 :     product of 2nd-order tensors)
120 : jhr 17 \begin{displaymath}
121 : glk 22 \begin{array}{c}
122 : jhr 43 \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}{\TYreal}
123 : glk 22 \end{array}%
124 : jhr 17 \end{displaymath}%
125 : glk 22 Defined by $c = A_{\vec{i}}B_{\vec{i}}$
126 :     ~(\eg{} $\mathbf{a}\cdot\mathbf{b} = a_ib_i$ or $\mathbf{A:B} = A_{ij}B_{ij}$)
127 :     NOTE: In this and subsequent index notation expressions, a vector over the index variable
128 :     (\eg{} $\vec{i}$) means that the variable is in fact standing for a sequence of
129 :     contiguous index variables \\
130 :     Possible direct notation syntax: ~~ {\tt .} (period) ~~ {\tt :} (colon) ~~ {\tt dot} ~~ {\tt o}
131 : jhr 17
132 : glk 22 \noindent{}\point Tensor product (aka outer product; order output is sum of orders)
133 : jhr 16 \begin{displaymath}
134 : glk 22 \begin{array}{c}
135 : jhr 43 \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d'}}}{\TYtensor{\Seq{d}\Seq{d'}}}
136 : glk 22 \end{array}%
137 : jhr 16 \end{displaymath}%
138 : glk 22 Defined by $C_{\vec{i}\vec{j}} = A_{\vec{i}}B_{\vec{j}}$ \\
139 :     Possible direct notation syntax: ~~ {\tt x} ~~ {\tt (x)} ~~ {\tt out}
140 : jhr 16
141 : glk 22 \noindent{}\point Matrix Multiply
142 : jhr 17 \begin{displaymath}
143 : glk 22 \begin{array}{c}
144 : jhr 43 \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{d_1 d_2}}{\TYtensor{\Seq{d}}} \\
145 :     \BinopTy{{?}}{\TYtensor{d_1 d_2}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}
146 : glk 22 \end{array}%
147 : jhr 17 \end{displaymath}%
148 : glk 22 Defined by $C_{i\vec{k}} = A_{ij}B_{j\vec{k}}$ and $C_{\vec{i}k} = B_{\vec{i}j}A_{jk}$
149 :     ~(\eg{} $u_i = M_{ij}v_j$ or $T_{ijl} = S_{ijk}M_{kl}$) \\
150 :     Possible direct notation syntax: ~~ ?
151 : jhr 17
152 : glk 22 \noindent{}\point Contracting out last or first index of tensor (order $o \geq 1$)
153 :     with vector
154 :     \begin{displaymath}
155 :     \begin{array}{c}
156 : jhr 43 \BinopTy{{?}}{\TYtensor{d'\Seq{d}}}{\TYvec{d}}{\TYtensor{\Seq{d}}} \\
157 :     \BinopTy{{?}}{\TYvec{d}}{\TYtensor{d'\Seq{d}}}{\TYtensor{\Seq{d}}}
158 : glk 22 \end{array}%
159 :     \end{displaymath}%
160 :     Defined by $C_{\vec{i}} = A_{\vec{i}j}v_j$ and $C_{\vec{j}} = v_iA_{j\vec{j}}$ \\
161 :     Possible direct notation syntax: ~~ ?
162 :    
163 :     \noindent{}\point Arbitrary ``tensor comprehension''. The product can also be
164 :     expressed in general index notation, and which may increase, preserve, or
165 :     decrease the tensor order.
166 :     \begin{displaymath}
167 :     \begin{array}{c}
168 : jhr 43 \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{p}{d}}{\TYtensor{q}{d}}
169 : glk 22 \end{array}%
170 :     \end{displaymath}%
171 :     Defined by the conventions of Einstein summation notation. \\
172 :     Possible syntax: {\tt <A.i.j.k,B.j.k.l>} ~~ {\tt <A\_i\_j\_k,B\_j\_k\_l>}
173 :    
174 : jhr 16 \subsection{Field operations}
175 :    
176 : glk 22 \noindent{}\point Creation from an image:
177 : jhr 16 \begin{displaymath}
178 : jhr 43 \BinopTy{\OPconvolve}{\TYkern{k}}{\TYimage{d'}{\TYrawten{\Seq{d}}{\rho}}}{\TYfield{k}{d'}{\TYtensor{\Seq{d}}}}
179 : jhr 16 \end{displaymath}%
180 :    
181 : glk 22 \noindent{}\point Scalar multiplication:
182 : jhr 17 \begin{displaymath}
183 :     \begin{array}{c}
184 :     \BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\
185 :     \BinopTy{{*}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}}
186 :     \end{array}%
187 :     \end{displaymath}%
188 :    
189 : glk 22 \noindent{}\point Scalar division:
190 : jhr 17 \begin{displaymath}
191 :     \BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}}
192 :     \end{displaymath}%
193 :    
194 : glk 22 \noindent{}\point Negation:
195 : glk 21 \begin{displaymath}
196 :     \UnopTy{-}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}}
197 :     \end{displaymath}%
198 :    
199 : glk 22 \noindent{}\point Addition:
200 : jhr 16 \begin{displaymath}
201 : glk 21 \begin{array}{c}
202 :     \BinopTy{{\odot}}{\TYfield{k}{d}{\theta}}{\theta}{\TYfield{k}{d}{\theta}} \\
203 :     \BinopTy{{\odot}}{\theta}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\
204 : jhr 17 \BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}}
205 : glk 21 \end{array}%
206 : jhr 16 \qquad\text{for $\odot\in\SET{{+},{-}}$}
207 :     \end{displaymath}%
208 :    
209 : glk 22 \noindent{}\point Differentiation:
210 : jhr 16 \begin{displaymath}
211 : jhr 43 \UnopTy{\OPdiff}{\TYfield{k}{d'}{\TYtensor{\Seq{d}}}}{\TYfield{k-1}{d'}{\TYtensor{d'\Seq{d}}}}
212 : jhr 16 \qquad\text{for $k > 0$}
213 :     \end{displaymath}%
214 :    
215 : glk 22 \noindent{}\point Probing:
216 : jhr 16 \begin{displaymath}
217 : jhr 17 \BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta}
218 : jhr 16 \end{displaymath}%
219 :    
220 :     \end{document}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0