1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973
|
% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[a4paper,11pt]{report}
\usepackage[top=37mm,bottom=37mm,left=27mm,right=27mm]{geometry}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\makeindex
\usepackage{color}
\definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083}
\definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179}
\definecolor{RoyalGreen}{rgb}{0.0236,0.6179,0.0894}
\definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894}
\definecolor{LightBlue}{rgb}{0.8544,0.9511,1.0000}
\definecolor{Black}{rgb}{0.0,0.0,0.0}
\definecolor{linkColor}{rgb}{0.0,0.0,0.554}
\definecolor{citeColor}{rgb}{0.0,0.0,0.554}
\definecolor{fileColor}{rgb}{0.0,0.0,0.554}
\definecolor{urlColor}{rgb}{0.0,0.0,0.554}
\definecolor{promptColor}{rgb}{0.0,0.0,0.589}
\definecolor{brkpromptColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapinputColor}{rgb}{0.589,0.0,0.0}
\definecolor{gapoutputColor}{rgb}{0.0,0.0,0.0}
%% for a long time these were red and blue by default,
%% now black, but keep variables to overwrite
\definecolor{FuncColor}{rgb}{0.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,0.0}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}
\usepackage{fancyvrb}
\usepackage{mathptmx,helvet}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[
pdftex=true,
bookmarks=true,
a4paper=true,
pdftitle={Written with GAPDoc},
pdfcreator={LaTeX with hyperref package / GAPDoc},
colorlinks=true,
backref=page,
breaklinks=true,
linkcolor=linkColor,
citecolor=citeColor,
filecolor=fileColor,
urlcolor=urlColor,
pdfpagemode={UseNone},
]{hyperref}
\newcommand{\maintitlesize}{\fontsize{50}{55}\selectfont}
% write page numbers to a .pnr log file for online help
\newwrite\pagenrlog
\immediate\openout\pagenrlog =\jobname.pnr
\immediate\write\pagenrlog{PAGENRS := [}
\newcommand{\logpage}[1]{\protect\write\pagenrlog{#1, \thepage,}}
%% were never documented, give conflicts with some additional packages
\newcommand{\GAP}{\textsf{GAP}}
%% nicer description environments, allows long labels
\usepackage{enumitem}
\setdescription{style=nextline}
%% depth of toc
\setcounter{tocdepth}{1}
%% command for ColorPrompt style examples
\newcommand{\gapprompt}[1]{\color{promptColor}{\bfseries #1}}
\newcommand{\gapbrkprompt}[1]{\color{brkpromptColor}{\bfseries #1}}
\newcommand{\gapinput}[1]{\color{gapinputColor}{#1}}
\begin{document}
\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\mbox{}\vfill
\begin{center}{\maintitlesize \textbf{ polymaking \mbox{}}}\\
\vfill
\hypersetup{pdftitle= polymaking }
\markright{\scriptsize \mbox{}\hfill polymaking \hfill\mbox{}}
{\Huge \textbf{ Interfacing the geometry software polymake \mbox{}}}\\
\vfill
{\Huge Version 0.8.8 \mbox{}}\\[1cm]
{ 3 December 2025 \mbox{}}\\[1cm]
\mbox{}\\[2cm]
{\Large \textbf{ Marc Roeder\\
\mbox{}}}\\
\hypersetup{pdfauthor= Marc Roeder\\
}
\end{center}\vfill
\mbox{}\\
{\mbox{}\\
\small \noindent \textbf{ Marc Roeder\\
} Email: \href{mailto://roeder.marc@gmail.com} {\texttt{roeder.marc@gmail.com}}}\\
\end{titlepage}
\newpage\setcounter{page}{2}
{\small
\section*{Abstract}
\logpage{[ 0, 0, 1 ]}
This package provides a very basic interface to the polymake program by
Ewgenij Gawrilow, Michael Joswig et al. \cite{polymake}. The polymake program itself is not included. \mbox{}}\\[1cm]
{\small
\section*{Copyright}
\logpage{[ 0, 0, 2 ]}
{\copyright} 2007\texttt{\symbol{45}}\texttt{\symbol{45}}2013 Marc Roeder.
This package is distributed under the terms of the GNU General Public License
version 2 or later (at your convenience). See the file "LICENSE" or \href{https://www.gnu.org/copyleft/gpl.html} {\texttt{https://www.gnu.org/copyleft/gpl.html}} \mbox{}}\\[1cm]
{\small
\section*{Acknowledgements}
\logpage{[ 0, 0, 3 ]}
This work has been supported by Marie Curie Grant No.
MTKD\texttt{\symbol{45}}CT\texttt{\symbol{45}}2006\texttt{\symbol{45}}042685 \mbox{}}\\[1cm]
\newpage
\def\contentsname{Contents\logpage{[ 0, 0, 4 ]}}
\tableofcontents
\newpage
\chapter{\textcolor{Chapter }{Installation and Preface}}\label{chap:environment}
\logpage{[ 1, 0, 0 ]}
\hyperdef{L}{X8794FBB27B46C08E}{}
{
To install the package, just unpack it in your packages directory (usually \texttt{\texttt{\symbol{126}}/gap/pkg} for local installation). To use \textsf{polymaking}, you need a working installation of the program polymake \href{https://polymake.org} {\texttt{https://polymake.org}}. The package has been tested on linux and Mac OS X (10.4, 10.5 and 10.6). But
it should be as platform independent as \textsf{GAP} and polymake.
The interaction with polymake is restricted to writing files and carrying out
simple operations. These looked like \\
\texttt{polymake file KEYWORD1 KEYWORD2 KEYWORD3} \\
on the command line for polymake versions before 4. The keywords are polymake
methods without arguments. Since polymake no longer supports this interface
the polymaking package provides the script \texttt{lib/pm{\textunderscore}script{\textunderscore}arg.pl} to emulate this. \\
\texttt{polymake {\textendash}{\textendash}script
lib/pm{\textunderscore}script{\textunderscore}arg.pl KEYWORD1 KEYWORD2
KEYWORD3} \\
Using custom scripts is not supported.\\
Every call to polymake will re\texttt{\symbol{45}}start the program anew. This
causes considerable overhead. The number of calls to polymake is reduced by
caching the results in the so\texttt{\symbol{45}}called \texttt{PolymakeObject} in GAP. As of polymaking version 0.8.0, old versions of polymake (i.e.
versions before 2.7.9) are not supported anymore.
\section{\textcolor{Chapter }{A few words about the installation of polymake}}\label{chap:polymakeinstall}
\logpage{[ 1, 1, 0 ]}
\hyperdef{L}{X7A02C64B7A3777FF}{}
{
\textsf{polymaking} will try to guess the location of polymake. If this fails, a warning is issued
at load time (\texttt{InfoWarning} level 1). Note that the guessing procedure is suppressed when \texttt{POLYMAKE{\textunderscore}COMMAND} (\ref{POLYMAKEuScoreCOMMAND}) is set manually (see \ref{SetVarPermanently}). \\
\texttt{setenv PATH \$\texttt{\symbol{123}}PATH\texttt{\symbol{125}}:{\textless}your
polymakepath{\textgreater}} \\
The general rule is: If \textsf{polymaking} finds polymake by itself, there is nothing to worry about. }
\section{\textcolor{Chapter }{Setting variables for external programs}}\label{chap:varsetters}
\logpage{[ 1, 2, 0 ]}
\hyperdef{L}{X851C596486F918F0}{}
{
As \textsf{polymaking} uses the program polymake, it needs to know where this program lives. The
communication with polymake is done by writing files for polymake and reading
its output (as returned to standard output "the prompt"). Note that the
interface does not read any polymake file.
\subsection{\textcolor{Chapter }{SetPolymakeDataDirectory}}
\logpage{[ 1, 2, 1 ]}\nobreak
\hyperdef{L}{X794A38E981F9E76F}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{SetPolymakeDataDirectory({\mdseries\slshape dir})\index{SetPolymakeDataDirectory@\texttt{SetPolymakeDataDirectory}}
\label{SetPolymakeDataDirectory}
}\hfill{\scriptsize (method)}}\\
Sets the directory in which all polymake files are created to \mbox{\texttt{\mdseries\slshape dir}}. The standard place for these files is a temporary directory generated when
the package is loaded. This manipulates \texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR} (\ref{POLYMAKEuScoreDATAuScoreDIR}). }
\subsection{\textcolor{Chapter }{SetPolymakeCommand}}
\logpage{[ 1, 2, 2 ]}\nobreak
\hyperdef{L}{X854645287BC9303E}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{SetPolymakeCommand({\mdseries\slshape command})\index{SetPolymakeCommand@\texttt{SetPolymakeCommand}}
\label{SetPolymakeCommand}
}\hfill{\scriptsize (method)}}\\
Sets the name for the polymake program to \mbox{\texttt{\mdseries\slshape command}}. This manipulates \texttt{POLYMAKE{\textunderscore}COMMAND} (\ref{POLYMAKEuScoreCOMMAND}). }
\subsection{\textcolor{Chapter }{Setting variables permanently}}\label{SetVarPermanently}
\logpage{[ 1, 2, 3 ]}
\hyperdef{L}{X7943B579846BDB76}{}
{
To permanently set the values of \texttt{POLYMAKE{\textunderscore}COMMAND} (\ref{POLYMAKEuScoreCOMMAND}), and \texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR} (\ref{POLYMAKEuScoreDATAuScoreDIR}), add the lines }
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=]
POLYMAKE_DATA_DIR:=Directory("/home/mypolymakedatadir");
POLYMAKE_COMMAND:=Filename(Directory("/home/mypolymakebindir/"),"polymake");
\end{Verbatim}
to your \texttt{.gaprc} file (see \textbf{Reference: The gap.ini and gaprc files}). Note that these have to be \emph{before} the \texttt{LoadPackage("polymaking");} line. Or you can change the values of the above variables by editing \texttt{lib/environment.gi} }
}
\chapter{\textcolor{Chapter }{Polymake interaction}}\logpage{[ 2, 0, 0 ]}
\hyperdef{L}{X86C82DCF81362F41}{}
{
\section{\textcolor{Chapter }{Creating Polymake Objects}}\label{creatingPolymakeObjects}
\logpage{[ 2, 1, 0 ]}
\hyperdef{L}{X83D426D5855D1FD6}{}
{
The interaction with the polymake program is done via files. A \texttt{PolymakeObject} is mainly a pointer to a file and a list of known properties of the object.
These properties need not be stored in the file. Whenever polymake is called,
the returned value is read from standard output and stored in the \texttt{PolymakeObject} corresponding to the file for which polymake is called. The files for polymake
are written in the old (non\texttt{\symbol{45}}xml) format. The first run of
polymake converts them into the new (xml) format. This means that changes to
the file by means of the methods outlined below after the first run of
polymake will probably lead to corrupted files.
\subsection{\textcolor{Chapter }{CreateEmptyFile}}
\logpage{[ 2, 1, 1 ]}\nobreak
\hyperdef{L}{X7C87B1807E036A85}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{CreateEmptyFile({\mdseries\slshape filename})\index{CreateEmptyFile@\texttt{CreateEmptyFile}}
\label{CreateEmptyFile}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
nothing
Creates an empty file with name \mbox{\texttt{\mdseries\slshape filename}}. Note that \mbox{\texttt{\mdseries\slshape filename}} has to include the full path and the directory for the file must exist. }
\subsection{\textcolor{Chapter }{CreatePolymakeObject}}
\logpage{[ 2, 1, 2 ]}\nobreak
\hyperdef{L}{X8625E7E2845F1634}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{CreatePolymakeObject({\mdseries\slshape [prefix][,] [dir][,] [appvertyp]})\index{CreatePolymakeObject@\texttt{CreatePolymakeObject}}
\label{CreatePolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
\texttt{PolymakeObject}
If called without arguments, this method generates an empty file in the
directory defined by \texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR} (\ref{POLYMAKEuScoreDATAuScoreDIR}). If a directory \mbox{\texttt{\mdseries\slshape dir}} is given (this directory must exist), an empty file is generated in this
directory. If \mbox{\texttt{\mdseries\slshape prefix}} is not given, the file is called \texttt{polyN} where \texttt{N} is the current runtime. If a file of this name already exists, a number is
appended separated by a dot (example: "poly1340" and "poly1340.1"). If \mbox{\texttt{\mdseries\slshape prefix}} is given, the filename starts with this prefix. Optionally, the file can be
generated with a header specifying application, version and type of the
object. This is done by passing the triple of strings \mbox{\texttt{\mdseries\slshape appvertyp}} to \texttt{CreatePolymakeObject}. A valid triple is \texttt{["polytope","2.3","RationalPolytope"]}. Validity is checked by \texttt{CheckAppVerTypList} (\ref{CheckAppVerTypList}). }
\subsection{\textcolor{Chapter }{CheckAppVerTypList}}
\logpage{[ 2, 1, 3 ]}\nobreak
\hyperdef{L}{X8135E88E87DD1551}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{CheckAppVerTypList({\mdseries\slshape appvertyp})\index{CheckAppVerTypList@\texttt{CheckAppVerTypList}}
\label{CheckAppVerTypList}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
\texttt{bool}
Checks if the triple \mbox{\texttt{\mdseries\slshape arppvertyp}} of strings specifies an application and type of polymake version 2.3. More
specifically, the first entry has to be an application from \texttt{["polytope","surface","topaz"]} and the third entry has to be a type corresponding to the application given in
the first entry. The second entry is not checked.\\
}
\subsection{\textcolor{Chapter }{CreatePolymakeObjectFromFile}}
\logpage{[ 2, 1, 4 ]}\nobreak
\hyperdef{L}{X7801F05A81E23EED}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{CreatePolymakeObjectFromFile({\mdseries\slshape [dir, ]filename})\index{CreatePolymakeObjectFromFile@\texttt{CreatePolymakeObjectFromFile}}
\label{CreatePolymakeObjectFromFile}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
\texttt{PolymakeObject}
This method generates a \texttt{PolymakeObject} corresponding to the file \mbox{\texttt{\mdseries\slshape filename}} in the directory \mbox{\texttt{\mdseries\slshape dir}}. If \mbox{\texttt{\mdseries\slshape dir}} is not given, the \texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR} is used.If no file with name \mbox{\texttt{\mdseries\slshape filename}} exists in \mbox{\texttt{\mdseries\slshape dir}} (or \texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR}, respectively), an empty file is created. Note that the contents of the file
do not matter for the generation of the object. In particular, the object does
not know any of the properties that might be encoded in the file. The only way
to transfer information from files to \texttt{PolymakeObject}s is via \texttt{Polymake} (\ref{Polymake}). }
}
\section{\textcolor{Chapter }{Accessing Properties of Polymake Objects}}\label{accessingProperties}
\logpage{[ 2, 2, 0 ]}
\hyperdef{L}{X7D9EBB0383B9BD1C}{}
{
A \texttt{PolymakeObject} contains information about the directory of its file, the name of its file and
about properties calculated by calling \texttt{Polymake} (\ref{Polymake}). The properties returned by the \texttt{polymake} program are stored under the name \texttt{polymake} assigns to them (that is, the name of the data block in the corresponding
file). The following methods can be used to access the information stored in a \texttt{PolymakeObject}. But be careful! All functions return the actual object. No copies are made.
So if you change one of the returned objects, you change the \texttt{PolymakeObject} itself.
\subsection{\textcolor{Chapter }{DirectoryOfPolymakeObject}}
\logpage{[ 2, 2, 1 ]}\nobreak
\hyperdef{L}{X86D967C684B27108}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{DirectoryOfPolymakeObject({\mdseries\slshape poly})\index{DirectoryOfPolymakeObject@\texttt{DirectoryOfPolymakeObject}}
\label{DirectoryOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
Directory
Returns the directory of the file associated with \mbox{\texttt{\mdseries\slshape poly}}. }
\subsection{\textcolor{Chapter }{FilenameOfPolymakeObject}}
\logpage{[ 2, 2, 2 ]}\nobreak
\hyperdef{L}{X87470AB079A2F550}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{FilenameOfPolymakeObject({\mdseries\slshape poly})\index{FilenameOfPolymakeObject@\texttt{FilenameOfPolymakeObject}}
\label{FilenameOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
String
Returns the name of the file associated with \mbox{\texttt{\mdseries\slshape poly}}. This does only mean the name of the \emph{file}, not the full path. For the full path and file name see \texttt{FullFilenameOfPolymakeObject} (\ref{FullFilenameOfPolymakeObject}) }
\subsection{\textcolor{Chapter }{FullFilenameOfPolymakeObject}}
\logpage{[ 2, 2, 3 ]}\nobreak
\hyperdef{L}{X809D309F7D31DD2C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{FullFilenameOfPolymakeObject({\mdseries\slshape poly})\index{FullFilenameOfPolymakeObject@\texttt{FullFilenameOfPolymakeObject}}
\label{FullFilenameOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
String
Returns the file associated with the \texttt{PolymakeObject} \mbox{\texttt{\mdseries\slshape poly}} with its complete path. }
\subsection{\textcolor{Chapter }{NamesKnownPropertiesOfPolymakeObject}}
\logpage{[ 2, 2, 4 ]}\nobreak
\hyperdef{L}{X850B38F27F1BF7E8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{NamesKnownPropertiesOfPolymakeObject({\mdseries\slshape poly})\index{NamesKnownPropertiesOfPolymakeObject@\texttt{Names}\-\texttt{Known}\-\texttt{Properties}\-\texttt{Of}\-\texttt{Polymake}\-\texttt{Object}}
\label{NamesKnownPropertiesOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
List of Strings
Returns a list of the names of all known properties. This does only include
the properties returned by \texttt{Polymake} (\ref{Polymake}), \texttt{"dir"} and \texttt{"filename"} are not included. If no properties are known, \texttt{fail} is returned. }
\subsection{\textcolor{Chapter }{KnownPropertiesOfPolymakeObject}}
\logpage{[ 2, 2, 5 ]}\nobreak
\hyperdef{L}{X7D79C5F1817041C5}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{KnownPropertiesOfPolymakeObject({\mdseries\slshape poly})\index{KnownPropertiesOfPolymakeObject@\texttt{KnownPropertiesOfPolymakeObject}}
\label{KnownPropertiesOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
Record
Returns the record of all known properties. If no properties are known, \texttt{fail} is returned. }
\subsection{\textcolor{Chapter }{PropertyOfPolymakeObject}}
\logpage{[ 2, 2, 6 ]}\nobreak
\hyperdef{L}{X7E538D1B7898C8E6}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{PropertyOfPolymakeObject({\mdseries\slshape poly, name})\index{PropertyOfPolymakeObject@\texttt{PropertyOfPolymakeObject}}
\label{PropertyOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
Returns the value of the property \mbox{\texttt{\mdseries\slshape name}} if it is known. If the value is not known, \texttt{fail} is returned. \mbox{\texttt{\mdseries\slshape name}} must be a \texttt{String}. }
}
\section{\textcolor{Chapter }{Example: Creating and Accessing Polymake Objects}}\label{Example:createAndAccess}
\logpage{[ 2, 3, 0 ]}
\hyperdef{L}{X7CEF475187927AEA}{}
{
Suppose the file \texttt{/tmp/threecube.poly} contains the three dimensional cube in polymake form. Now generate a \texttt{PolymakeObject} from this file and call \texttt{Polymake} (\ref{Polymake}) to make the vertices of the cube known to the object.
\begin{Verbatim}[commandchars=!@|,fontsize=\small,frame=single,label=Example]
### suppose we have a polymake file /tmp/threecube.poly
### containing a cube in three dimensions
!gapprompt@gap>| !gapinput@cube:=CreatePolymakeObjectFromFile(Directory("/tmp"),"threecube.poly");|
<polymake object. No properties known>
!gapprompt@gap>| !gapinput@FilenameOfPolymakeObject(cube);|
"threecube.poly"
!gapprompt@gap>| !gapinput@FullFilenameOfPolymakeObject(cube);|
"/tmp/threecube.poly"
#nothing is known about the cube:
!gapprompt@gap>| !gapinput@NamesKnownPropertiesOfPolymakeObject(cube); |
fail
!gapprompt@gap>| !gapinput@Polymake(cube,"VERTICES");|
[ [ -1, -1, -1 ], [ 1, -1, -1 ], [ -1, 1, -1 ], [ 1, 1, -1 ], [ -1, -1, 1 ],
[ 1, -1, 1 ], [ -1, 1, 1 ], [ 1, 1, 1 ] ]
# Now <cube> knows its vertices:
!gapprompt@gap>| !gapinput@Print(cube);|
<polymake object threecube.poly. Properties known: [ "VERTICES" ]>
!gapprompt@gap>| !gapinput@PropertyOfPolymakeObject(cube,"VERTICES");|
[ [ -1, -1, -1 ], [ 1, -1, -1 ], [ -1, 1, -1 ], [ 1, 1, -1 ], [ -1, -1, 1 ],
[ 1, -1, 1 ], [ -1, 1, 1 ], [ 1, 1, 1 ] ]
!gapprompt@gap>| !gapinput@KnownPropertiesOfPolymakeObject(cube);|
rec(
VERTICES := [ [ -1, -1, -1 ], [ 1, -1, -1 ], [ -1, 1, -1 ], [ 1, 1, -1 ],
[ -1, -1, 1 ], [ 1, -1, 1 ], [ -1, 1, 1 ], [ 1, 1, 1 ] ] )
\end{Verbatim}
}
\section{\textcolor{Chapter }{Writing to Polymake Objects}}\label{WritingToObjects}
\logpage{[ 2, 4, 0 ]}
\hyperdef{L}{X87BEE1B37D9F1F5E}{}
{
To transfer data from \textsf{GAP} to polymake, the following methods can be used. But bear in mind that none of
these functions test if the resulting polymake file is still consistent.
\subsection{\textcolor{Chapter }{AppendToPolymakeObject}}
\logpage{[ 2, 4, 1 ]}\nobreak
\hyperdef{L}{X785DCA4487F168F8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{AppendToPolymakeObject({\mdseries\slshape poly, string})\index{AppendToPolymakeObject@\texttt{AppendToPolymakeObject}}
\label{AppendToPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
nothing
This appends the string \mbox{\texttt{\mdseries\slshape string}} to the file associated to the \texttt{PolymakeObject} \mbox{\texttt{\mdseries\slshape poly}}. It is not tested if the string is syntactically correct as a part of a
polymake file. It is also not tested if the string is compatible with the data
already contained in the file. }
INEQUALITIES, POINTS and VERTICES can be appended to a polymake object using
the following functions:
\subsection{\textcolor{Chapter }{AppendPointlistToPolymakeObject}}
\logpage{[ 2, 4, 2 ]}\nobreak
\hyperdef{L}{X7F5326338033B57C}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{AppendPointlistToPolymakeObject({\mdseries\slshape poly, pointlist})\index{AppendPointlistToPolymakeObject@\texttt{AppendPointlistToPolymakeObject}}
\label{AppendPointlistToPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
nothing
Takes a list \mbox{\texttt{\mdseries\slshape pointlist}} of vectors and converts it into a string which represents a polymake block
labeled "POINTS". This string is then added to the file associated with \mbox{\texttt{\mdseries\slshape poly}}. The "POINTS" block of the file associated with \mbox{\texttt{\mdseries\slshape poly}} then contains points with leading ones, as polymake uses affine notation. }
\subsection{\textcolor{Chapter }{AppendVertexlistToPolymakeObject}}
\logpage{[ 2, 4, 3 ]}\nobreak
\hyperdef{L}{X7E150BA67CEBC00E}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{AppendVertexlistToPolymakeObject({\mdseries\slshape poly, pointlist})\index{AppendVertexlistToPolymakeObject@\texttt{AppendVertexlistToPolymakeObject}}
\label{AppendVertexlistToPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
nothing
Does the same as \texttt{AppendPointlistToPolymakeObject}, but with "VERTICES" instead of "POINTS". }
\subsection{\textcolor{Chapter }{AppendInequalitiesToPolymakeObject}}
\logpage{[ 2, 4, 4 ]}\nobreak
\hyperdef{L}{X7EBE5FB284FBFFE6}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{AppendInequalitiesToPolymakeObject({\mdseries\slshape poly, ineqlist})\index{AppendInequalitiesToPolymakeObject@\texttt{AppendInequalitiesToPolymakeObject}}
\label{AppendInequalitiesToPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
nothing
Just appends the inequalities given in \mbox{\texttt{\mdseries\slshape ineqlist}} to the polymake object \mbox{\texttt{\mdseries\slshape poly}} (with caption "INEQUALITIES"). Note that this does not check if an
"INEQUALITIES" section does already exist in the file associated with \mbox{\texttt{\mdseries\slshape poly}}. }
\subsection{\textcolor{Chapter }{ConvertMatrixToPolymakeString}}
\logpage{[ 2, 4, 5 ]}\nobreak
\hyperdef{L}{X83DC7FC280731B04}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertMatrixToPolymakeString({\mdseries\slshape name, matrix})\index{ConvertMatrixToPolymakeString@\texttt{ConvertMatrixToPolymakeString}}
\label{ConvertMatrixToPolymakeString}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
String
This function takes a matrix \mbox{\texttt{\mdseries\slshape matrix}} and converts it to a string. This string can then be appended to a polymake
file via \texttt{AppendToPolymakeObject} (\ref{AppendToPolymakeObject}) to form a block of data labeled \mbox{\texttt{\mdseries\slshape name}}. This may be used to write blocks like INEQUALITIES or FACETS. }
\subsection{\textcolor{Chapter }{ClearPolymakeObject}}
\logpage{[ 2, 4, 6 ]}\nobreak
\hyperdef{L}{X804AAE4882743E91}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ClearPolymakeObject({\mdseries\slshape poly[, appvertyp]})\index{ClearPolymakeObject@\texttt{ClearPolymakeObject}}
\label{ClearPolymakeObject}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
nothing
Deletes all known properties of the \texttt{PolymakeObject} \mbox{\texttt{\mdseries\slshape poly}} and replaces its file with an empty one. \\
If the triple of strings \mbox{\texttt{\mdseries\slshape appvertyp}} specifying application, version and type (see \texttt{CheckAppVerTypList} (\ref{CheckAppVerTypList})) is given, the file is replaced with a file that contains only a header
specifying application, version and type of the polymake object. }
There are also methods to manipulate the known values without touching the
file of the \texttt{PolymakeObject}:
\subsection{\textcolor{Chapter }{WriteKnownPropertyToPolymakeObject}}
\logpage{[ 2, 4, 7 ]}\nobreak
\hyperdef{L}{X840C02CD815FF766}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{WriteKnownPropertyToPolymakeObject({\mdseries\slshape poly, name, data})\index{WriteKnownPropertyToPolymakeObject@\texttt{WriteKnownPropertyToPolymakeObject}}
\label{WriteKnownPropertyToPolymakeObject}
}\hfill{\scriptsize (method)}}\\
Takes the object \mbox{\texttt{\mdseries\slshape data}} and writes it to the known properties section of the \texttt{PolymakeObject} \mbox{\texttt{\mdseries\slshape poly}}. The string \mbox{\texttt{\mdseries\slshape name}} is used as the name of the property. If a property with that name already
exists, it is overwritten. Again, there is no check if \mbox{\texttt{\mdseries\slshape data}} is consistent, correct or meaningful. }
\subsection{\textcolor{Chapter }{UnbindKnownPropertyOfPolymakeObject}}
\logpage{[ 2, 4, 8 ]}\nobreak
\hyperdef{L}{X7A3FF18C7FD1A626}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{UnbindKnownPropertyOfPolymakeObject({\mdseries\slshape poly, name})\index{UnbindKnownPropertyOfPolymakeObject@\texttt{UnbindKnownPropertyOfPolymakeObject}}
\label{UnbindKnownPropertyOfPolymakeObject}
}\hfill{\scriptsize (method)}}\\
If the \texttt{PolymakeObject} \mbox{\texttt{\mdseries\slshape poly}} has a property with name \mbox{\texttt{\mdseries\slshape name}}, that property is unbound. If there is no such property, \texttt{fail} is returned. }
}
\section{\textcolor{Chapter }{Calling Polymake and converting its output}}\logpage{[ 2, 5, 0 ]}
\hyperdef{L}{X8468E0E381642B14}{}
{
\subsection{\textcolor{Chapter }{Polymake}}
\logpage{[ 2, 5, 1 ]}\nobreak
\hyperdef{L}{X7DBA99E87EC51D53}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{Polymake({\mdseries\slshape poly, option: PolymakeNolookup})\index{Polymake@\texttt{Polymake}}
\label{Polymake}
}\hfill{\scriptsize (method)}}\\
This method calls the polymake program (see \texttt{POLYMAKE{\textunderscore}COMMAND} (\ref{POLYMAKEuScoreCOMMAND})) with the option \mbox{\texttt{\mdseries\slshape option}}. You may use several keywords such as \texttt{"FACETS VERTICES"} as an option. The returned value is cut into blocks starting with keywords
(which are taken from output and not looked up in \mbox{\texttt{\mdseries\slshape option}}). Each block is then interpreted and translated into \textsf{GAP} readable form. This translation is done using the functions given in \texttt{ObjectConverters} (\ref{ObjectConverters}). The first line of each block of polymake output is taken as a keyword and
the according entry in \texttt{ObjectConverters} (\ref{ObjectConverters}) is called to convert the block into \textsf{GAP} readable form. If no conversion function is known, an info string is printed
and \texttt{fail} is returned. If only one keyword has been given as \mbox{\texttt{\mdseries\slshape option}}, \texttt{Polymake} returns the result of the conversion operation. If more than one keyword has
been given or the output consists of more than one block, \texttt{Polymake} returns \texttt{fail}. In any case, the calculated values for each block are stored as known
properties of the \texttt{PolymakeObject} \mbox{\texttt{\mdseries\slshape poly}} as long as they are not \texttt{fail}. If \texttt{Polymake} is called with an option that corresponds to a name of a known property of \mbox{\texttt{\mdseries\slshape poly}}, the known property is returned. In this case, there is no call of the
external program. (see below for suppression of this feature).
Note that the command \texttt{Polymake} returns \texttt{fail} if nothing is returned by the program polymake or more than one block of data
is returned. For example, the returned value of \texttt{Polymake(poly,"VISUAL")} is always \texttt{fail}. Likewise, \texttt{Polymake(poly,"POINTS VERTICES")} will return \texttt{fail} (but may add new known properties to \mbox{\texttt{\mdseries\slshape poly}}). For a description of the conversion functions, see chapter \ref{Converting}.
If the option \mbox{\texttt{\mdseries\slshape PolymakeNolookup}} is set to anything else than false, the polymake program is called even if \mbox{\texttt{\mdseries\slshape poly}} already has a known property with name \mbox{\texttt{\mdseries\slshape option}}. }
Note that whenever \texttt{Polymake} (\ref{Polymake}) returns \texttt{fail}, a description of the problem is stored in \texttt{POLYMAKE{\textunderscore}LAST{\textunderscore}FAIL{\textunderscore}REASON} (\ref{POLYMAKEuScoreLASTuScoreFAILuScoreREASON}). If you call \texttt{Polymake} (\ref{Polymake}) with more than one keyword, \texttt{POLYMAKE{\textunderscore}LAST{\textunderscore}FAIL{\textunderscore}REASON} (\ref{POLYMAKEuScoreLASTuScoreFAILuScoreREASON}) is changed before polymake is called. So any further reason to return \texttt{fail} will overwrite it. }
\section{\textcolor{Chapter }{An Example}}\logpage{[ 2, 6, 0 ]}
\hyperdef{L}{X7B5623E3821CC0D0}{}
{
Let's generate a three dimensional permutahedron.
\begin{Verbatim}[commandchars=@|B,fontsize=\small,frame=single,label=Example]
gap> S:=SymmetricGroup(3);
Sym( [ 1 .. 3 ] )
gap> v:=[1,2,3];
[ 1, 2, 3 ]
gap> points3:=Orbit(S,v,Permuted);;
# project to reduce ambient dimension
gap> points:=points3{[1..6]}{[1,2]};;
gap> permutahedron:=CreatePolymakeObject();
<polymake object. No properties known>
gap> AppendPointlistToPolymakeObject(permutahedron,points);
gap> Polymake(permutahedron,"VOLUME");
3
gap> Polymake(permutahedron,"N_VERTICES");
6
#Now <permutahedron> knows its number of vertices, but not the vertices:
gap> PropertyOfPolymakeObject(permutahedron,"VERTICES");
fail
gap> NamesKnownPropertiesOfPolymakeObject(permutahedron);
[ "VOLUME", "N_VERTICES" ]
#Let's look at the object!
gap> Polymake(permutahedron,"VISUAL");
#I There was no or wrong polymake output
fail
gap> Polymake(permutahedron,"DIM");
2
\end{Verbatim}
}
}
\chapter{\textcolor{Chapter }{Global Variables}}\label{chap:GlobalVars}
\logpage{[ 3, 0, 0 ]}
\hyperdef{L}{X7D9044767BEB1523}{}
{
\section{\textcolor{Chapter }{Getting information about polymake output}}\label{chap:InfoClass}
\logpage{[ 3, 1, 0 ]}
\hyperdef{L}{X86AC0C6B807BEBDE}{}
{
\subsection{\textcolor{Chapter }{InfoPolymaking}}
\logpage{[ 3, 1, 1 ]}\nobreak
\hyperdef{L}{X85BA7A3D7C698B68}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{InfoPolymaking\index{InfoPolymaking@\texttt{InfoPolymaking}}
\label{InfoPolymaking}
}\hfill{\scriptsize (info class)}}\\
If set to at least $2$, the output of polymake is shown. At level $1$, warnings are shown. This is the default. And at level $0$, the polymake package remains silent. }
\subsection{\textcolor{Chapter }{POLYMAKE{\textunderscore}LAST{\textunderscore}FAIL{\textunderscore}REASON}}
\logpage{[ 3, 1, 2 ]}\nobreak
\hyperdef{L}{X79E1C63D8516D334}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{POLYMAKE{\textunderscore}LAST{\textunderscore}FAIL{\textunderscore}REASON\index{POLYMAKE{\textunderscore}LAST{\textunderscore}FAIL{\textunderscore}REASON@\texttt{POL}\-\texttt{Y}\-\texttt{M}\-\texttt{A}\-\texttt{K}\-\texttt{E{\textunderscore}}\-\texttt{L}\-\texttt{A}\-\texttt{S}\-\texttt{T{\textunderscore}}\-\texttt{F}\-\texttt{A}\-\texttt{I}\-\texttt{L{\textunderscore}}\-\texttt{R}\-\texttt{E}\-\texttt{ASON}}
\label{POLYMAKEuScoreLASTuScoreFAILuScoreREASON}
}\hfill{\scriptsize (global variable)}}\\
Contains a string that explains the last occurrence of \texttt{fail} as a return value of \texttt{Polymake} (\ref{Polymake}). }
}
\section{\textcolor{Chapter }{Variables for system interaction}}\label{variables}
\logpage{[ 3, 2, 0 ]}
\hyperdef{L}{X7B786DAF80136FF4}{}
{
The variables for interaction with the system are contained in the file \texttt{environment.gi}. Each of these variables has a function to set it, see \ref{chap:varsetters}. If \texttt{POLYMAKE{\textunderscore}COMMAND} or \texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR} are set at startup, they are not overwritten. So if you don't want (or don't
have the rights) to modify \texttt{environment.gi}, you can set the variables in your \texttt{.gaprc} file.
\subsection{\textcolor{Chapter }{POLYMAKE{\textunderscore}COMMAND}}
\logpage{[ 3, 2, 1 ]}\nobreak
\hyperdef{L}{X7B35A5217C8C7B04}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{POLYMAKE{\textunderscore}COMMAND\index{POLYMAKE{\textunderscore}COMMAND@\texttt{POLYMAKE{\textunderscore}COMMAND}}
\label{POLYMAKEuScoreCOMMAND}
}\hfill{\scriptsize (global variable)}}\\
This variable should contain the name of the polymake program in the form as
returned by \texttt{Filename} So a probable value is \texttt{Filename(Directory("/usr/local/bin"),"polymake")}. }
\subsection{\textcolor{Chapter }{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR}}
\logpage{[ 3, 2, 2 ]}\nobreak
\hyperdef{L}{X7C07B16B873BA46D}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR\index{POLYMAKE{\textunderscore}DATA{\textunderscore}DIR@\texttt{POL}\-\texttt{Y}\-\texttt{M}\-\texttt{A}\-\texttt{K}\-\texttt{E{\textunderscore}}\-\texttt{D}\-\texttt{A}\-\texttt{T}\-\texttt{A{\textunderscore}DIR}}
\label{POLYMAKEuScoreDATAuScoreDIR}
}\hfill{\scriptsize (global variable)}}\\
In this directory the files for polymake will be created. By default, this
generates a temporary directory using \texttt{DirectoryTemporary} }
}
}
\chapter{\textcolor{Chapter }{Converting Polymake Output}}\label{Converting}
\logpage{[ 4, 0, 0 ]}
\hyperdef{L}{X7D23E80E841CDD67}{}
{
\section{\textcolor{Chapter }{The General Method}}\logpage{[ 4, 1, 0 ]}
\hyperdef{L}{X862D57D87A244DE2}{}
{
When polymake is called, its output is read as a string and then processed as
follows:
\begin{enumerate}
\item the lines containing upper case letters are found. These are treated as lines
containing the keywords. Each of those lines marks the beginning of a block of
data.
\item The string is then cut into a list of blocks (also strings). Each block starts
with a line containing the keyword and continues with some lines of data.
\item for each of the blocks, the appropriate function of \texttt{ObjectConverters} is called. Here "appropriate" just means, that the keyword of the block
coincides with the name of the function.
\item The output of the conversion function is then added to the known properties of
the \texttt{PolymakeObject} for which \texttt{Polymake} was called.
\end{enumerate}
\subsection{\textcolor{Chapter }{Converter\texttt{\symbol{45}} Philosopy}}\logpage{[ 4, 1, 1 ]}
\hyperdef{L}{X7CDBEA427EE69C71}{}
{
The converter functions should take meaningful polymake data into meaningful \textsf{GAP} data. This sometimes means that the (mathematical) representation is changed.
Here is an example: polymake writes vectors as augmented affine vectors of the
form \texttt{1 a1 a2 a3...} which does not go very well with the usual \textsf{GAP} conventions of column vectors and multiplying matrices from the right. So \textsf{polymaking} converts such a vector to \texttt{[a1,a2,a3,...]} and the user is left with the problem of augmentation and left or right
multiplication.
Another area where the \textsf{GAP} object isn't a literal translation from the polymake world is combinatorics.
In Polymake, list elements are enumerated starting from 0. \textsf{GAP} enumerates lists starting at 1. So the conversion process adds 1 to the
numbers corresponding to vertices in facet lists, for example.
}
The conversion process is done by the following methods:
\subsection{\textcolor{Chapter }{ConvertPolymakeOutputToGapNotation}}
\logpage{[ 4, 1, 2 ]}\nobreak
\hyperdef{L}{X7EB6D80C816CF667}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeOutputToGapNotation({\mdseries\slshape string})\index{ConvertPolymakeOutputToGapNotation@\texttt{ConvertPolymakeOutputToGapNotation}}
\label{ConvertPolymakeOutputToGapNotation}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
Record having polymake keywords as entry names and the respective converted
polymake output as entries.
Given a the output of the polymake program as a string \mbox{\texttt{\mdseries\slshape string}}, this method first calls \texttt{SplitPolymakeOutputStringIntoBlocks} (\ref{SplitPolymakeOutputStringIntoBlocks}). For each of the returned blocks, the name (=first line) of the block is read
and the record \texttt{ObjectConverters} (\ref{ObjectConverters}) is looked up for an entry with that name. If such an entry exists, it (being a
function!) is called and passed the block. The returned value is then given
the name of the block and added to the record returned by \texttt{ConvertPolymakeOutputToGapNotation}. }
\subsection{\textcolor{Chapter }{SplitPolymakeOutputStringIntoBlocks}}
\logpage{[ 4, 1, 3 ]}\nobreak
\hyperdef{L}{X841D81327C6F6E29}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{SplitPolymakeOutputStringIntoBlocks({\mdseries\slshape string})\index{SplitPolymakeOutputStringIntoBlocks@\texttt{SplitPolymakeOutputStringIntoBlocks}}
\label{SplitPolymakeOutputStringIntoBlocks}
}\hfill{\scriptsize (method)}}\\
\textbf{\indent Returns:\ }
List of strings \texttt{\symbol{45}}\texttt{\symbol{45}}
"blocks"\texttt{\symbol{45}}\texttt{\symbol{45}}
The string \mbox{\texttt{\mdseries\slshape string}} is cut at the lines starting with an upper case character and consisting only
of upper case letters, numbers and underscore ({\textunderscore}) characters.
The parts are returned as a list of strings. The initial string \mbox{\texttt{\mdseries\slshape string}} remains unchanged. }
\subsection{\textcolor{Chapter }{ObjectConverters}}
\logpage{[ 4, 1, 4 ]}\nobreak
\hyperdef{L}{X83199F737F4BE4FD}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ObjectConverters\index{ObjectConverters@\texttt{ObjectConverters}}
\label{ObjectConverters}
}\hfill{\scriptsize (global variable)}}\\
The entries of this record are labeled by polymake keywords. Each of the
entries is a function which converts a string returned by polymake to \textsf{GAP} format. So far, only a few converters are implemented. To see which, try \texttt{RecNames(ObjectConverters);}
You can define new converters using the basic functions described in section \ref{conversionFunctions}. }
}
\section{\textcolor{Chapter }{Conversion Functions}}\label{conversionFunctions}
\logpage{[ 4, 2, 0 ]}
\hyperdef{L}{X7FF4170183C83CC1}{}
{
The following functions are used for the functions in \texttt{ObjectConverters} (\ref{ObjectConverters}).
\subsection{\textcolor{Chapter }{ConvertPolymakeNumber}}
\logpage{[ 4, 2, 1 ]}\nobreak
\hyperdef{L}{X7FC98443862DB83F}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeNumber({\mdseries\slshape string})\index{ConvertPolymakeNumber@\texttt{ConvertPolymakeNumber}}
\label{ConvertPolymakeNumber}
}\hfill{\scriptsize (method)}}\\
The string \mbox{\texttt{\mdseries\slshape string}} is converted to a rational number. Unlike \texttt{Rat}, it tests, if the number represented by \mbox{\texttt{\mdseries\slshape string}} is a floating point number an converts it correctly. If this is the case, a
warning is issued. }
\subsection{\textcolor{Chapter }{ConvertPolymakeScalarToGAP}}
\logpage{[ 4, 2, 2 ]}\nobreak
\hyperdef{L}{X7F2A1C2C808E4A07}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeScalarToGAP({\mdseries\slshape list})\index{ConvertPolymakeScalarToGAP@\texttt{ConvertPolymakeScalarToGAP}}
\label{ConvertPolymakeScalarToGAP}
}\hfill{\scriptsize (method)}}\\
If \mbox{\texttt{\mdseries\slshape list}} contains a single string, this string is converted into a number using \texttt{ConvertPolymakeNumber} (\ref{ConvertPolymakeNumber}). }
\subsection{\textcolor{Chapter }{ConvertPolymakeMatrixOrListOfSetsToGAP}}
\logpage{[ 4, 2, 3 ]}\nobreak
\hyperdef{L}{X82A7FF9983EB61E2}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeMatrixOrListOfSetsToGAP({\mdseries\slshape list})\index{ConvertPolymakeMatrixOrListOfSetsToGAP@\texttt{Convert}\-\texttt{Polymake}\-\texttt{Matrix}\-\texttt{Or}\-\texttt{List}\-\texttt{Of}\-\texttt{Sets}\-\texttt{ToGAP}}
\label{ConvertPolymakeMatrixOrListOfSetsToGAP}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeMatrixOrListOfSetsToGAPPlusOne({\mdseries\slshape list})\index{ConvertPolymakeMatrixOrListOfSetsToGAPPlusOne@\texttt{Convert}\-\texttt{Polymake}\-\texttt{Matrix}\-\texttt{Or}\-\texttt{List}\-\texttt{Of}\-\texttt{Sets}\-\texttt{To}\-\texttt{G}\-\texttt{A}\-\texttt{P}\-\texttt{PlusOne}}
\label{ConvertPolymakeMatrixOrListOfSetsToGAPPlusOne}
}\hfill{\scriptsize (method)}}\\
Tries to decide if the list \mbox{\texttt{\mdseries\slshape list}} of strings represents a matrix or a list of sets by testing if they start with
"\texttt{\symbol{123}}". It then calls either \texttt{ConvertPolymakeMatrixToGAP} (\ref{ConvertPolymakeMatrixToGAP}) or \texttt{ConvertPolymakeListOfSetsToGAP} (\ref{ConvertPolymakeListOfSetsToGAP}). The "PlusOne" version calls \texttt{ConvertPolymakeListOfSetsToGAPPlusOne} (\ref{ConvertPolymakeListOfSetsToGAPPlusOne}) if \mbox{\texttt{\mdseries\slshape list}} represents a list of sets. }
\subsection{\textcolor{Chapter }{ConvertPolymakeMatrixToGAP}}
\logpage{[ 4, 2, 4 ]}\nobreak
\hyperdef{L}{X817C6B4180BF6365}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeMatrixToGAP({\mdseries\slshape list})\index{ConvertPolymakeMatrixToGAP@\texttt{ConvertPolymakeMatrixToGAP}}
\label{ConvertPolymakeMatrixToGAP}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeMatrixToGAPKillOnes({\mdseries\slshape list})\index{ConvertPolymakeMatrixToGAPKillOnes@\texttt{ConvertPolymakeMatrixToGAPKillOnes}}
\label{ConvertPolymakeMatrixToGAPKillOnes}
}\hfill{\scriptsize (method)}}\\
The list \mbox{\texttt{\mdseries\slshape list}} of strings is interpreted as a list of row vectors and converted into a
matrix. The "KillOnes" version removes the leading ones. }
\subsection{\textcolor{Chapter }{ConvertPolymakeVectorToGAP}}
\logpage{[ 4, 2, 5 ]}\nobreak
\hyperdef{L}{X85F7F6787D346CC0}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeVectorToGAP({\mdseries\slshape list})\index{ConvertPolymakeVectorToGAP@\texttt{ConvertPolymakeVectorToGAP}}
\label{ConvertPolymakeVectorToGAP}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeVectorToGAPKillOne({\mdseries\slshape list})\index{ConvertPolymakeVectorToGAPKillOne@\texttt{ConvertPolymakeVectorToGAPKillOne}}
\label{ConvertPolymakeVectorToGAPKillOne}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeIntVectorToGAPPlusOne({\mdseries\slshape list})\index{ConvertPolymakeIntVectorToGAPPlusOne@\texttt{Convert}\-\texttt{Polymake}\-\texttt{Int}\-\texttt{Vector}\-\texttt{To}\-\texttt{G}\-\texttt{A}\-\texttt{P}\-\texttt{PlusOne}}
\label{ConvertPolymakeIntVectorToGAPPlusOne}
}\hfill{\scriptsize (method)}}\\
As the corresponding "Matrix" version. Just for vectors. \texttt{ConvertPolymakeIntVectorToGAPPlusOne} requires the vector to contain integers. It also adds 1 to every entry. }
\subsection{\textcolor{Chapter }{ConvertPolymakeBoolToGAP}}
\logpage{[ 4, 2, 6 ]}\nobreak
\hyperdef{L}{X87B6F9867EE800C7}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeBoolToGAP({\mdseries\slshape list})\index{ConvertPolymakeBoolToGAP@\texttt{ConvertPolymakeBoolToGAP}}
\label{ConvertPolymakeBoolToGAP}
}\hfill{\scriptsize (method)}}\\
If \mbox{\texttt{\mdseries\slshape list}} contains a single string, which is either 0,false,1, or true this function
returns \texttt{false} or \texttt{true}, respectively. }
\subsection{\textcolor{Chapter }{ConvertPolymakeSetToGAP}}
\logpage{[ 4, 2, 7 ]}\nobreak
\hyperdef{L}{X846B284085825FEA}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeSetToGAP({\mdseries\slshape list})\index{ConvertPolymakeSetToGAP@\texttt{ConvertPolymakeSetToGAP}}
\label{ConvertPolymakeSetToGAP}
}\hfill{\scriptsize (method)}}\\
Let \mbox{\texttt{\mdseries\slshape list}} be a list containing a single string, which is a list of numbers separated by
whitespaces and enclosed by \texttt{\symbol{123}} and \texttt{\symbol{125}} .
The returned value is then a set of rational numbers (in the GAP sense). }
\subsection{\textcolor{Chapter }{ConvertPolymakeListOfSetsToGAP}}
\logpage{[ 4, 2, 8 ]}\nobreak
\hyperdef{L}{X7E7886D68356F592}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeListOfSetsToGAP({\mdseries\slshape list})\index{ConvertPolymakeListOfSetsToGAP@\texttt{ConvertPolymakeListOfSetsToGAP}}
\label{ConvertPolymakeListOfSetsToGAP}
}\hfill{\scriptsize (method)}}\\
\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeListOfSetsToGAPPlusOne({\mdseries\slshape list})\index{ConvertPolymakeListOfSetsToGAPPlusOne@\texttt{Convert}\-\texttt{Polymake}\-\texttt{List}\-\texttt{Of}\-\texttt{Sets}\-\texttt{To}\-\texttt{G}\-\texttt{A}\-\texttt{P}\-\texttt{PlusOne}}
\label{ConvertPolymakeListOfSetsToGAPPlusOne}
}\hfill{\scriptsize (method)}}\\
Let \mbox{\texttt{\mdseries\slshape list}} be a list containing several strings representing sets. Then each of these
strings is converted to a set of rational numbers and the returned value is
the list of all those sets. The "PlusOne" version adds 1 to every entry. }
\subsection{\textcolor{Chapter }{ConvertPolymakeGraphToGAP}}
\logpage{[ 4, 2, 9 ]}\nobreak
\hyperdef{L}{X7EBECAA07F8B58D8}{}
{\noindent\textcolor{FuncColor}{$\triangleright$\enspace\texttt{ConvertPolymakeGraphToGAP({\mdseries\slshape list})\index{ConvertPolymakeGraphToGAP@\texttt{ConvertPolymakeGraphToGAP}}
\label{ConvertPolymakeGraphToGAP}
}\hfill{\scriptsize (method)}}\\
Let \mbox{\texttt{\mdseries\slshape list}} be a list of strings representing sets (that is, a list of integers enclosed
by \texttt{\symbol{123}} and \texttt{\symbol{125}}). Then a record is returned
containing two sets named \texttt{.vertices} and \texttt{.edges}. }
}
}
\def\bibname{References\logpage{[ "Bib", 0, 0 ]}
\hyperdef{L}{X7A6F98FD85F02BFE}{}
}
\bibliographystyle{alpha}
\bibliography{polymaking}
\addcontentsline{toc}{chapter}{References}
\def\indexname{Index\logpage{[ "Ind", 0, 0 ]}
\hyperdef{L}{X83A0356F839C696F}{}
}
\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Index}
\printindex
\immediate\write\pagenrlog{["Ind", 0, 0], \arabic{page},}
\newpage
\immediate\write\pagenrlog{["End"], \arabic{page}];}
\immediate\closeout\pagenrlog
\end{document}
|