Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /branches/vis12/doc/diderot.tex
 [diderot] / branches / vis12 / doc / diderot.tex

# Diff of /branches/vis12/doc/diderot.tex

revision 20, Sat Jan 16 17:32:12 2010 UTC revision 22, Thu Jan 21 05:34:09 2010 UTC
# Line 36  Line 36
36  \begin{figure}[t]  \begin{figure}[t]
37    \begin{displaymath}    \begin{displaymath}
38      \begin{array}{rclr}      \begin{array}{rclr}
39        \rho  & ::= & $\ldots$ & \text{NRRD types} \\[1em]        \rho  & ::= & $\ldots$ & \text{NRRD scalar types} \\[1em]
40        \iota & ::= & \TYbool & \text{booleans} \\        \iota & ::= & \TYbool & \text{booleans} \\
41             & \mid & \TYint & \text{integers} \\[1em]             & \mid & \TYint & \text{integers} \\[1em]
42        \theta & ::= & \TYtensor{o}{d} & \text{tensors of order $o$ and dimension $d$} \\[1em]        % \mu for memory, where images of rawtensors will live (or on disk)
43          \mu & ::= & \TYrawten{o}{d}{\rho} & \begin{minipage}[l]{3in}\begin{flushright}
44              tensors of order $o$ and dimension $d$,\\with coefficients of type $\rho$
45              \end{flushright}\end{minipage}\\[1em]
46          \theta & ::= & \TYtensor{o}{d} & \begin{minipage}[l]{3in}\begin{flushright}
47              tensors of order $o$ and dimension $d$,\\with real coefficients
48              \end{flushright}\end{minipage}\\[1em]
49        \tau & ::= & \iota \\        \tau & ::= & \iota \\
50             & \mid & \theta \\             & \mid & \theta \\
51             & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\             & \mid & \TYmatrix{n}{m} & \text{$n\times{}m$ matrix} \\
52             & \mid & \TYimage{d}{\rho} & \text{image of dimension $d$ and $\rho$ elements}\\             & \mid & \TYimage{d}{\mu} & \text{$d$-dimension image of $\mu$ values}\\
53             & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\             & \mid & \TYkern{k} & \text{convolution kernel with $k$ derivatives} \\
54             & \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values and $k$ derivatives} \\             & \mid & \TYfield{k}{d}{\theta} & \text{$d$-dimension field of $\theta$ values with $k$ derivatives} \\
55      \end{array}%      \end{array}%
56    \end{displaymath}%    \end{displaymath}%
57    where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions,    where $o\in\Nat$ is the tensor order, $d,n,m\in\SET{2,3}$ are dimensions,
# Line 62  Line 68
68  \section{Operations}  \section{Operations}
69
70  \subsection{Scalar operations}  \subsection{Scalar operations}
71  \noindent{}Arithmetic:  \noindent{}\point Arithmetic:
72  \begin{displaymath}  \begin{displaymath}
73    \begin{array}{cl}    \begin{array}{cl}
74      \BinopTy{{\odot}}{\tau}{\tau}{\tau}      \BinopTy{{\odot}}{\tau}{\tau}{\tau}
# Line 72  Line 78
78    \end{array}%    \end{array}%
79  \end{displaymath}%  \end{displaymath}%
80
81  \noindent{}Comparisons:  \noindent{}\point Comparisons:
82  \begin{displaymath}  \begin{displaymath}
83    \BinopTy{{\odot}}{\tau}{\tau}{\TYbool}    \BinopTy{{\odot}}{\tau}{\tau}{\TYbool}
84    \qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$}    \qquad\text{for $\odot\in\SET{{<},{\leq},{=},{\neq}{>},{\geq}}$ and $\tau\in\SET{\TYint,\TYreal}$}
# Line 83  Line 89
89
90  \subsection{Tensor operations}  \subsection{Tensor operations}
91
93    \begin{displaymath}
94      \BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
95      \qquad\text{for $\odot\in\SET{{+},{-}}$}
96    \end{displaymath}%
97
98    \noindent{}\point Negation:
99    \begin{displaymath}
100      \UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
101    \end{displaymath}%
102
103    \noindent{}\point Scalar division:
104    \begin{displaymath}
105      \BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}
106    \end{displaymath}%
107
108    \noindent{}\point Scalar multiplication (scalar times order-N):
109  \begin{displaymath}  \begin{displaymath}
110    \begin{array}{c}    \begin{array}{c}
111      \BinopTy{{*}}{\TYreal}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \\      \BinopTy{{?}}{\TYreal}{\TYtensor{o}{d}}{\TYtensor{o}{d}} \\
112      \BinopTy{{*}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}
113    \end{array}%    \end{array}%
114  \end{displaymath}%  \end{displaymath}%
115    Possible direct notation syntax (TBD): ~~ {\tt *} ~~  '' (space)
116
117  \noindent{}Scalar division:  \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  \begin{displaymath}  \begin{displaymath}
121    \BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}    \begin{array}{c}
122        \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYreal}
123      \end{array}%
124  \end{displaymath}%  \end{displaymath}%
125    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
132  \noindent{}Addition:  \noindent{}\point Tensor product (aka outer product; order output is sum of orders)
133  \begin{displaymath}  \begin{displaymath}
134    \BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}    \begin{array}{c}
135    \qquad\text{for $\odot\in\SET{{+},{-}}$}      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{p}{d}}{\TYtensor{o+p}{d}}
136      \end{array}%
137  \end{displaymath}%  \end{displaymath}%
138    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
141  \noindent{}Negation:  \noindent{}\point Matrix Multiply
142  \begin{displaymath}  \begin{displaymath}
143    \UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}}    \begin{array}{c}
144        \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{2}{d}}{\TYtensor{o}{d}} \\
145        \BinopTy{{?}}{\TYtensor{2}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}
146      \end{array}%
147  \end{displaymath}%  \end{displaymath}%
148    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
152    \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        \BinopTy{{?}}{\TYtensor{o}{d}}{\TYvec{d}}{\TYtensor{o-1}{d}} \\
157        \BinopTy{{?}}{\TYvec{d}}{\TYtensor{o}{d}}{\TYtensor{o-1}{d}}
158      \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        \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{p}{d}}{\TYtensor{q}{d}}
169      \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  \subsection{Field operations}  \subsection{Field operations}
175
176  \noindent{}Creation from an image:  \noindent{}\point Creation from an image:
177  \begin{displaymath}  \begin{displaymath}
178    \BinopTy{\OPsample}{\TYkern{k}}{\TYimage{d}{\rho}}{\TYfield{k}{d}{\theta}}    \BinopTy{\OPconvolve}{\TYkern{k}}{\TYimage{d}{\TYrawten{o}{d}{\rho}}}{\TYfield{k}{d}{\TYtensor{o}{d}}}
\qquad\text{where $\theta$ is the real conversion of $\rho$.}
179  \end{displaymath}%  \end{displaymath}%
180
181  \noindent{}Scalar multiplication:  \noindent{}\point Scalar multiplication:
182  \begin{displaymath}  \begin{displaymath}
183    \begin{array}{c}    \begin{array}{c}
184      \BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\      \BinopTy{{*}}{\TYreal}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}} \\
# Line 123  Line 186
186    \end{array}%    \end{array}%
187  \end{displaymath}%  \end{displaymath}%
188
189  \noindent{}Scalar division:  \noindent{}\point Scalar division:
190  \begin{displaymath}  \begin{displaymath}
191    \BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}}    \BinopTy{{/}}{\TYfield{k}{d}{\theta}}{\TYreal}{\TYfield{k}{d}{\theta}}
192  \end{displaymath}%  \end{displaymath}%
193
195  \begin{displaymath}  \begin{displaymath}
196      \UnopTy{-}{\TYfield{k}{d}{\theta}}{\TYfield{k}{d}{\theta}}
197    \end{displaymath}%
198
200    \begin{displaymath}
201      \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    \BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}}    \BinopTy{{\odot}}{\TYfield{k_1}{d}{\theta}}{\TYfield{k_2}{d}{\theta}}{\TYfield{\min(k_1,k_2)}{d}{\theta}}
205      \end{array}%
206    \qquad\text{for $\odot\in\SET{{+},{-}}$}    \qquad\text{for $\odot\in\SET{{+},{-}}$}
207  \end{displaymath}%  \end{displaymath}%
208
209  \noindent{}Differentiation:  \noindent{}\point Differentiation:
210  \begin{displaymath}  \begin{displaymath}
211    \UnopTy{\OPdiff}{\TYfield{k}{d}{\TYtensor{o}{d}}}{\TYfield{k-1}{d}{\TYtensor{o+1}{d}}}    \UnopTy{\OPdiff}{\TYfield{k}{d}{\TYtensor{o}{d}}}{\TYfield{k-1}{d}{\TYtensor{o+1}{d}}}
212    \qquad\text{for $k > 0$}    \qquad\text{for $k > 0$}
213  \end{displaymath}%  \end{displaymath}%
214
215  \noindent{}Probing:  \noindent{}\point Probing:
216  \begin{displaymath}  \begin{displaymath}
217    \BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta}    \BinopTy{@}{\TYfield{k}{d}{\theta}}{\TYvec{d}}{\theta}
218  \end{displaymath}%  \end{displaymath}%
219
\noindent{}Tensor arithmetic:
\begin{displaymath}
\begin{array}{c}
\BinopTy{{\odot}}{\TYfield{k}{d}{\tau}}{\tau}{\TYfield{k}{d}{\tau}} \\
\BinopTy{{\odot}}{\tau}{\TYfield{k}{d}{\tau}}{\TYfield{k}{d}{\tau}}
\end{array}  \qquad\text{for $\odot\in\SET{{+},{-}}$}
\end{displaymath}%

220  \end{document}  \end{document}

Legend:
 Removed from v.20 changed lines Added in v.22