*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> f90/unpack (3)              
Title
Content
Arch
Section
 

Contents


UNPACK(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     UNPACK - Unpacks an array of rank one into	an array under control of a
     mask

SYNOPSIS    [Toc]    [Back]

     UNPACK ([VECTOR=]vector, [MASK=]mask, [FIELD=]field)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The UNPACK	intrinsic function unpacks an array of rank one	into an
     array under control of mask.  It accepts the following arguments:

     vector    Can be of any type.  It must have rank one.  Its	size must
	       be at least t where t is	the number of true elements in
	       mask.

     mask      Must be of type logical and array valued.

     field     Must be of the same type	as vector, and must be conformable
	       with mask.

     UNPACK is a transformational function.  The name of this intrinsic
     cannot be passed as an argument.

RETURN VALUES    [Toc]    [Back]

     The result	is an array of the same	type as	vector and the same shape
     as	mask.

     The element of the	result that corresponds	to the ith true	element	of
     mask, in array element order, has the value vector(i) for i=1, 2, ...,
     t where t is the number of	true values in mask.  Each other element
     has the value equal to field if field is scalar or	to the
     corresponding element of field if it is an	array.

EXAMPLES    [Toc]    [Back]

     This example uses UNPACK to scatter specific values to specific
     positions in an array.

     Assume that M is the following array:

	| 1 0 0	|

	| 0 1 0	|

	| 0 0 1	|

     Assume that V is the array	[1, 2, 3].

     Assume that Q is the logical mask:

	| F T F	|

	| T F F	|

	| F F T	|

     In	logical	mask Q,	T represents true and F	represents false, so
     UNPACK(V, MASK=Q, FIELD=M)	has the	following value:

	| 1 2 0	|

	| 1 1 0	|

	| 0 0 3	|

     The result	of UNPACK(V, MASK=Q, FIELD=0) has the following	value:

	| 0 2 0	|

	| 1 0 0	|

	| 0 0 3	|

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

UNPACK(3I)					       Last changed: 1-6-98

NAME    [Toc]    [Back]

     UNPACK - Unpacks an array of rank one into	an array under control of a
     mask

SYNOPSIS    [Toc]    [Back]

     UNPACK ([VECTOR=]vector, [MASK=]mask, [FIELD=]field)

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The UNPACK	intrinsic function unpacks an array of rank one	into an
     array under control of mask.  It accepts the following arguments:

     vector    Can be of any type.  It must have rank one.  Its	size must
	       be at least t where t is	the number of true elements in
	       mask.

     mask      Must be of type logical and array valued.

     field     Must be of the same type	as vector, and must be conformable
	       with mask.

     UNPACK is a transformational function.  The name of this intrinsic
     cannot be passed as an argument.

RETURN VALUES    [Toc]    [Back]

     The result	is an array of the same	type as	vector and the same shape
     as	mask.

     The element of the	result that corresponds	to the ith true	element	of
     mask, in array element order, has the value vector(i) for i=1, 2, ...,
     t where t is the number of	true values in mask.  Each other element
     has the value equal to field if field is scalar or	to the
     corresponding element of field if it is an	array.

EXAMPLES    [Toc]    [Back]

     This example uses UNPACK to scatter specific values to specific
     positions in an array.

     Assume that M is the following array:

	| 1 0 0	|

	| 0 1 0	|

	| 0 0 1	|

     Assume that V is the array	[1, 2, 3].

     Assume that Q is the logical mask:

	| F T F	|

	| T F F	|

	| F F T	|

     In	logical	mask Q,	T represents true and F	represents false, so
     UNPACK(V, MASK=Q, FIELD=M)	has the	following value:

	| 1 2 0	|

	| 1 1 0	|

	| 0 0 3	|

     The result	of UNPACK(V, MASK=Q, FIELD=0) has the following	value:

	| 0 2 0	|

	| 1 0 0	|

	| 0 0 3	|

SEE ALSO    [Toc]    [Back]

      
      
     Intrinsic Procedures Reference Manual, publication	SR-2138, for the
     printed version of	this man page.

[ Back ]
 Similar pages
Name OS Title
transpose IRIX Transposes an array of rank two
dlaed4 IRIX rank-one modification to a diagonal matrix whose elements are given in the array d, and that D(i) < D(j) for i
slaed4 IRIX rank-one modification to a diagonal matrix whose elements are given in the array d, and that D(i) < D(j) for i
qsort Linux sorts an array
reshape IRIX Constructs an array of a specified shape
rs FreeBSD reshape a data array
glNormalPointer Tru64 define an array of normals
array IRIX execute an array command
array IRIX Manipulate array variables
glnormalpointerext IRIX define a array of normals
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service