PermLib
|
00001 // --------------------------------------------------------------------------- 00002 // 00003 // This file is part of PermLib. 00004 // 00005 // Copyright (c) 2009-2012 Thomas Rehn <thomas@carmen76.de> 00006 // All rights reserved. 00007 // 00008 // Redistribution and use in source and binary forms, with or without 00009 // modification, are permitted provided that the following conditions 00010 // are met: 00011 // 1. Redistributions of source code must retain the above copyright 00012 // notice, this list of conditions and the following disclaimer. 00013 // 2. Redistributions in binary form must reproduce the above copyright 00014 // notice, this list of conditions and the following disclaimer in the 00015 // documentation and/or other materials provided with the distribution. 00016 // 3. The name of the author may not be used to endorse or promote products 00017 // derived from this software without specific prior written permission. 00018 // 00019 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00020 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00021 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00022 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00023 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00024 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00025 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00026 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00027 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00028 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 // 00030 // --------------------------------------------------------------------------- 00031 00032 #include "group_reader.h" 00033 00034 namespace permlib { namespace test { 00035 00036 struct GroupInformation { 00037 std::string filename; 00038 unsigned int n; 00039 unsigned int order; 00040 00041 GroupInformation(const std::string &f, unsigned int _n, unsigned int _order) : filename(f), n(_n), order(_order) {} 00042 00043 bool operator<(const GroupInformation& info) const { 00044 return n < info.n || filename < info.filename; 00045 } 00046 }; 00047 00048 const GroupInformation info_trivial("../data/G_trivial42", 42, 1); 00049 const GroupInformation info_test33("../data/G_test33", 33, 163680); 00050 const GroupInformation info_psu4_3("../data/G_psu4_3", 820, 3265920); 00051 const GroupInformation info_1997("../data/G_test1997", 13, 13*12*9*4); 00052 const GroupInformation info_testThesis("../data/G_testThesis", 10, 28800); 00053 const GroupInformation info_e6("../data/G_e6", 36, 51840); 00054 const GroupInformation info_e7("../data/G_e7", 63, 1451520); 00055 const GroupInformation info_e8("../data/G_e8", 120, 348364800); 00056 const GroupInformation info_metric5("../data/G_metric5", 40, 1920); 00057 //const GroupInformation info_metric6("../data/G_metric6", 80, 0); 00058 //const GroupInformation info_metric7("../data/G_metric7", 140, 0); 00059 const GroupInformation info_cyclic500("../data/G_cyclic500", 500, 500); 00060 const GroupInformation info_cyclic10("../data/G_cyclic10", 10, 10); 00061 const GroupInformation info_cyclic37_2("../data/G_cyclic37-2", 74, 37); 00062 const GroupInformation info_myciel3("../data/G_myciel3", 33, 60); 00063 // group is transitive and isomorphic to S_4 x D_10 00064 const GroupInformation info_myciel4sub("../data/G_myciel4sub", 20, 240); 00065 const GroupInformation info_cov1075("../data/G_cov1075", 120, 3628800L); 00066 const GroupInformation info_tanglegram2("../data/G_tanglegram2", 4714, 0); 00067 const GroupInformation info_rout("../data/G_rout", 556, 120); 00068 // wreath product of S_3 and S_5 00069 const GroupInformation info_S3wrS5("../data/G_S3wrS5", 15, 933120L); 00070 // wreath product of S_5 and S_3 00071 const GroupInformation info_S5wrS3("../data/G_S5wrS3", 15, 10368000L); 00072 const GroupInformation info_S6("../data/G_S6", 6, 720L); 00073 const GroupInformation info_A9("../data/G_A9", 9, 181440L); 00074 const GroupInformation info_A12("../data/G_A12", 12, 239500800L); 00075 const GroupInformation info_S6_3("../data/G_S6-3", 18, 720L); 00076 // Klein four-group ~ C_2 x C_2 00077 const GroupInformation info_Klein4("../data/G_klein4", 4, 4L); 00078 const GroupInformation info_lexminTest1("../data/G_lexminTest1", 6, 36L); 00079 const GroupInformation info_lexminTest2("../data/G_lexminTest2", 8, 48L); 00080 00081 template<class PERM> 00082 unsigned int readGroup(const std::string &filename, std::list<typename PERM::ptr> &groupGenerators) { 00083 GroupReader<PERM> reader; 00084 reader.read(filename); 00085 groupGenerators = reader.generators(); 00086 return reader.n(); 00087 } 00088 00089 } } // end NS