Skip to content

Commit

Permalink
Fix formatting of definition of 'cat'
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Jun 3, 2020
1 parent 1d34f0e commit f3efe1f
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions chapters/arrays.tex
Expand Up @@ -633,28 +633,25 @@ \subsubsection{Array Constructor with Several Iterators}\doublelabel{array-const

\subsection{Array Concatenation}\doublelabel{array-concatenation}


The function \lstinline!cat(k,A,B,C,...)! concatenates arrays
\lstinline!A!,\lstinline!B!,\lstinline!C!,... along
dimension k according to the following rules:
The function \lstinline[mathescape=true]!cat($k$, A, B, C, $\ldots$)! concatenates arrays
\lstinline!A!, \lstinline!B!, \lstinline!C!, \ldots along
dimension $k$ according to the following rules:
\begin{itemize}
\item
Arrays A, B, C, ... must have the same number of dimensions, i.e.,
\lstinline!ndims(A)! = \lstinline!ndims(B)! = ...
Arrays \lstinline!A!, \lstinline!B!, \lstinline!C!, \ldots must have the same number of dimensions, i.e.,
\lstinline!ndims(A)! = \lstinline!ndims(B)! = \ldots
\item
Arrays A, B, C, ... must be type compatible expressions (\autoref{type-compatible-expressions})
Arrays \lstinline!A!, \lstinline!B!, \lstinline!C!, \ldots must be type compatible expressions (\autoref{type-compatible-expressions})
giving the type of the elements of the result. The maximally expanded
types should be equivalent. Real and Integer subtypes can be mixed
resulting in a Real result array where the Integer numbers have been
transformed to Real numbers.
types should be equivalent. \lstinline!Real! and \lstinline!Integer! subtypes can be mixed
resulting in a \lstinline!Real! result array where the \lstinline!Integer! numbers have been
transformed to \lstinline!Real! numbers.
\item
k has to characterize an existing dimension, i.e., 1 $<=$ k
$<=$ \lstinline!ndims(A)! = \lstinline!ndims(B)! = \lstinline!ndims(C)!; k shall be a parameter expression of \lstinline!Integer! type.
$k$ has to characterize an existing dimension, i.e., $1 \leq k \leq \text{\lstinline!ndims(A)!} = \text{\lstinline!ndims(B)!} = \text{\lstinline!ndims(C)!}$; $k$ shall be a parameter expression of \lstinline!Integer! type.
\item
Size matching: Arrays A, B, C, ... must have identical array sizes
with the exception of the size of dimension k, i.e., \lstinline!size(A,j)! =
\lstinline!size(B,j)!, for 1 $<=$ j $<=$ \lstinline!ndims(A)! and j
$\neq$ k.
Size matching: Arrays \lstinline!A!, \lstinline!B!, \lstinline!C!, \ldots must have identical array sizes
with the exception of the size of dimension $k$, i.e., \lstinline!size(A,j)! =
\lstinline!size(B,j)!, for $1 \leq j \leq \text{\lstinline!ndims(A)!}$ and $j \neq k$.
\end{itemize}

\begin{example}
Expand Down

0 comments on commit f3efe1f

Please sign in to comment.