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

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : rtable_set_indfn

rtable_set_indfn

set or append to indexing functions of an rtable

 Calling Sequence rtable_set_indfn(A, f) rtable_set_indfn(A, f, inplace, append) rtable_set_indfn(A) rtable_set_indfn(A, f1, f2, ...)

Parameters

 A - rtable f - indexing function inplace - (optional) truefalse, default is false append - (optional) truefalse, default is false

Description

 • The rtable_set_indfn(A, f) command creates an alias of A with the given indexing functions. If inplace=true is specified, then the original rtable, A, is modified in-place.
 • The stored data of A remains unchanged and is not validated to ensure consistency with the new indexing function.  For example, you are not prevented from applying a symmetric indexing function on a matrix that is not symmetric.
 • Executing rtable_set_indfn(A), without any arguments following the rtable will return an rtable with no indexing functions.
 • The option, append=true can be used to add an additional indexing-function to the rtable, adding to the list of existing indexing functions already present.  The internal order of the additional indexing function may be rearranged, so it is not guaranteed that the appended indexing functions will appear at the end.
 • This command is particularly useful for adding a Units indexing function, which applies a Unit to an rtable without modifying the underlying data.  In particular, this command can be used to put a unit back on a result rtable after removing the units from the input rtables for the purpose of fast hardware computations.

Examples

 > $M≔\mathrm{Array}\left(1..3,i↦{i}^{2}\right)$
 ${M}{≔}\left[\begin{array}{ccc}{1}& {4}& {9}\end{array}\right]$ (1)
 > $M\left[3\right]$
 ${9}$ (2)
 > $R≔\mathrm{rtable_set_indfn}\left(M,\mathrm{Unit}\left(s\right)\right)$
 ${R}{≔}\left[\begin{array}{ccc}⟦{s}⟧& {4}{}⟦{s}⟧& {9}{}⟦{s}⟧\end{array}\right]$ (3)
 > $R\left[3\right]$
 ${9}{}⟦{s}⟧$ (4)

Compatibility

 • The rtable_set_indfn command was introduced in Maple 2024.
 • For more information on Maple 2024 changes, see Updates in Maple 2024.

 See Also