Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
tutorial:data [2017/09/27 19:05] – [Handling complex data types] added section on saving VISUAL objects oroehrig | user_guide:tutorials:data [2019/02/11 16:43] – ↷ Links adapted because of a move operation oroehrig | ||
---|---|---|---|
Line 8: | Line 8: | ||
To store polymake objects use the command | To store polymake objects use the command | ||
> save($p," | > save($p," | ||
+ | This silently overwrites existing files. | ||
+ | | ||
polymake objects that are stored in polymake' | polymake objects that are stored in polymake' | ||
> $p=load(" | > $p=load(" | ||
- | If you did not start '' | + | If you did not start '' |
$p=load(" | $p=load(" | ||
+ | TAB completion like in a usual UNIX shell supports you in navigating through the file system. | ||
+ | |||
+ | |||
**Note:** If you load a polymake object and compute new properties, these properties will automatically be added to the original XML-file at the end of the session. You can suppress this with the command | **Note:** If you load a polymake object and compute new properties, these properties will automatically be added to the original XML-file at the end of the session. You can suppress this with the command | ||
> $p-> | > $p-> | ||
- | called prior to leaving the session (but after the last compuation | + | called prior to leaving the session (but after the last computation |
+ | |||
+ | If you want to store a collection of objects into a single file, there is an [[..: | ||
===== Handling complex data types ===== | ===== Handling complex data types ===== | ||
- | It is also possible to store complex | + | Apart from the full objects, you can also persistently |
> $s=new Set< | > $s=new Set< | ||
- | > save_data($s," | + | > save_data($s, |
+ | The description text is optional; it can be an arbitrary text, even stretching over several lines. | ||
To load such files just type | To load such files just type | ||
> $s=load_data(" | > $s=load_data(" | ||
- | |||
===== Saving visualized objects ===== | ===== Saving visualized objects ===== | ||
- | Furthermore, | + | Furthermore, |
To save the cube visualized via JReality in a new file called '' | To save the cube visualized via JReality in a new file called '' | ||
< | < | ||
- | To save the cube as a TiKz file named '' | + | To save the cube as a TiKz file named '' |
< | < | ||