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
|
# Copyright (c) 1997-2024
# Ewgenij Gawrilow, Michael Joswig, and the polymake team
# Technische Universität Berlin, Germany
# https://polymake.org
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version: http://www.gnu.org/licenses/gpl.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#-------------------------------------------------------------------------------
# Make BOUNDED_COMPLEX a subobject
my %renamed_properties = qw( BOUNDED_COMPLEX MAXIMAL_POLYTOPES
BOUNDED_GRAPH GRAPH
BOUNDED_DUAL_GRAPH DUAL_GRAPH
BOUNDED_F_VECTOR F_VECTOR
BOUNDED_DIM COMBINATORIAL_DIM
BOUNDED_HASSE_DIAGRAM HASSE_DIAGRAM
);
upgrade 2.11.1 polytope::Polytope {
my ($obj) = @_;
my %complex;
while (my ($prop_name, $new_prop_name) = each %renamed_properties) {
if (exists $obj->{$prop_name}) {
move_property($obj, $prop_name, \%complex, $new_prop_name);
}
}
if (keys %complex) {
$obj->{BOUNDED_COMPLEX} = \%complex;
push @{$obj->{_load}}, "fan";
true
}
}
# Local Variables:
# mode: perl
# cperl-indent-level: 3
# indent-tabs-mode:nil
# End:
|