You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\item Scrivere una funzione {\tt Insert(As, z, Cmp=lambda x,y: x<y)} che inserisce nella lista {\tt As} l'elemento {\tt value},
103
+
\item Scrivere una funzione {\tt Insert(As, z, Cmp=lambda x,y: x<y)} che inserisce nella lista (già ordinata)
104
+
{\tt As} l'elemento {\tt value},
104
105
rispettando le seguenti regole: se l'elemento è già presente nella lista non viene aggiunto,
105
106
altrimenti l'elemento viene aggiunto tra due valori 'x' e 'y' di {\tt As} in modo tale che
106
107
valga la relazione $x < z < y$, o più in generale {\tt Cmp(x,z) == True} e {\tt Cmp(z,y) == True}.
@@ -127,7 +128,7 @@ \section*{}
127
128
128
129
\begin{enumerate}
129
130
\item {\bf DotProduct}: prodotto tra due vettori, componente per componente. Dati due vettori $x$ e $y$ in $\mathbb{R}^n$
130
-
calcolare lo scalara$p=\sum_{i = 1,\dots,n} x_i y_i$.
131
+
calcolare lo scalare$p=\sum_{i = 1,\dots,n} x_i y_i$.
131
132
\item {\bf MatrixVector}: prodotto tra matrice e vettore. Data una matrice $A$ di dimensione $m \times n$ e un vettore $x$ in $\mathbb{R}^n$ calcolare il vettore $t$, in cui $t_i=\sum_{j = 1,\dots,n} a_{ij} x_j$.
132
133
\item {\bf MatrixMatrix}: prodotto tra due matrici. Date le due matrici $A$ di dimensione $m \times n$ e $B$ di dimensione $n \times m$ calcolare la matrice $P$, in cui $p_{ij}=\sum_{k = 1,\dots,n} a_{ik} b_{kj}$.
133
134
\item {\bf Transpose}: matrice trasposta. Data la matrice $A$ di dimensione $m \times n$ calcolare la sua trasposta,
0 commit comments