The symmetric Indexing Function - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Tables, lists, and sets : indexing functions : indexfcn/symmetric

The symmetric Indexing Function

Description

 • The symmetric indexing function can be used to construct tables and rtable objects of type Array or Matrix.
 • In the construction of 2-dimensional objects, the symmetric indexing function specifies that the (i, j)th element equals the (j, i)th element.
 • In general, this indexing function specifies that all entries of an object whose indices are equal under permutations are the same.
 The indices are rearranged according to a system-determined canonical ordering.

Examples

 > $M≔\mathrm{Matrix}\left(1..3,1..3,\mathrm{shape}=\mathrm{symmetric}\right)$
 ${M}{≔}\left[\begin{array}{ccc}{0}& {0}& {0}\\ {0}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (1)
 > ${M}_{1,2}≔5$
 ${{M}}_{{1}{,}{2}}{≔}{5}$ (2)
 > $M$
 $\left[\begin{array}{ccc}{0}& {5}& {0}\\ {5}& {0}& {0}\\ {0}& {0}& {0}\end{array}\right]$ (3)
 > $A≔\mathrm{Array}\left(\mathrm{symmetric},1..5,1..5\right):$
 > $A$
 $\left[\begin{array}{ccccc}{0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\end{array}\right]$ (4)
 > ${A}_{3,4}≔x:$
 > ${A}_{4,3}$
 ${x}$ (5)
 > ${A}_{4,3}≔y:$
 > ${A}_{3,4}$
 ${y}$ (6)
 > $A$
 $\left[\begin{array}{ccccc}{0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\\ {0}& {0}& {0}& {y}& {0}\\ {0}& {0}& {y}& {0}& {0}\\ {0}& {0}& {0}& {0}& {0}\end{array}\right]$ (7)
 > $T≔\mathrm{table}\left(\mathrm{symmetric}\right):$
 > ${T}_{\mathrm{function},\mathrm{continuous},\mathrm{odd}}≔f:$
 > ${T}_{\mathrm{odd},\mathrm{continuous},\mathrm{function}}$
 ${f}$ (8)