This shows you the differences between two versions of the page.
documentation:ref:invertindices [2015/11/20 19:33] poslavskysv [Examples] |
documentation:ref:invertindices [2015/11/21 12:33] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== InvertIndices ====== | ||
- | ====Description==== | ||
- | * ''InvertIndices'' inverts indices of tensors | ||
- | * ''%%InvertIndices[type]%%'' inverts indices of specified type | ||
- | ====Examples==== | ||
- | ---- | ||
- | Expand a power of a product: | ||
- | <sxh groovy; gutter: false> | ||
- | def t = '(a*b*c)**d'.t | ||
- | println PowerExpand >> t | ||
- | </sxh> | ||
- | <sxh plain; gutter: false> | ||
- | > a**d*b**d*c**d | ||
- | </sxh> | ||
- | ---- | ||
- | Expand with respect to ''a'': | ||
- | <sxh groovy; gutter: false> | ||
- | def t = '(a*b*c)**d'.t | ||
- | println PowerExpand['a'] >> t | ||
- | </sxh> | ||
- | <sxh plain; gutter: false> | ||
- | > a**d*(b*c)**d | ||
- | </sxh> | ||
- | ---- | ||
- | Expand a square root: | ||
- | <sxh groovy; gutter: false> | ||
- | def t = '(a*b)**(1/2)'.t | ||
- | println PowerExpand >> t | ||
- | </sxh> | ||
- | <sxh plain; gutter: false> | ||
- | > a**(1/2) * b**(1/2) | ||
- | </sxh> | ||
- | ---- |