SuggestedOrder - Maple Help

ArrayTools

 SuggestedOrder
 suggest rtable order for an operation on two rtables

 Calling Sequence SuggestedOrder(X,Y)

Parameters

 X, Y - Array, hardware float, or general expression

Description

 • SuggestedOrder(X,Y) accepts two rtables, X and Y, and suggests a storage order to use for a result involving an operation between X and Y.
 • If only one of X or Y is an rtable (Vector, Matrix, or Array), its storage order is returned.
 • If both X and Y are rtables, the storage order of the one with the higher number of dimensions is returned.
 If both have the same number of dimensions, the storage order of X is returned.
 • If neither X nor Y are rtables, the suggested storage order is Fortran_order.
 • This function is part of the ArrayTools package, so it can be used in the short form SuggestedOrder(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[SuggestedOrder](..).

Examples

 > $\mathrm{with}\left(\mathrm{ArrayTools}\right):$
 > $\mathrm{AF1}≔\mathrm{Array}\left(\left[1,2,3\right],\mathrm{order}=\mathrm{Fortran_order}\right)$
 ${\mathrm{AF1}}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\end{array}\right]$ (1)
 > $\mathrm{AC1}≔\mathrm{Array}\left(\left[1,2,3\right],\mathrm{order}=\mathrm{C_order}\right)$
 ${\mathrm{AC1}}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\end{array}\right]$ (2)
 > $\mathrm{AC2}≔\mathrm{Array}\left(\left[\left[1,2\right],\left[3,4\right]\right],\mathrm{order}=\mathrm{C_order}\right)$
 ${\mathrm{AC2}}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (3)
 > $\mathrm{SuggestedOrder}\left(\mathrm{AF1},\mathrm{AC1}\right)$
 ${\mathrm{Fortran_order}}$ (4)
 > $\mathrm{SuggestedOrder}\left(\mathrm{AF1},\mathrm{AC2}\right)$
 ${\mathrm{C_order}}$ (5)
 > $\mathrm{SuggestedOrder}\left(42,\mathrm{AC1}\right)$
 ${\mathrm{C_order}}$ (6)
 > $\mathrm{SuggestedOrder}\left(x,y\right)$
 ${\mathrm{Fortran_order}}$ (7)

Compatibility

 • The ArrayTools[SuggestedOrder] command was introduced in Maple 2021.
 • For more information on Maple 2021 changes, see Updates in Maple 2021.