Skip to content

Commit

Permalink
RestartChange
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Jun 20, 2022
1 parent 8ddfa77 commit 7498695
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions chapters/arrays.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1070,10 +1070,10 @@ \subsection{Equality and Assignment}\label{equality-and-assignment}
\tablehead{Size of \lstinline!a!} & \tablehead{Size of \lstinline!b!} & \tablehead{Size of \lstinline!a = b!} & \tablehead{Operation}\\
\hline
\hline
Scalar & Scalar & Scalar & \lstinline!a = b!\\
$n$-vector & $n$-vector & $n$-vector & \lstinline!a[$j$] = b[$j$]!\\
$n \times m$ matrix & $n \times m$ matrix & $n \times m$ matrix & \lstinline!a[$j$, $k$] = b[$j$, $k$]!\\
$n \times m \times \ldots$ & $n \times m \times \ldots$ & $n \times m \times \ldots$ & \lstinline!a[$j$, $k$, $\ldots$] = b[$j$, $k$, $\ldots$]!\\
Scalar & Scalar & Scalar & {\lstinline!a = b!}\\
$n$-vector & $n$-vector & $n$-vector & {\lstinline!a[$j$] = b[$j$]!}\\
$n \times m$ matrix & $n \times m$ matrix & $n \times m$ matrix & {\lstinline!a[$j$, $k$] = b[$j$, $k$]!}\\
$n \times m \times \ldots$ & $n \times m \times \ldots$ & $n \times m \times \ldots$ & {\lstinline!a[$j$, $k$, $\ldots$] = b[$j$, $k$, $\ldots$]!}\\
\hline
\end{tabular}
\end{center}
Expand Down
34 changes: 17 additions & 17 deletions chapters/inheritance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -139,36 +139,36 @@ \subsection{Restrictions on the Kind of Base Class}\label{restrictions-on-the-ki
\hline
& \multicolumn{12}{c|}{\tablehead{Base Class}} \\
\hline
\tablehead{Derived} & \multirow{2}{*}{\lstinline!package!} & \multirow{2}{*}{\lstinline!operator!} & \multirow{2}{*}{\lstinline!function!} & \lstinline!operator! & \multirow{2}{*}{\lstinline!type!} & \multirow{2}{*}{\lstinline!record!} & \lstinline!operator! & \lstinline!expandable! & \multirow{2}{*}{\lstinline!connector!} & \multirow{2}{*}{\lstinline!block!} & \multirow{2}{*}{\lstinline!model!} & \multirow{2}{*}{\lstinline!class!} \\
\tablehead{Class} & & & & \lstinline!function! & & & \lstinline!record! & \lstinline!connector! & & & & \\
\tablehead{Derived} & \multirow{2}{*}{\lstinline!package!} & \multirow{2}{*}{\lstinline!operator!} & \multirow{2}{*}{\lstinline!function!} & {\lstinline!operator!} & \multirow{2}{*}{\lstinline!type!} & \multirow{2}{*}{\lstinline!record!} & {\lstinline!operator!} & {\lstinline!expandable!} & \multirow{2}{*}{\lstinline!connector!} & \multirow{2}{*}{\lstinline!block!} & \multirow{2}{*}{\lstinline!model!} & \multirow{2}{*}{\lstinline!class!} \\
\tablehead{Class} & & & & {\lstinline!function!} & & & {\lstinline!record!} & {\lstinline!connector!} & & & & \\
\hline
\hline
\lstinline!package! & yes & & & & & & & & & & & \cellcolor{lightgray}yes \\
{\lstinline!package!} & yes & & & & & & & & & & & \cellcolor{lightgray}yes \\
\hline
\lstinline!operator! & & yes & & & & & & & & & & \cellcolor{lightgray}yes \\
{\lstinline!operator!} & & yes & & & & & & & & & & \cellcolor{lightgray}yes \\
\hline
\lstinline!function! & & & yes & & & & & & & & & \cellcolor{lightgray}yes \\
{\lstinline!function!} & & & yes & & & & & & & & & \cellcolor{lightgray}yes \\
\hline
\lstinline!operator! & & & \cellcolor{lightgray} & \multirow{2}{*}{yes} & & & & & & & & \cellcolor{lightgray} \\
\lstinline!function! & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
{\lstinline!operator!} & & & \cellcolor{lightgray} & \multirow{2}{*}{yes} & & & & & & & & \cellcolor{lightgray} \\
{\lstinline!function!} & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\hline
\lstinline!type! & & & & & yes & & & & & & & \cellcolor{lightgray}yes \\
{\lstinline!type!} & & & & & yes & & & & & & & \cellcolor{lightgray}yes \\
\hline
\lstinline!record! & & & & & & yes & & & & & & \cellcolor{lightgray}yes \\
{\lstinline!record!} & & & & & & yes & & & & & & \cellcolor{lightgray}yes \\
\hline
\lstinline!operator! & & & & & & & \multirow{2}{*}{yes} & & & & & \cellcolor{lightgray} \\
\lstinline!record! & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
{\lstinline!operator!} & & & & & & & \multirow{2}{*}{yes} & & & & & \cellcolor{lightgray} \\
{\lstinline!record!} & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\hline
\lstinline!expandable! & & & & & & & & \multirow{2}{*}{yes} & & & & \cellcolor{lightgray} \\
\lstinline!connector! & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
{\lstinline!expandable!} & & & & & & & & \multirow{2}{*}{yes} & & & & \cellcolor{lightgray} \\
{\lstinline!connector!} & & & & & & & & & & & & \multirow{-2}{*}{\cellcolor{lightgray}yes} \\
\hline
\lstinline!connector! & & & & & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & & yes & & & \cellcolor{lightgray}yes \\
{\lstinline!connector!} & & & & & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & \cellcolor{lightgray}yes & & yes & & & \cellcolor{lightgray}yes \\
\hline
\lstinline!block! & & & & & & \cellcolor{lightgray}yes & & & & yes & & \cellcolor{lightgray}yes \\
{\lstinline!block!} & & & & & & \cellcolor{lightgray}yes & & & & yes & & \cellcolor{lightgray}yes \\
\hline
\lstinline!model! & & & & & & \cellcolor{lightgray}yes & & & & \cellcolor{lightgray}yes & yes & \cellcolor{lightgray}yes \\
{\lstinline!model!} & & & & & & \cellcolor{lightgray}yes & & & & \cellcolor{lightgray}yes & yes & \cellcolor{lightgray}yes \\
\hline
\lstinline!class! & & & & & & & & & & & & yes \\
{\lstinline!class!} & & & & & & & & & & & & yes \\
\hline
\end{tabular}
% Close resizebox.
Expand Down
40 changes: 20 additions & 20 deletions chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -63,41 +63,41 @@ \section{Operator Precedence and Associativity}\label{operator-precedence-and-as
\tablehead{Operator group} & \tablehead{Assoc.} & \tablehead{Operator syntax} & \tablehead{Examples}\\
\hline
\hline
Postfix array index & left & \lstinline![]! & \lstinline!arr[index]!\\
Postfix array index & left & {\lstinline![]!} & {\lstinline!arr[index]!}\\
\hline
Postfix access & left & \lstinline!.! & \lstinline!a.b!\\
Postfix access & left & {\lstinline!.!} & {\lstinline!a.b!}\\
\hline
Postfix function call & none & \lstinline!$\mathit{funcName}$($\mathit{args}$)! & \lstinline!sin(4.36)!\\
Postfix function call & none & {\lstinline!$\mathit{funcName}$($\mathit{args}$)!} & {\lstinline!sin(4.36)!}\\
\hline
Array construction & left$^{\dagger}$ & \lstinline!{$\mathit{expr}$, $\mathit{expr}$, $\ldots$}! & \lstinline!{2, 3}!\\
Horizontal concatenation & left$^{\dagger}$ & \lstinline![$\mathit{expr}$, $\mathit{expr}$, $\ldots$]! & \lstinline![5, 6]!\\
Array construction & left$^{\dagger}$ & {\lstinline!{$\mathit{expr}$, $\mathit{expr}$, $\ldots$}!} & {\lstinline!{2, 3}!}\\
Horizontal concatenation & left$^{\dagger}$ & {\lstinline![$\mathit{expr}$, $\mathit{expr}$, $\ldots$]!} & {\lstinline![5, 6]!}\\
\hline
Vertical concatenation & left$^{\dagger}$ & \lstinline![$\mathit{expr}$; $\mathit{expr}$; $\ldots$]! & \lstinline![2, 3; 7, 8]!\\
Vertical concatenation & left$^{\dagger}$ & {\lstinline![$\mathit{expr}$; $\mathit{expr}$; $\ldots$]!} & {\lstinline![2, 3; 7, 8]!}\\
\hline
Exponentiation & none & \lstinline!^! & \lstinline!2 ^ 3!\\
Exponentiation & none & {\lstinline!^!} & {\lstinline!2 ^ 3!}\\
\hline
Multiplicative & left & \lstinline!* /! & \lstinline!2 * 3!, \lstinline!2 / 3!\\
Elementwise multiplicative & left & \lstinline!.* ./! & \lstinline!{2, 3} .* {4, 5}!\\
Multiplicative & left & {\lstinline!* /!} & {\lstinline!2 * 3!}, {\lstinline!2 / 3!}\\
Elementwise multiplicative & left & {\lstinline!.* ./!} & {\lstinline!{2, 3} .* {4, 5}!}\\
\hline
Additive unary & none & \lstinline!+$\mathit{expr}$ -$\mathit{expr}$! & \lstinline!-0.5!\\
Additive unary & none & {\lstinline!+$\mathit{expr}$ -$\mathit{expr}$!} & {\lstinline!-0.5!}\\
\hline
Additive & left & \lstinline!+ -! & \lstinline!1 + 2!\\
Elementwise additive & left & \lstinline!.+ .-! & \lstinline!{2, 3} .+ {4, 5}!\\
Additive & left & {\lstinline!+ -!} & {\lstinline!1 + 2!}\\
Elementwise additive & left & {\lstinline!.+ .-!} & {\lstinline!{2, 3} .+ {4, 5}!}\\
\hline
Relational & none & \lstinline!< <= > >= == <>! & \lstinline!a < b!, \lstinline!a <= b!, \lstinline!a > b!\\
Relational & none & {\lstinline!< <= > >= == <>!} & {\lstinline!a < b!}, {\lstinline!a <= b!}, {\lstinline!a > b!}\\
\hline
Unary negation & none & \lstinline!not $\mathit{expr}$! & \lstinline!not b1!\\
Unary negation & none & {\lstinline!not $\mathit{expr}$!} & {\lstinline!not b1!}\\
\hline
Logical and & left & \lstinline!and! & \lstinline!b1 and b2!\\
Logical and & left & {\lstinline!and!} & {\lstinline!b1 and b2!}\\
\hline
Logical or & left & \lstinline!or! & \lstinline!b1 or b2!\\
Logical or & left & {\lstinline!or!} & {\lstinline!b1 or b2!}\\
\hline
\multirow{2}{*}{Array range} & none & \lstinline!$\mathit{expr}$ : $\mathit{expr}$! & \lstinline!1 : 5!\\
& none & \lstinline!$\mathit{expr}$ : $\mathit{expr}$ : $\mathit{expr}$! & \lstinline!start : step : stop!\\
\multirow{2}{*}{Array range} & none & {\lstinline!$\mathit{expr}$ : $\mathit{expr}$!} & {\lstinline!1 : 5!}\\
& none & {\lstinline!$\mathit{expr}$ : $\mathit{expr}$ : $\mathit{expr}$!} & {\lstinline!start : step : stop!}\\
\hline
Conditional & none & \lstinline!if $\mathit{expr}$ then $\mathit{expr}$ else $\mathit{expr}$! & \lstinline!if b then 3 else x!\\
Conditional & none & {\lstinline!if $\mathit{expr}$ then $\mathit{expr}$ else $\mathit{expr}$!} & {\lstinline!if b then 3 else x!}\\
\hline
Named argument & none & \lstinline!$\mathit{ident}$ = $\mathit{expr}$! & \lstinline!x = 2.26!\\
Named argument & none & {\lstinline!$\mathit{ident}$ = $\mathit{expr}$!} & {\lstinline!x = 2.26!}\\
\hline
\end{tabular}
\end{center}
Expand Down

0 comments on commit 7498695

Please sign in to comment.