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', a type, 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).
 If R is a type expression, then the entries of expr are checked to see if they are all of type R.
 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.

Supertypes

 •

Subtypes

 •

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}{ccc}{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)

The R parameter can specify the allowable dimensions of the rtable. For example, 1.. specifies a one-dimensional rtable with index starting at 1; the upper limit is not specified.

 > $\mathrm{type}\left(\mathrm{Vector}\left(3\right),'\mathrm{rtable}'\left(1..\right)\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left(\mathrm{Array}\left(1..3\right),'\mathrm{rtable}'\left(1..\right)\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{type}\left(\mathrm{Array}\left(0..3\right),'\mathrm{rtable}'\left(1..\right)\right)$
 ${\mathrm{false}}$ (9)