This shows you the differences between two versions of the page.
documentation:ref:powerexpand [2015/11/21 12:33] |
documentation:ref:powerexpand [2015/11/21 12:33] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PowerExpand ====== | ||
+ | ---- | ||
+ | ====Description==== | ||
+ | |||
+ | * ''PowerExpand'' expands all powers of products and powers. | ||
+ | |||
+ | * ''PowerExpand[var1, var2, ...]'' expands only with respect to the variables ''var1'', ''var2'', ... | ||
+ | |||
+ | |||
+ | ====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> | ||
+ | ---- | ||
+ | |||
+ | ====See also==== | ||
+ | * Related guides: [[documentation:guide:applying_and_manipulating_transformations]], [[documentation:guide:list_of_transformations]] | ||
+ | * Related transformations: [[documentation:ref:powerunfold]] | ||
+ | * JavaDocs: [[http://api.redberry.cc/redberry/1.1.9/java-api/cc/redberry/core/transformations/powerexpand/PowerExpandTransformation.html|PowerExpandTransformation]] | ||
+ | * Source code: [[https://bitbucket.org/redberry/redberry/src/tip/core/src/main/java/cc/redberry/core/transformations/powerexpand/PowerExpandTransformation.java|PowerExpandTransformation.java]] | ||