Personal tools
You are here: Home Documentation User's Guide 3.2 Level 1 BLAS
Document Actions

3.2 Level 1 BLAS

3.2 Level 1 BLAS The level 1 functions implement vector operations.

scal(alpha, x)

Scales a vector by a constant:

\begin{displaymath}
x := \alpha x.
\end{displaymath}

If x is a real matrix, the scalar argument alpha must be a Python integer or float. If x is complex, alpha can be an integer, float, or complex.

nrm2(x)

Euclidean norm of a vector: returns

\begin{displaymath}
\Vert x\Vert _2.
\end{displaymath}

asum(x)

1-Norm of a vector: returns

\begin{displaymath}
\Vert x\Vert _1 \quad \mbox{(\textit{x} real)}, \qquad
\Ver...
...ert _1 + \Vert\Im x\Vert _1 \quad \mbox{(\textit{x} complex)}.
\end{displaymath}

iamax(x)

Returns

\begin{displaymath}
\mathop{\mathrm{argmax}}_{k=0,\ldots,n-1} \vert x_k\vert \q...
...vert + \vert\Im x_k\vert \quad
\mbox{(\textit{x} complex)}.
\end{displaymath}

If more than one coefficient achieves the maximum, the index of the first k is returned.

swap(x, y)

Interchanges two vectors:

\begin{displaymath}
x \leftrightarrow y.
\end{displaymath}

x and y are matrices of the same type ('d' or 'z').

copy(x, y)

Copies a vector to another vector:

\begin{displaymath}
y := x.
\end{displaymath}

x and y are matrices of the same type ('d' or 'z').

axpy(x, y[,alpha=1.0])

Constant times a vector plus a vector:

\begin{displaymath}
y := \alpha x + y.
\end{displaymath}

x and y are matrices of the same type ('d' or 'z'). If x is real, the scalar argument alpha must be a Python integer or float. If x is complex, alpha can be an integer, float, or complex.

dot(x, y)

Returns

\begin{displaymath}
x^Hy.
\end{displaymath}

x and y are matrices of the same type ('d' or 'z').

dotu(x, y)

Returns

\begin{displaymath}
x^Ty.
\end{displaymath}

x and y are matrices of the same type ('d' or 'z').

 

Powered by Plone CMS, the Open Source Content Management System