Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /trunk/doc/diderot.tex
 [diderot] / trunk / doc / diderot.tex

# Diff of /trunk/doc/diderot.tex

revision 22, Thu Jan 21 05:34:09 2010 UTC revision 43, Fri Mar 12 04:28:29 2010 UTC
# Line 40  Line 40
40        \iota & ::= & \TYbool & \text{booleans} \\        \iota & ::= & \TYbool & \text{booleans} \\
41             & \mid & \TYint & \text{integers} \\[1em]             & \mid & \TYint & \text{integers} \\[1em]
42        % \mu for memory, where images of rawtensors will live (or on disk)        % \mu for memory, where images of rawtensors will live (or on disk)
43        \mu & ::= & \TYrawten{o}{d}{\rho} & \begin{minipage}[l]{3in}\begin{flushright}        \mu & ::= & \TYrawten{\Seq{d}}{\rho} & \begin{minipage}[l]{3in}\begin{flushright}
44            tensors of order $o$ and dimension $d$,\\with coefficients of type $\rho$            tensors of order $o$ and dimension $d$,\\with coefficients of type $\rho$
45            \end{flushright}\end{minipage}\\[1em]            \end{flushright}\end{minipage}\\[1em]
46        \theta & ::= & \TYtensor{o}{d} & \begin{minipage}[l]{3in}\begin{flushright}        \theta & ::= & \TYtensor{\Seq{d}} & \begin{minipage}[l]{3in}\begin{flushright}
47            tensors of order $o$ and dimension $d$,\\with real coefficients            tensors of order $o$ and dimension $d$,\\with real coefficients
48            \end{flushright}\end{minipage}\\[1em]            \end{flushright}\end{minipage}\\[1em]
49        \tau & ::= & \iota \\        \tau & ::= & \iota \\
# Line 61  Line 61
61  \end{figure}%  \end{figure}%
62  We use some type abbreviations for common cases:  We use some type abbreviations for common cases:
63  \begin{eqnarray*}  \begin{eqnarray*}
64    \TYreal & = & \TYtensor{0}{d} \quad\text{for any $d$} \\    \TYreal & = & \TYtensor{\epsilon} \quad\text{for any $d$} \\
65    \TYvec{d} & = & \TYtensor{1}{d}    \TYvec{d} & = & \TYtensor{d}
66  \end{eqnarray*}%  \end{eqnarray*}%
67
68  \section{Operations}  \section{Operations}
# Line 91  Line 91
91
93  \begin{displaymath}  \begin{displaymath}
94    \BinopTy{{\odot}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}    \BinopTy{{\odot}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}
95    \qquad\text{for $\odot\in\SET{{+},{-}}$}    \qquad\text{for $\odot\in\SET{{+},{-}}$}
96  \end{displaymath}%  \end{displaymath}%
97
98  \noindent{}\point Negation:  \noindent{}\point Negation:
99  \begin{displaymath}  \begin{displaymath}
100    \UnopTy{-}{\TYtensor{o}{d}}{\TYtensor{o}{d}}    \UnopTy{-}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}
101  \end{displaymath}%  \end{displaymath}%
102
103  \noindent{}\point Scalar division:  \noindent{}\point Scalar division:
104  \begin{displaymath}  \begin{displaymath}
105    \BinopTy{{/}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}    \BinopTy{{/}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}}
106  \end{displaymath}%  \end{displaymath}%
107
108  \noindent{}\point Scalar multiplication (scalar times order-N):  \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{\Seq{d}}}{\TYtensor{\Seq{d}}} \\
112      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYreal}{\TYtensor{o}{d}}      \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYreal}{\TYtensor{\Seq{d}}}
113    \end{array}%    \end{array}%
114  \end{displaymath}%  \end{displaymath}%
115  Possible direct notation syntax (TBD): ~~ {\tt *} ~~  '' (space)  Possible direct notation syntax (TBD): ~~ {\tt *} ~~  '' (space)
# Line 119  Line 119
119  product of 2nd-order tensors)  product of 2nd-order tensors)
120  \begin{displaymath}  \begin{displaymath}
121    \begin{array}{c}    \begin{array}{c}
122      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}{\TYreal}      \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}{\TYreal}
123    \end{array}%    \end{array}%
124  \end{displaymath}%  \end{displaymath}%
125  Defined by $c = A_{\vec{i}}B_{\vec{i}}$  Defined by $c = A_{\vec{i}}B_{\vec{i}}$
# Line 132  Line 132
132  \noindent{}\point Tensor product (aka outer product; order output is sum of orders)  \noindent{}\point Tensor product (aka outer product; order output is sum of orders)
133  \begin{displaymath}  \begin{displaymath}
134    \begin{array}{c}    \begin{array}{c}
135      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{p}{d}}{\TYtensor{o+p}{d}}      \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d'}}}{\TYtensor{\Seq{d}\Seq{d'}}}
136    \end{array}%    \end{array}%
137  \end{displaymath}%  \end{displaymath}%
138  Defined by $C_{\vec{i}\vec{j}} = A_{\vec{i}}B_{\vec{j}}$ \\  Defined by $C_{\vec{i}\vec{j}} = A_{\vec{i}}B_{\vec{j}}$ \\
# Line 141  Line 141
141  \noindent{}\point Matrix Multiply  \noindent{}\point Matrix Multiply
142  \begin{displaymath}  \begin{displaymath}
143    \begin{array}{c}    \begin{array}{c}
144      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{2}{d}}{\TYtensor{o}{d}} \\      \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{d_1 d_2}}{\TYtensor{\Seq{d}}} \\
145      \BinopTy{{?}}{\TYtensor{2}{d}}{\TYtensor{o}{d}}{\TYtensor{o}{d}}      \BinopTy{{?}}{\TYtensor{d_1 d_2}}{\TYtensor{\Seq{d}}}{\TYtensor{\Seq{d}}}
146    \end{array}%    \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}$  Defined by $C_{i\vec{k}} = A_{ij}B_{j\vec{k}}$ and $C_{\vec{i}k} = B_{\vec{i}j}A_{jk}$
# Line 153  Line 153
153  with vector  with vector
154  \begin{displaymath}  \begin{displaymath}
155    \begin{array}{c}    \begin{array}{c}
156      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYvec{d}}{\TYtensor{o-1}{d}} \\      \BinopTy{{?}}{\TYtensor{d'\Seq{d}}}{\TYvec{d}}{\TYtensor{\Seq{d}}} \\
157      \BinopTy{{?}}{\TYvec{d}}{\TYtensor{o}{d}}{\TYtensor{o-1}{d}}      \BinopTy{{?}}{\TYvec{d}}{\TYtensor{d'\Seq{d}}}{\TYtensor{\Seq{d}}}
158    \end{array}%    \end{array}%
159  \end{displaymath}%  \end{displaymath}%
160  Defined by $C_{\vec{i}} = A_{\vec{i}j}v_j$ and $C_{\vec{j}} = v_iA_{j\vec{j}}$ \\  Defined by $C_{\vec{i}} = A_{\vec{i}j}v_j$ and $C_{\vec{j}} = v_iA_{j\vec{j}}$ \\
# Line 165  Line 165
165  decrease the tensor order.  decrease the tensor order.
166  \begin{displaymath}  \begin{displaymath}
167    \begin{array}{c}    \begin{array}{c}
168      \BinopTy{{?}}{\TYtensor{o}{d}}{\TYtensor{p}{d}}{\TYtensor{q}{d}}      \BinopTy{{?}}{\TYtensor{\Seq{d}}}{\TYtensor{p}{d}}{\TYtensor{q}{d}}
169    \end{array}%    \end{array}%
170  \end{displaymath}%  \end{displaymath}%
171  Defined by the conventions of Einstein summation notation. \\  Defined by the conventions of Einstein summation notation. \\
# Line 175  Line 175
175
176  \noindent{}\point Creation from an image:  \noindent{}\point Creation from an image:
177  \begin{displaymath}  \begin{displaymath}
178    \BinopTy{\OPconvolve}{\TYkern{k}}{\TYimage{d}{\TYrawten{o}{d}{\rho}}}{\TYfield{k}{d}{\TYtensor{o}{d}}}    \BinopTy{\OPconvolve}{\TYkern{k}}{\TYimage{d'}{\TYrawten{\Seq{d}}{\rho}}}{\TYfield{k}{d'}{\TYtensor{\Seq{d}}}}
179  \end{displaymath}%  \end{displaymath}%
180
181  \noindent{}\point Scalar multiplication:  \noindent{}\point Scalar multiplication:
# Line 208  Line 208
208
209  \noindent{}\point 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{\Seq{d}}}}{\TYfield{k-1}{d'}{\TYtensor{d'\Seq{d}}}}
212    \qquad\text{for $k > 0$}    \qquad\text{for $k > 0$}
213  \end{displaymath}%  \end{displaymath}%
214

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