This shows you the differences between two versions of the page.
documentation:ref:powerunfold [2015/11/21 12:33] |
documentation:ref:powerunfold [2015/11/21 12:33] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PowerUnfold ====== | ||
+ | ---- | ||
+ | |||
+ | ====Description==== | ||
+ | |||
+ | * ''PowerUnfold'' expands all powers of products and unfolds powers of indexed arguments into products. | ||
+ | |||
+ | * ''PowerUnfold[var1, var2, ...]'' expands only with respect to the variables ''var1'', ''var2'', ... | ||
+ | |||
+ | * ''PowerUnfold'' is similar to ''PowerExpand'' when applied to indexless expressions. | ||
+ | |||
+ | * ''PowerUnfold'' is effectively the inverse of [[documentation:ref:collectscalars]]. | ||
+ | ====Examples==== | ||
+ | ---- | ||
+ | Unfold power of tensors: | ||
+ | <sxh groovy; gutter: false> | ||
+ | println PowerUnfold >> '(A_m*A^m)**3'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > A_{m}*A^{m}*A_{a}*A^{a}*A_{b}*A^{b} | ||
+ | </sxh> | ||
+ | ---- | ||
+ | Unfold with respect to ''A_m'': | ||
+ | <sxh groovy; gutter: false> | ||
+ | println PowerUnfold['A_m'] >> '(A_m*A^m)**3*(B_m*B^m)**2'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > (B_m*B^m)**2*A_{m}*A^{m}*A_{a}*A^{a}*A_{b}*A^{b} | ||
+ | </sxh> | ||
+ | ---- | ||
+ | ''PowerUnfold'' works same as [[documentation:ref:powerexpand|PowerExpand]] in the case of indexless expressions: | ||
+ | <sxh groovy; gutter: false> | ||
+ | println PowerUnfold >> '(a*b)**(1/2)'.t | ||
+ | </sxh> | ||
+ | <sxh plain; gutter: false> | ||
+ | > a**(1/2)*b**(1/2) | ||
+ | </sxh> | ||
+ | ---- | ||
+ | ====See also==== | ||
+ | * Related guides: [[documentation:guide:applying_and_manipulating_transformations]], [[documentation:guide:list_of_transformations]] | ||
+ | * Related transformations: [[documentation:ref:collectscalars]], [[documentation:ref:powerexpand]] | ||
+ | * JavaDocs: [[http://api.redberry.cc/redberry/1.1.9/java-api/cc/redberry/core/transformations/powerexpand/PowerUnfoldTransformation.html|PowerUnfoldTransformation]] | ||
+ | * Source code: [[https://bitbucket.org/redberry/redberry/src/tip/core/src/main/java/cc/redberry/core/transformations/powerexpand/PowerUnfoldTransformation.java|PowerUnfoldTransformation.java]] | ||