Mathematica 9 is now available

Orderless

Usage

Orderless 是一个属性,可以赋予一个符号 f指定f[ ,  , ... ] 形式的表达式中的元素  应当自动排序为范序。这个性质在模式匹配中解释。


Notes

• 对一个函数Orderless 属性相应于数学上的交换律。
• 有属性Orderless的函数使用在Sort的注解中描述的规范序。
• 对表示一个矩阵或张量的对象,属性Orderless表示指标对称。
• 象PlusTimes的函数是Orderless
• 在有函数Orderless的模式匹配中,试用自变量的所有可能的序。
• 属性Orderless必须在对函数Orderless定义任何值前分配。
• 参见 Mathematica 全书: 2.3.7 and 节 2.5.3.
• 同时参见: Sort, Flat, OneIdentity.
Further Examples

Functions without the Orderless attribute are not rearranged into a canonical order; with it, they are.

In[1]:=  

Out[1]=

In[2]:=  

In[3]:=  

Out[3]=

In[4]:=  



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.