Vector - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

type/Vector

check for a Vector (rtable-based)

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

Parameters

 expr - any expression R - Vector shape, any Vector option, a type, or an expression sequence of these

Description

 • A Maple Vector is an rtable with subType option Vector.
 • The type(expr, Vector) function returns true if expr is a Maple Vector.
 • The type(expr, 'Vector'(R)) function returns true if expr is a Maple Vector with the shapes or options given in R (see Vector for permissible shapes and options), or if the entries of expr have the type R, in case R is a type.
 Note:  It is essential to quote the word Vector in this form of the calling sequence in order to avoid confusion with the Vector(..) constructor function.

Supertypes

 •

Examples

 > $A≔\mathrm{Vector}\left(\left[1,2,3\right]\right)$
 ${A}{≔}\left[\begin{array}{c}{1}\\ {2}\\ {3}\end{array}\right]$ (1)
 > $\mathrm{type}\left(A,\mathrm{Vector}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(A,\mathrm{Vector}\left[\mathrm{column}\right]\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(A,\mathrm{Vector}\left[\mathrm{row}\right]\right)$
 ${\mathrm{false}}$ (4)

Check the contents of the Vector.

 > $\mathrm{type}\left(A,'\mathrm{Vector}'\left(\mathrm{numeric}\right)\right)$
 ${\mathrm{true}}$ (5)

Check the shape or options of the Vector.

 > $\mathrm{VectorOptions}\left(A\right)$
 ${\mathrm{shape}}{=}\left[\right]{,}{\mathrm{datatype}}{=}{\mathrm{anything}}{,}{\mathrm{orientation}}{=}{\mathrm{column}}{,}{\mathrm{storage}}{=}{\mathrm{rectangular}}{,}{\mathrm{order}}{=}{\mathrm{Fortran_order}}$ (6)
 > $\mathrm{type}\left(A,'\mathrm{Vector}'\left(\mathrm{datatype}=\mathrm{anything},\mathrm{subtype}=\mathrm{Vector}\left[\mathrm{column}\right],\mathrm{storage}=\mathrm{rectangular}\right)\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left(A,'\mathrm{Vector}'\left(\mathrm{datatype}=\mathrm{integer}\right)\right)$
 ${\mathrm{false}}$ (8)