This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
documentation:ref:invertindices [2015/11/20 19:33] poslavskysv [InvertIndices] |
documentation:ref:invertindices [2015/11/21 12:33] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
* ''InvertIndices'' inverts indices of tensors | * ''InvertIndices'' inverts indices of tensors | ||
* ''%%InvertIndices[type]%%'' inverts indices of specified type | * ''%%InvertIndices[type]%%'' inverts indices of specified type | ||
- | ===== Examples ===== | + | ====Examples==== |
+ | ---- | ||
+ | Invert indices of some expression | ||
+ | <sxh groovy; gutter: false> | ||
+ | println InvertIndices >> 'A_mn'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > A^mn | ||
+ | </sxh> | ||
+ | <sxh groovy; gutter: false> | ||
+ | println InvertIndices >> 'A_mn*(p^m + q^m) + T_n'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > A_m^n*(p^m + q^m) + T^n | ||
+ | </sxh> | ||
+ | |||
+ | ---- | ||
+ | Invert only indices of certain type: | ||
+ | <sxh groovy; gutter: false> | ||
+ | println InvertIndices[LatinLower] >> 'T_ABmn'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > T_AB^mn | ||
+ | </sxh> | ||
+ | <sxh groovy; gutter: false> | ||
+ | println InvertIndices[GreekLower] >> 'A_{mn\\mu}*(p^m + q^m) + T_{n\\mu}'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > A_{mn}^{\\mu}*(p^m + q^m) + T_{n}^{\\mu} | ||
+ | </sxh> | ||
+ | |||
+ | ====See also==== | ||
+ | * Related guides: [[documentation:guide:applying_and_manipulating_transformations]], [[documentation:guide:list_of_transformations]], [[documentation:guide:programming_with_redberry|]] | ||