type/rtable - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/rtable

type/rtable

check for an object of type rtable

 Calling Sequence type(expr, rtable) type(expr, 'rtable'(R))

Parameters

 expr - any expression R - rtable indexing function, rtable option, the name 'square', or an expression sequence of these

Description

 • The type(expr, rtable) function returns true if expr is any one of the following types of Maple rtables.
 • The type(expr, 'rtable'(R)) function returns true if expr is a Maple rtable with the indexing functions or options given in R.
 If R includes the name 'square', the dimensions of the rtable are checked to see if they are all the same size (they do not have to have the same start and end values in the case of an Array).
 Note:  It is essential to quote the word rtable in this form of the calling sequence in order to avoid confusion with the rtable(..) constructor function.

Examples

 > $A≔\mathrm{rtable}\left(\left[\left[1,2,3\right],\left[1,1,1\right],\left[5,7,9\right]\right],\mathrm{subtype}=\mathrm{Matrix}\right)$
 ${A}{≔}\left[\begin{array}{rrr}{1}& {2}& {3}\\ {1}& {1}& {1}\\ {5}& {7}& {9}\end{array}\right]$ (1)
 > $\mathrm{type}\left(A,\mathrm{rtable}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(A,'\mathrm{rtable}'\left(\mathrm{square}\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{rtable_options}\left(A\right)$
 ${\mathrm{datatype}}{=}{\mathrm{anything}}{,}{\mathrm{subtype}}{=}{\mathrm{Matrix}}{,}{\mathrm{storage}}{=}{\mathrm{rectangular}}{,}{\mathrm{order}}{=}{\mathrm{Fortran_order}}$ (4)
 > $\mathrm{type}\left(A,'\mathrm{rtable}'\left(\mathrm{datatype}=\mathrm{anything},\mathrm{order}=\mathrm{Fortran_order},\mathrm{square}\right)\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(A,'\mathrm{rtable}'\left(\mathrm{datatype}=\mathrm{integer}\right)\right)$
 ${\mathrm{false}}$ (6)