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

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

Contents


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

NAME    [Toc]    [Back]

     RESHAPE - Constructs an array of a	specified shape

SYNOPSIS    [Toc]    [Back]

     RESHAPE ([SOURCE=]source, [SHAPE=]shape [,[PAD=]pad] [,[ORDER=]order])

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The RESHAPE intrinsic function constructs an array	of a specified
     shape from	the elements of	a given	array.	It accepts the following
     arguments:

     source    May be of any type.  It must be array valued.  If pad is
	       absent or of size zero, the size	of source must be greater
	       than or equal to	PRODUCT(shape).	 The size of the result	is
	       the product of the values of the	elements of shape.

     shape     Must be an integer, of rank one,	and of constant	size.  Its
	       size must be positive and less than 8.  It must not have	an
	       element whose value is negative.

     pad       Must be of the same type	as source.  It must be array
	       valued.

     order     Must be of type integer.	 It must have the same shape as
	       shape, and its value must be a permutation of (1,2,...,n),
	       where n is the size of shape.  If absent, the default order
	       is (1,2,...,n).

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

RETURN VALUES    [Toc]    [Back]

     The type of the result is the same	type as	source.	 The result is an
     array of shape shape, that	is, SHAPE(RESHAPE(source,shape,pad,order))
     is	equal to shape.

     The elements of the result, taken in permuted subscript order
     order(1), ..., order(n), are those	of source in normal array element
     order followed, if	necessary, by those of pad in array element order,
     followed, if necessary, by	additional copies of pad in array element
     order.

EXAMPLES    [Toc]    [Back]

     Example 1:	 RESHAPE((/1,2,3,4,5,6/), (/2,3/)) has the following value:

	| 1 3 5	|

	| 2 4 6	|

     Example 2:	 RESHAPE((/1,2,3,4,5,6,7,8,9/),	(/3,4/), (/0,0/)) has the
     following value:

	| 1 4 7	0 |

	| 2 5 8	0 |

	| 3 6 9	0 |

     Example 3:	 RESHAPE((/1,2,3,4,5,6/), (/2,4/), (/0,0/), (/2,1/)) has
     the following value:

	| 1 2 3	4 |

	| 5 6 0	0 |

SEE ALSO    [Toc]    [Back]

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

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

NAME    [Toc]    [Back]

     RESHAPE - Constructs an array of a	specified shape

SYNOPSIS    [Toc]    [Back]

     RESHAPE ([SOURCE=]source, [SHAPE=]shape [,[PAD=]pad] [,[ORDER=]order])

IMPLEMENTATION    [Toc]    [Back]

     UNICOS, UNICOS/mk,	and IRIX systems

STANDARDS    [Toc]    [Back]

     Fortran 90

DESCRIPTION    [Toc]    [Back]

     The RESHAPE intrinsic function constructs an array	of a specified
     shape from	the elements of	a given	array.	It accepts the following
     arguments:

     source    May be of any type.  It must be array valued.  If pad is
	       absent or of size zero, the size	of source must be greater
	       than or equal to	PRODUCT(shape).	 The size of the result	is
	       the product of the values of the	elements of shape.

     shape     Must be an integer, of rank one,	and of constant	size.  Its
	       size must be positive and less than 8.  It must not have	an
	       element whose value is negative.

     pad       Must be of the same type	as source.  It must be array
	       valued.

     order     Must be of type integer.	 It must have the same shape as
	       shape, and its value must be a permutation of (1,2,...,n),
	       where n is the size of shape.  If absent, the default order
	       is (1,2,...,n).

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

RETURN VALUES    [Toc]    [Back]

     The type of the result is the same	type as	source.	 The result is an
     array of shape shape, that	is, SHAPE(RESHAPE(source,shape,pad,order))
     is	equal to shape.

     The elements of the result, taken in permuted subscript order
     order(1), ..., order(n), are those	of source in normal array element
     order followed, if	necessary, by those of pad in array element order,
     followed, if necessary, by	additional copies of pad in array element
     order.

EXAMPLES    [Toc]    [Back]

     Example 1:	 RESHAPE((/1,2,3,4,5,6/), (/2,3/)) has the following value:

	| 1 3 5	|

	| 2 4 6	|

     Example 2:	 RESHAPE((/1,2,3,4,5,6,7,8,9/),	(/3,4/), (/0,0/)) has the
     following value:

	| 1 4 7	0 |

	| 2 5 8	0 |

	| 3 6 9	0 |

     Example 3:	 RESHAPE((/1,2,3,4,5,6/), (/2,4/), (/0,0/), (/2,1/)) has
     the following value:

	| 1 2 3	4 |

	| 5 6 0	0 |

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
shape IRIX Returns the shape of an array or a scalar
spread IRIX Constructs an array from several copies of an actual argument
glunurbscurve IRIX define the shape of a NURBS curve
glunurbssurface IRIX define the shape of a NURBS surface
gluNurbsCurve Tru64 define the shape of a NURBS curve
gluNurbsSurface Tru64 define the shape of a NURBS surface
nurbssurface IRIX controls the shape of a NURBS surface
nurbscurve IRIX controls the shape of a NURBS curve
deroff IRIX remove nroff, troff, tbl and eqn constructs
cursor FreeBSD set cursor shape for the pcvt VT220 video driver
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service