Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
user_guide:shell [2019/02/05 13:52] – [The polymake Interactive Shell] fixed link oroehrig | user_guide:shell [2021/01/12 15:38] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== The polymake Interactive Shell ===== | ===== The polymake Interactive Shell ===== | ||
- | The default running mode of polymake is an interactive shell-like interpreter. | + | The default running mode of polymake is an interactive shell-like interpreter. |
polymake excessively uses the TAB completion feature. | polymake excessively uses the TAB completion feature. | ||
Line 19: | Line 19: | ||
Finally, you can just enter a bare '' | Finally, you can just enter a bare '' | ||
- | ==== Switching between applications ==== | ||
- | |||
- | Applications are, collections of object types, functions, and other stuff related to some distinct mathematical subject. | ||
- | |||
- | The only difference between the current application and the rest is that you can call the functions and object constructors of the former without having to qualify them with the application name as a prefix. | ||
==== Continuation mode ==== | ==== Continuation mode ==== | ||
+ | |||
Each command must be concluded with a semicolon. If you hit ENTER without doing so, polymake supposes that your expression is going to be continued on the next line; you will see this on the changed input prompt, which will contain the continuation number in parentheses. This is useful for typing in conditional blocks or loops over several lines or the input of multi-line constants (e.g. for matrices). You can press Ctrl-C to escape from the continuation mode. | Each command must be concluded with a semicolon. If you hit ENTER without doing so, polymake supposes that your expression is going to be continued on the next line; you will see this on the changed input prompt, which will contain the continuation number in parentheses. This is useful for typing in conditional blocks or loops over several lines or the input of multi-line constants (e.g. for matrices). You can press Ctrl-C to escape from the continuation mode. | ||
+ | |||
+ | A neat trick to conveniently enter a matrix using the continuation mode: | ||
+ | < | ||
+ | polytope > $m = <<" | ||
+ | polytope (2)> 1 0 0 0 | ||
+ | polytope (3)> 1 1 0 0 | ||
+ | polytope (4)> 1 0 1 0 | ||
+ | polytope (5)> 1 0 0 1 | ||
+ | polytope (6)> . | ||
+ | </ | ||
==== History and replaying ==== | ==== History and replaying ==== | ||
Line 39: | Line 45: | ||
:: appends the commands stored in the given file to the history, rewinds back to the first of them, and turns on the replay mode. This command is especially useful for making live demos with polymake, as you can prepare and test your input in advance and don't have to waste your time for typing during the presentation. | :: appends the commands stored in the given file to the history, rewinds back to the first of them, and turns on the replay mode. This command is especially useful for making live demos with polymake, as you can prepare and test your input in advance and don't have to waste your time for typing during the presentation. | ||
| | ||
- | Finally, let's mention two [[# | + | Finally, let's mention two [[howto: |
? '' | ? '' | ||
Line 45: | Line 51: | ||
? '' | ? '' | ||
:: contains the command starting the editor when you call '' | :: contains the command starting the editor when you call '' | ||
+ | |||
+ | ===== Most Important Commands ===== | ||
+ | |||
+ | Precisely speaking, polymake commands are quite normal perl functions, either built-in ones like '' | ||
+ | |||
+ | < | ||
+ | print " | ||
+ | print(" | ||
+ | </ | ||
+ | |||
+ | It's completely up to your taste which fashion to use. But never forget the trailing semicolon! | ||
+ | |||
+ | The first command to learn is '' | ||
+ | |||
+ | ==== Switching between applications ==== | ||
+ | |||
+ | Applications are, roughly speaking, collections of object types, functions, and other stuff related to some distinct mathematical subject. | ||
+ | |||
+ | As a matter of fact, the only difference between the current application and the rest is that you can call the functions and object constructors of the former without having to qualify them with the application name as a prefix; however, this is a quite comfortable feature. | ||
+ |