 hfarray - Maple Help

type/hfarray

check for an array of hardware floats Calling Sequence type(A, hfarray) type(A, 'hfarray'(x_i)) type(A, 'hfarray'(x_1, ..., x_n)) Parameters

 A - any expression Description

 • The call type(A, hfarray) checks to see if A is an array of hardware floats (an hfarray). It will return true if A is an hfarray, and false otherwise. See the information under hfarray for a description of the hfarray data structure and how to create hfarrays.
 • The optional argument(s) must be either an integer, or ranges of integers. They are used to specify the desired dimensions of an hfarray.
 • If x_i is an integer it specifies the number of dimensions of the hfarray A.  For example, 'hfarray'(2) would specify a 2-D hfarray.
 • If ${x}_{1},{x}_{2},...,{x}_{n}$ are ranges, they specify the hfarray bounds (and implicitly the dimension) of the hfarray A.  For example, 'hfarray'(1..2,1..posint) would specify a 2-D hfarray with exactly two rows and one or more columns.
 • It is necessary to surround the word hfarray with quotes $\left(\text{'}\right)$ when using this function in the second form.  This prevents invocation of the hfarray function, which is used to create arrays. Examples

 > $A≔\mathrm{hfarray}\left(1..2,1..2,\left[\left[1,3\right],\left[\frac{1}{2},5\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{cc}{1.}& {3.}\\ {0.500000000000000}& {5.}\end{array}\right]$ (1)
 > $\mathrm{type}\left(A,\mathrm{hfarray}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(A,'\mathrm{hfarray}'\left(1..2,1..2\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(A,'\mathrm{hfarray}'\left(2\right)\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(A,'\mathrm{hfarray}'\left(1..2\right)\right)$
 ${\mathrm{false}}$ (5)