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
|
# 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.
#-------------------------------------------------------------------------------
# @category Producing regular polytopes and their generalizations
# Produce the orbit polytope of a point under a Coxeter arrangement
# with exact coordinates, possibly in a qudratic extension field of the rationals
# @param String type single letter followed by rank representing the type of the arrangement
# @param Set rings indices of the hyperplanes corresponding to simple roots of the arrangement
# that the initial point should NOT lie on. You may specify just an integer or a perl array ref like [0,1] or [0..2].
# @option Bool lattice Should the vertices of the orbit polytope be chosen to lie on the corresponding root lattice? default 0,
# which means that the vertices will instead be chosen to lie as symmetrically as possible.
# @return Polytope
user_function wythoff($$; { lattice => 0 }) {
my ($type, $rings, $options) = @_;
if ($rings =~ /^\d+/ || ref($rings) == "ARRAY") {
$rings = new Set($rings);
}
return wythoff_dispatcher($type, $rings, $options->{lattice});
}
# @category Producing other objects
# Produces the Coxeter group of type //type//.
# The Dynkin diagrams of the different types can be
# found in the description of the clients [[simple_roots_type_A|simple_roots_type_*]].
# @param String type the type of the Coxeter group
# @return group::Group the Coxeter group of type //type//
user_function coxeter_group {
my $type = $_[0];
if (length($type) < 2) {
die "coxeter_group: Type needs single letter followed by rank.";
}
my @chars = split(//, $type);
my $n = $chars[1];
my $rings = new Set<Int>(0..$n-1);
my $p = wythoff($type,$rings);
return new group::Group($p->GROUP);
}
# Local Variables:
# mode: perl
# cperl-indent-level: 3
# indent-tabs-mode:nil
# End:
|