From 9fa20d60ad6c57450636dc89c45030f8ea482c63 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Wed, 31 Mar 2021 08:06:02 +0200 Subject: [PATCH] Clean up formatting in "Matching Function" --- chapters/overloaded.tex | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/chapters/overloaded.tex b/chapters/overloaded.tex index c968c31e5..a6d4bf113 100644 --- a/chapters/overloaded.tex +++ b/chapters/overloaded.tex @@ -58,10 +58,7 @@ \section{Overview of overloaded operators}\label{overview-of-overloaded-operator \section{Matching Function}\label{matching-function} -All functions defined inside the \lstinline!operator! class must return one -output (based on the restriction above), and may include functions with -optional arguments, i.e.\ functions of the form - +All functions defined inside the \lstinline!operator! class must return one output (based on the restriction above), and may include functions with optional arguments, i.e.\ functions of the form \begin{lstlisting}[language=modelica] function f input $A_1$ $u_1$; @@ -74,17 +71,16 @@ \section{Matching Function}\label{matching-function} $\ldots$ end f; \end{lstlisting} -The vector P indicates whether argument m of f has a default value (\lstinline!true! for default value, \lstinline!false! otherwise). A call -f($A_1$, $a_{2}$,\ldots{}, $a_{k}$, $b_{1}$ = $w_{1}$ ,\ldots{}, $b_{p}$ = $w_{p}$) -with distinct names $b_{j}$ is a valid match for the function f, provided (treating \lstinline!Integer! and \lstinline!Real! as the same type) +The vector $P$ indicates whether argument $m$ of \lstinline!f! has a default value (\lstinline!true! for default value, \lstinline!false! otherwise). +A call \lstinline!f($A_1$, $a_{2}$, $\ldots$, $a_{k}$, $b_{1}$ = $w_{1}$, $\ldots$, $b_{p}$ = $w_{p}$)! with distinct names $b_{j}$ is a valid match for the function \lstinline!f!, provided (treating \lstinline!Integer! and \lstinline!Real! as the same type) \begin{itemize} \item $A_{i}$ = typeOf($A_{i}$) for $1 \leq i \leq k$, \item - the names $b_{j}$ = $u_{\mathit{Qj}}$, $\mathit{Qj} > k$, $A_{\mathit{Qj}}$ = typeOf($w_{i}$) for $1 \leq j \leq p$, and + the names $b_{j}$ = $u_{Q_{j}}$, $Q_{j} > k$, $A_{Q_{j}}$ = typeOf($w_{i}$) for $1 \leq j \leq p$, and \item - if the union of $\{i: 1 \leq i \leq k \}$, $\{\mathit{Qj}: 1 \leq j \leq p\}$, and $\{m: P_{m} \text{ is \lstinline!true! and } 1 \leq m \leq n \}$ is the set $\{i: 1 \leq i \leq n\}$. + if the union of $\{i: 1 \leq i \leq k \}$, $\{Q_{j}: 1 \leq j \leq p\}$, and $\{m: P_{m} \text{ is \lstinline!true! and } 1 \leq m \leq n \}$ is the set $\{i: 1 \leq i \leq n\}$. \end{itemize} \begin{nonnormative}