# NAG FL Interfacef06evf (dgthrz)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06evf gathers specified (usually nonzero) elements of a real vector $y$ in full storage form into a sparse real vector $x$ in compressed form. The specified elements of $y$ are set to zero.

## 2Specification

Fortran Interface
 Subroutine f06evf ( nz, y, x, indx)
 Integer, Intent (In) :: nz, indx(*) Real (Kind=nag_wp), Intent (Inout) :: y(*), x(*)
C Header Interface
#include <nag.h>
 void f06evf_ (const Integer *nz, double y[], double x[], const Integer indx[])
The routine may be called by the names f06evf, nagf_blas_dgthrz or its BLAS name dgthrz.

## 3Description

f06evf gathers the specified elements of a vector, $y$, in full storage form, into the equivalent sparse vector compressed form. The gathered elements of $y$ are set to zero.

## 4References

Dodson D S, Grimes R G and Lewis J G (1991) Sparse extensions to the Fortran basic linear algebra subprograms ACM Trans. Math. Software 17 253–263

## 5Arguments

1: $\mathbf{nz}$Integer Input
On entry: the number of nonzeros in the compressed sparse vector $x$.
2: $\mathbf{y}\left(*\right)$Real (Kind=nag_wp) array Input/Output
Note: the dimension of the array y must be at least $\underset{\mathit{k}}{\mathrm{max}}\phantom{\rule{0.25em}{0ex}}\left\{{\mathbf{indx}}\left(\mathit{k}\right)\right\}$.
On entry: the vector $y$. Only elements corresponding to indices in indx are accessed.
On exit: the elements of $y$ corresponding to indices in indx are set to zero.
3: $\mathbf{x}\left(*\right)$Real (Kind=nag_wp) array Output
Note: the dimension of the array x must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{nz}}\right)$.
On exit: the compressed vector $x$.
4: $\mathbf{indx}\left(*\right)$Integer array Input
Note: the dimension of the array indx must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{nz}}\right)$.
On entry: ${\mathbf{indx}}\left(\mathit{i}\right)$ must contain the index ${\mathbf{y}}\left(\mathit{i}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{nz}}$, which is to be gathered into $x$.
Constraint: the indices must be distinct.

None.

Not applicable.

## 8Parallelism and Performance

f06evf is not threaded in any implementation.

None.

None.