SymmetrizedArray
SymmetrizedArray[{pos1val1,pos2val2,…},dims,sym]
yields an array of dimensions dims whose entries are given by those in the rules posivali or through the symmetry sym.
SymmetrizedArray[list]
yields a symmetrized array version of list.
Details
- SymmetrizedArray[…] is converted to a structured array expression of the form SymmetrizedArray[StructuredData[dims,{comps,sym}]] that contains the independent components comps and the symmetry sym of the input.
- SymmetrizedArray takes unspecified elements to be 0.
- Normal[SymmetrizedArray[…]] gives the ordinary array corresponding to a symmetrized array object.
- SymmetrizedArrayRules[SymmetrizedArray[…]] gives the list of independent rules {pos1val1,pos2val2,…}.
- ArrayRules[SymmetrizedArray[…]] gives the list of both dependent and independent rules {pos1val1,pos2val2,…}.
- The elements in a SymmetrizedArray object need not be numeric.
- The position specifications posi can contain patterns.
- With rules posivali, the vali are evaluated separately for each independent component that matches posi.
- SymmetrizedArray[list] requires that list be a full array, with all parts at a particular level being lists of the same length.
- The individual elements of a symmetrized array cannot themselves be lists.
- SymmetrizedArray[rules] yields a symmetrized array, with dimensions exactly large enough to include elements whose positions have been explicitly specified.
- SymmetrizedArray[structureddata] is treated as a raw object by functions like AtomQ and for purposes of pattern matching.
Examples
open allclose allBasic Examples (2)
Scope (8)
Construct a symmetrized array from rules:
SymmetrizedArray form of an array with symmetry:
SymmetrizedArray form of an array with antisymmetry:
Construct a symmetrized array of larger dimensions:
Let the Wolfram Language choose the minimal dimensions:
Construct a random skew-symmetric array:
Specify an arbitrary symmetry using generators:
An empty list of generators represents no symmetry:
Use generators with any root of unity:
Symmetrized arrays include properties that give information about the array:
The "Summary" property gives a brief summary of information about the array:
The "StructuredAlgorithms" property gives a list of functions that have algorithms that use the structure of the representation:
Applications (5)
Construct an antisymmetric array:
Only the independent components are stored:
Extract any component of the array:
Construct an antisymmetric matrix:
Multiple tensor product of the matrix with itself:
The result contains only 15 independent components, all with different values:
The sparse and normal representations are larger:
Antisymmetric arrays of ranks 4 and 10 in dimension 15:
The wedge product of those antisymmetric arrays can be computed efficiently:
The result can be presented in a shorter form through its Hodge dual:
Construct the array of all sixth-order partial derivatives of a function of four variables:
It is a depth-6 array in dimension 4, and therefore it has 4096 entries:
It is also a fully symmetric array, due to commutation of the partial derivatives:
Most entries are repeated multiple times and therefore the array is large:
The SymmetrizedArray representation stores each of the independent entries only once:
The normal form of the array can be recovered using Normal:
Construct a 4-variate distribution, using a symmetric matrix Σ:
Define a function that computes a moment of that distribution for given variable indices:
Construct the array of moments of order 6:
Moment and cumulant arrays for a multivariate distribution are fully symmetric:
Use SymmetrizedArray to compute each independent moment only once:
Properties & Relations (5)
If the same entry is specified several times, the average of those values is used:
For a nonsymmetric array, the result is a projected symmetrized part:
SymmetrizedArray offers a very compact representation of antisymmetric arrays:
SymmetrizedArray allows a compact representation of symmetric arrays:
A symmetric matrix can be represented using SymmetrizedArray or SymmetricMatrix:
The two representations are equal, but support different algorithms:
SymmetrizedArray supports tensorial operations such as D, Flatten, Inner and Outer:
SymmetricMatrix supports matrix-specific operations such as KroneckerProduct:
HermitianMatrix bears an analogous relationship to SymmetrizedArray for Hermitian matrices:
Possible Issues (1)
Text
Wolfram Research (2012), SymmetrizedArray, Wolfram Language function, https://reference.wolfram.com/language/ref/SymmetrizedArray.html (updated 2020).
CMS
Wolfram Language. 2012. "SymmetrizedArray." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/SymmetrizedArray.html.
APA
Wolfram Language. (2012). SymmetrizedArray. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SymmetrizedArray.html