|
SOLUTIONS
|
MATHEMATICA 内置符号
Shortest
Shortest[p]
一个与模式 p 匹配的最短序列的模式对象.
更多信息更多信息
- Shortest 可用于普通表达式模式和字符模式.
- 几个 Shortest 对象出现在同一个表达式中,最先给出的有匹配的最高优先级.
- 给出有优先级 pri 的最短序列 Shortest[p, pri] 中. 首先对有更高优先级的 Shortest 对象,进行匹配最短序列的操作.
- 优先级可以是任何表达式,并且按标准的Mathematica Sort 排序. Shortest[p] 规定尽可能高的优先级.
- 具有同等优先的 Shortest 对象尝试使用在表达式中出现的顺序.
- 若给出明确的 Shortest 或 Longest ,普通表达式的模式设定为 Longest[p] 时,字符模式设定为 Shortest[p].
- 对于普通表达式,Shortest[p] 指定不只 p 的本身,而且 p 的所有部分均匹配最短序列.
版本 6 的新功能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
