eoshift man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]

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

NAME
     EOSHIFT - Performs an end-off shift on an array expression

SYNOPSIS
     EOSHIFT ([ARRAY=]array, [SHIFT=]shift [,[BOUNDARY=]boundary]
     [,[DIM=]dim])

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

STANDARDS
     Fortran 90

DESCRIPTION
     The EOSHIFT intrinsic function performs an end-off shift on an array
     expression of rank one, or it performs end-off shifts on all the
     complete rank one sections along a given array expression of rank two
     or greater.  Elements are shifted off at one end of a section and
     copies of a boundary value are shifted in at the other end.  Different
     sections can have different boundary values and can be shifted by
     different amounts and in different directions; positive for left
     shifts, negative for right shifts.

     EOSHIFT accepts the following arguments:

     array     May be of any type.  It must not be scalar.

     shift     Must be integer.	 If array has rank one, shift must be a
	       scalar.	Otherwise, shift must be scalar or have rank n-1
	       and have
	       shape (d , d , ..., d	 , d	 , ..., d ),
		       1   2	    dim-1   dim+1	 n
	       where (d , d , ..., d )
		       1   2	    n
	       is the shape of array.

     boundary  Must be of the same type and have the same type parameters
	       as array.  Must be scalar if array has rank one; otherwise,
	       it must be either scalar or of rank n-1 and of
	       shape (d , d , ..., d	 , d	 , ..., d ),
		       1   2	    dim-1   dim+1	 n
	       The boundary argument can be omitted for the data types in
	       the following list.  In these cases, the default value is
	       the scalar value shown:

	       Type of array	   Default Value of boundary

	       Integer		   0

	       Real		   0.0

	       Complex		   (0.0,0.0)

	       Logical		   false

	       Character(len)	   len blanks

	       The boundary data type must be present for derived data
	       types.

     dim       Must be a scalar.  Must be an integer value in the range
	       1 <= dim <= n, where n is the rank of array.  If dim is
	       omitted, the default value is 1.

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

RETURN VALUES
     The result is an array of the same type, type parameters, and shape as
     array.

     Element (s , s , ..., s )
	       1   2	    n
     of the result has the value
     array(s , s , ..., s     , s    + sh, s	 , ..., s ),
	    1	2	 dim-1	 dim	    dim+1	 n
     where sh is shift or
     shift(s , s , ..., s     , s     , ..., s ),
	    1	2	 dim-1	 dim+1	      n
     provided that the inequality
     LBOUND(array,dim) <= s    + sh <= UBOUND(array,dim)
			   dim
     holds and is otherwise boundary or
     boundary(s , s , ..., s	 , s	 , ..., s ).
	       1   2	    dim-1   dim+1	 n

EXAMPLES
     Example 1:	 If V is an array [1, 2, 3, 4, 5, 6], the effect of
     shifting V end-off to the left by three positions is achieved by
     EOSHIFT(V, SHIFT = 3), which has the value [4, 5, 6, 0, 0, 0].
     Specifying EOSHIFT(V, SHIFT = -2, BOUNDARY = 99) achieves an end-off
     shift to the right by two positions with the boundary value of 99 and
     has the value of [99, 99, 1, 2, 3, 4].

     Example 2:	 The rows of an array of rank two can all be shifted by the
     same amount or by different amounts and the boundary elements can be
     the same or different.  Assume that M is the following array:

	| A B C |

	| D E F |

	| G H I |

     The value of EOSHIFT(M, SHIFT =-1, BOUNDARY = '*', DIM = 2) is as
     follows:

	| * A B |

	| * D E |

	| * G H |

     The value of EOSHIFT(M, SHIFT =(/ -1, 1, 0 /), BOUNDARY = (/ '*', '/',
     '?' /), DIM = 2) is as follows:

	| * A B |

	| E F  / |

	| G H I |

     The value of section EOSHIFT(M(2:3,2:3), SHIFT = -1, BOUNDARY = '*',
     DIM=2) is as follows:

	| * E |

	| * H |

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

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net