|
#############################################################################
##
#W workaround_maps.gi polymaking Package Marc Roeder
##
##
##
##
#Y Copyright (C) 2006 Marc Roeder
#Y
#Y This program is free software; you can redistribute it and/or
#Y modify it under the terms of the GNU General Public License
#Y as published by the Free Software Foundation; either version 2
#Y of the License, or (at your option) any later version.
#Y
#Y This program is distributed in the hope that it will be useful,
#Y but WITHOUT ANY WARRANTY; without even the implied warranty of
#Y MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#Y GNU General Public License for more details.
#Y
#Y You should have received a copy of the GNU General Public License
#Y along with this program; if not, write to the Free Software
#Y Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
##
###########
# This is a workaround for the next-generation polymake
# there we need to call keywords of the form "HASSE_DIAGRAM->FACES"
# and that does not work as an entry of a record. So we have do do
# some extra mapping (yes, it is a hack).
##
# direction of the mapping: GAP keyword mapped to polymake keyword
#######
InstallMethod(MapKeyWordToPolymakeFormat,"for PolymakeObject",[IsString],
function(option)
if option = "FACES" then
return "HASSE_DIAGRAM->FACES";
elif option = "DIMS" then
return "HASSE_DIAGRAM->DIMS";
elif option = "ADJACENCY" then
return "HASSE_DIAGRAM->ADJACENCY";
else
return option;
fi;
end);
##########
# This is a workaround for the next-generation polymake
# there we need to call keywords of the form "HASSE_DIAGRAM->FACES"
# and that does not work as an entry of a record. So we have do do
# some extra mapping (yes, it is a hack).
##
# direction: Polymake output mapped to GAP keywords
#######
InstallMethod(MapKeyWordFromPolymakeFormat,"for PolymakeObject",[IsString],
function(option)
if option = "HASSE_DIAGRAM->FACES" then
return "FACES";
elif option = "HASSE_DIAGRAM->DIMS" then
return "DIMS";
elif option = "HASSE_DIAGRAM->ADJACENCY" then
return "ADJACENCY";
else
return option;
fi;
end);
[ zur Elbe Produktseite wechseln0.31Quellennavigators
Analyse erneut starten
]
|