Changeset cbe2b1e in git


Ignore:
Timestamp:
Jan 24, 2017, 12:33:14 PM (6 years ago)
Author:
Janko Boehm <boehm@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
185e5b9f88a9ab0544f0d62312d93e3ee0df7fb4
Parents:
f166b4e05ea71a69d6cec02759e596d7d8d8b5a9
git-author:
Janko Boehm <boehm@mathematik.uni-kl.de>2017-01-24 12:33:14+01:00
git-committer:
Yue Ren <ren@mathematik.uni-kl.de>2017-06-08 18:10:26+02:00
Message:
Update
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/gitfan.lib

    rf166b4e rcbe2b1e  
    2222
    2323Functions produce debug output if printlevel is positive.
     24
     25Elements of the symmetric group Sn of type permutation can be created by the function permutationFromIntvec. The images of 1,...,n can be obtained by permutationToIntvec. Composition of permutations can be done by the *-Operator, also powers can be computed in the usual way.
     26
    2427
    2528REFERENCES:
     
    5861  GITfanParallelSymmetric(list, intmat, cone, list); Compute GIT-fan in parallel from orbit cones by determining a minimal representing set for the orbits of maximal dimensional GIT-cones.
    5962  bigintToBinary(bigint, int); Convert bigint into a sparse binary represenation specifying the indices of the one-entries
     63  binaryToBigint(intvec); Convert sparse binary represenation specifying the indices of the one-entries to bigint
     64  applyPermutationToIntvec(intvec, permutation); Apply permutation to a set of integers represented as an intvec
    6065  hashToCone(bigint, list); Convert a bigint hash to a GIT-cone
    6166  hashesToFan(list hashes, list OC)
     
    362367
    363368
    364 static proc applyPermutationToIntvec(intvec v, permutation g){
     369proc applyPermutationToIntvec(intvec v, permutation g)
     370"USAGE: applyPermutationToIntvec(v,g); v: intvec, g:permutation
     371PURPOSE: Apply g to the set of entries of v. The result is a sorted intvec. We assume that the entries of v are valid arguments of g. We do not require that the input is sorted.
     372RETURN: intvec.
     373EXAMPLE: example applyPermutationToIntvec; shows an example
     374"
     375{
    365376  intvec gv = composeIntvecs(permutationToIntvec(g),v);
    366377  //for (int i=1;i<=size(v);i++){
     
    368379  //}
    369380  return(sort(gv)[1]);
     381}
     382example
     383{
     384permutation g = permutationFromIntvec(intvec(10, 9, 7, 4, 8, 6, 3, 5, 2, 1));
     385applyPermutationToIntvec(intvec(1, 3, 4, 6, 8),g);
    370386}
    371387
     
    10221038example {
    10231039  echo=2;
     1040  ring R = 0,(x),dp;
    10241041  intmat Q[5][10] =
    10251042    1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
     
    10281045    0, 1, 0, 1, 0, -1, 0, 0, 1, 0,
    10291046    0, 0, 1, 1, -1, 0, 0, 0, 0, 1;
    1030 list generatorsG = permutationFromIntvec(intvec( 16, 21, 22, 23, 24, 17, 18, 19, 20, 25, 26, 27, 28, 29,
    1031  30, 31, 32, 33, 34, 40, 39, 38, 37, 36, 35 )),
    1032 permutationFromIntvec(intvec( 17, 16, 18, 19, 20, 21, 25, 26, 27, 22, 23, 24, 28, 29,
    1033  30, 31, 35, 36, 37, 32, 33, 34, 38, 39, 40 )),
    1034 permutationFromIntvec(intvec( 16, 18, 17, 19, 20, 22, 21, 23, 24, 25, 28, 29, 26, 27,
    1035  30, 32, 31, 33, 34, 35, 38, 39, 36, 37, 40 )),
    1036 permutationFromIntvec(intvec( 16, 17, 19, 18, 20, 21, 23, 22, 24, 26, 25, 27, 28, 30,
    1037  29, 31, 33, 32, 34, 36, 35, 37, 38, 40, 39 )),
    1038 permutationFromIntvec(intvec( 16, 17, 18, 20, 19, 21, 22, 24, 23, 25, 27, 26, 29, 28,
    1039  30, 31, 32, 34, 33, 35, 37, 36, 39, 38, 40 ));
    1040 apply(generatorsG,print);
     1047list generatorsG = permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )),
     1048permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 ));
    10411049groupActionOnQImage(generatorsG,Q);
    10421050}
     
    11321140  return(Ind);
    11331141}
    1134 
     1142example
     1143{
     1144  ring R = 0,T(1..10),wp(1,1,1,1,1,1,1,1,1,1);
     1145  ideal J =
     1146    T(5)*T(10)-T(6)*T(9)+T(7)*T(8),
     1147    T(1)*T(9)-T(2)*T(7)+T(4)*T(5),
     1148    T(1)*T(8)-T(2)*T(6)+T(3)*T(5),
     1149    T(1)*T(10)-T(3)*T(7)+T(4)*T(6),
     1150    T(2)*T(10)-T(3)*T(9)+T(4)*T(8);
     1151  intmat Q[5][10] =
     1152    1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
     1153    1, 0, 0, 0, 1, 1, 1, 0, 0, 0,
     1154    0, 1, 1, 0, 0, 0, -1, 1, 0, 0,
     1155    0, 1, 0, 1, 0, -1, 0, 0, 1, 0,
     1156    0, 0, 1, 1, -1, 0, 0, 0, 0, 1;
     1157  list AF= afaces(J);
     1158  list OC = orbitCones(AF,Q);
     1159  list generatorsG = permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )),
     1160                     permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 ));
     1161  list Asigmagens = groupActionOnQImage(generatorsG,Q);
     1162groupActionOnHashes(Asigmagens,OC);
     1163}
    11351164
    11361165
     
    12181247  execute("permutation sigma = "+st);
    12191248  return(sigma);}
     1249example
     1250{
     1251  ring R = 0,T(1..10),wp(1,1,1,1,1,1,1,1,1,1);
     1252  ideal J =
     1253    T(5)*T(10)-T(6)*T(9)+T(7)*T(8),
     1254    T(1)*T(9)-T(2)*T(7)+T(4)*T(5),
     1255    T(1)*T(8)-T(2)*T(6)+T(3)*T(5),
     1256    T(1)*T(10)-T(3)*T(7)+T(4)*T(6),
     1257    T(2)*T(10)-T(3)*T(9)+T(4)*T(8);
     1258  intmat Q[5][10] =
     1259    1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
     1260    1, 0, 0, 0, 1, 1, 1, 0, 0, 0,
     1261    0, 1, 1, 0, 0, 0, -1, 1, 0, 0,
     1262    0, 1, 0, 1, 0, -1, 0, 0, 1, 0,
     1263    0, 0, 1, 1, -1, 0, 0, 0, 0, 1;
     1264  list AF= afaces(J);
     1265  list OC = orbitCones(AF,Q);
     1266  list generatorsG = permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )),
     1267                     permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 ));
     1268  list Asigmagens = groupActionOnQImage(generatorsG,Q);
     1269list actionOnOrbitconeIndicesForGenerators = groupActionOnHashes(Asigmagens,OC);
     1270string elementInTermsOfGenerators =
     1271"(x2^-1*x1^-1)^3*x1^-1";
     1272evaluateProduct(actionOnOrbitconeIndicesForGenerators, elementInTermsOfGenerators);
     1273}
    12201274
    12211275
     
    12271281"
    12281282{return(sigma.image);}
     1283example
     1284{
     1285///// todo
     1286}
    12291287
    12301288
     
    14161474  return(hashesOfCones);
    14171475}
     1476example
     1477{
     1478///// todo
     1479}
     1480
    14181481
    14191482proc GITfanParallelSymmetric(list OC, bigintmat Q, cone Qgamma, list actiononorbitcones, list #)
     
    15451608  return(hashesOfCones);
    15461609}
     1610example
     1611{
     1612///// todo
     1613}
     1614
    15471615
    15481616// not static to be used in parallel.lib
     
    16921760
    16931761// insert n at position pos and move bigger elements by one index
    1694 static proc insertToList(list L, def elementToInsert, int posToInsert){
     1762proc insertToList(list L, def elementToInsert, int posToInsert){
    16951763  if(posToInsert == 1){
    16961764    return(list(elementToInsert)+L);
     
    24122480
    24132481proc gkzFan(intmat Q)
    2414 "USAGE: gkzFan(Q); a: ideal, Q:bigintmat
     2482"USAGE: gkzFan(Q); a: ideal, Q:intmat
    24152483PURPOSE: Returns the GKZ-fan of the matrix Q.
    24162484RETURN: a fan.
     
    24222490  // that are simplicial:
    24232491  list OC = simplicialToricOrbitCones(Q);
    2424   //"number of simplicial orbitcones:";
    2425   //print(size(OC));
     2492  print(size(OC));
    24262493  cone Qgamma = coneViaPoints(transpose(Q));
    24272494  list GIT = GITfanParallel(OC,Q,Qgamma);
     
    25002567
    25012568
    2502 
     2569proc G25Action()
     2570"USAGE: G25Action(Q);
     2571PURPOSE: Returns a representation of S5 as a subgroup of S10 with the action on the Grassmannian G25.
     2572RETURN: list of with elements of type permutation.
     2573EXAMPLE: example G25Action; shows an example
     2574"
     2575{
     2576list simplexSymmetryGroup = permutationFromIntvec(intvec( 1 .. 10 )),
     2577permutationFromIntvec(intvec( 1, 2, 4, 3, 5, 7, 6, 9, 8, 10 )),
     2578permutationFromIntvec(intvec( 1, 3, 2, 4, 6, 5, 7, 8, 10, 9 )),
     2579permutationFromIntvec(intvec( 1, 3, 4, 2, 6, 7, 5, 10, 8, 9 )),
     2580permutationFromIntvec(intvec( 1, 4, 2, 3, 7, 5, 6, 9, 10, 8 )),
     2581permutationFromIntvec(intvec( 1, 4, 3, 2, 7, 6, 5, 10, 9, 8 )),
     2582permutationFromIntvec(intvec( 1, 5, 6, 7, 2, 3, 4, 8, 9, 10 )),
     2583permutationFromIntvec(intvec( 1, 5, 7, 6, 2, 4, 3, 9, 8, 10 )),
     2584permutationFromIntvec(intvec( 1, 6, 5, 7, 3, 2, 4, 8, 10, 9 )),
     2585permutationFromIntvec(intvec( 1, 6, 7, 5, 3, 4, 2, 10, 8, 9 )),
     2586permutationFromIntvec(intvec( 1, 7, 5, 6, 4, 2, 3, 9, 10, 8 )),
     2587permutationFromIntvec(intvec( 1, 7, 6, 5, 4, 3, 2, 10, 9, 8 )),
     2588permutationFromIntvec(intvec( 2, 1, 3, 4, 5, 8, 9, 6, 7, 10 )),
     2589permutationFromIntvec(intvec( 2, 1, 4, 3, 5, 9, 8, 7, 6, 10 )),
     2590permutationFromIntvec(intvec( 2, 3, 1, 4, 8, 5, 9, 6, 10, 7 )),
     2591permutationFromIntvec(intvec( 2, 3, 4, 1, 8, 9, 5, 10, 6, 7 )),
     2592permutationFromIntvec(intvec( 2, 4, 1, 3, 9, 5, 8, 7, 10, 6 )),
     2593permutationFromIntvec(intvec( 2, 4, 3, 1, 9, 8, 5, 10, 7, 6 )),
     2594permutationFromIntvec(intvec( 2, 5, 8, 9, 1, 3, 4, 6, 7, 10 )),
     2595permutationFromIntvec(intvec( 2, 5, 9, 8, 1, 4, 3, 7, 6, 10 )),
     2596permutationFromIntvec(intvec( 2, 8, 5, 9, 3, 1, 4, 6, 10, 7 )),
     2597permutationFromIntvec(intvec( 2, 8, 9, 5, 3, 4, 1, 10, 6, 7 )),
     2598permutationFromIntvec(intvec( 2, 9, 5, 8, 4, 1, 3, 7, 10, 6 )),
     2599permutationFromIntvec(intvec( 2, 9, 8, 5, 4, 3, 1, 10, 7, 6 )),
     2600permutationFromIntvec(intvec( 3, 1, 2, 4, 6, 8, 10, 5, 7, 9 )),
     2601permutationFromIntvec(intvec( 3, 1, 4, 2, 6, 10, 8, 7, 5, 9 )),
     2602permutationFromIntvec(intvec( 3, 2, 1, 4, 8, 6, 10, 5, 9, 7 )),
     2603permutationFromIntvec(intvec( 3, 2, 4, 1, 8, 10, 6, 9, 5, 7 )),
     2604permutationFromIntvec(intvec( 3, 4, 1, 2, 10, 6, 8, 7, 9, 5 )),
     2605permutationFromIntvec(intvec( 3, 4, 2, 1, 10, 8, 6, 9, 7, 5 )),
     2606permutationFromIntvec(intvec( 3, 6, 8, 10, 1, 2, 4, 5, 7, 9 )),
     2607permutationFromIntvec(intvec( 3, 6, 10, 8, 1, 4, 2, 7, 5, 9 )),
     2608permutationFromIntvec(intvec( 3, 8, 6, 10, 2, 1, 4, 5, 9, 7 )),
     2609permutationFromIntvec(intvec( 3, 8, 10, 6, 2, 4, 1, 9, 5, 7 )),
     2610permutationFromIntvec(intvec( 3, 10, 6, 8, 4, 1, 2, 7, 9, 5 )),
     2611permutationFromIntvec(intvec( 3, 10, 8, 6, 4, 2, 1, 9, 7, 5 )),
     2612permutationFromIntvec(intvec( 4, 1, 2, 3, 7, 9, 10, 5, 6, 8 )),
     2613permutationFromIntvec(intvec( 4, 1, 3, 2, 7, 10, 9, 6, 5, 8 )),
     2614permutationFromIntvec(intvec( 4, 2, 1, 3, 9, 7, 10, 5, 8, 6 )),
     2615permutationFromIntvec(intvec( 4, 2, 3, 1, 9, 10, 7, 8, 5, 6 )),
     2616permutationFromIntvec(intvec( 4, 3, 1, 2, 10, 7, 9, 6, 8, 5 )),
     2617permutationFromIntvec(intvec( 4, 3, 2, 1, 10, 9, 7, 8, 6, 5 )),
     2618permutationFromIntvec(intvec( 4, 7, 9, 10, 1, 2, 3, 5, 6, 8 )),
     2619permutationFromIntvec(intvec( 4, 7, 10, 9, 1, 3, 2, 6, 5, 8 )),
     2620permutationFromIntvec(intvec( 4, 9, 7, 10, 2, 1, 3, 5, 8, 6 )),
     2621permutationFromIntvec(intvec( 4, 9, 10, 7, 2, 3, 1, 8, 5, 6 )),
     2622permutationFromIntvec(intvec( 4, 10, 7, 9, 3, 1, 2, 6, 8, 5 )),
     2623permutationFromIntvec(intvec( 4, 10, 9, 7, 3, 2, 1, 8, 6, 5 )),
     2624permutationFromIntvec(intvec( 5, 1, 6, 7, 2, 8, 9, 3, 4, 10 )),
     2625permutationFromIntvec(intvec( 5, 1, 7, 6, 2, 9, 8, 4, 3, 10 )),
     2626permutationFromIntvec(intvec( 5, 2, 8, 9, 1, 6, 7, 3, 4, 10 )),
     2627permutationFromIntvec(intvec( 5, 2, 9, 8, 1, 7, 6, 4, 3, 10 )),
     2628permutationFromIntvec(intvec( 5, 6, 1, 7, 8, 2, 9, 3, 10, 4 )),
     2629permutationFromIntvec(intvec( 5, 6, 7, 1, 8, 9, 2, 10, 3, 4 )),
     2630permutationFromIntvec(intvec( 5, 7, 1, 6, 9, 2, 8, 4, 10, 3 )),
     2631permutationFromIntvec(intvec( 5, 7, 6, 1, 9, 8, 2, 10, 4, 3 )),
     2632permutationFromIntvec(intvec( 5, 8, 2, 9, 6, 1, 7, 3, 10, 4 )),
     2633permutationFromIntvec(intvec( 5, 8, 9, 2, 6, 7, 1, 10, 3, 4 )),
     2634permutationFromIntvec(intvec( 5, 9, 2, 8, 7, 1, 6, 4, 10, 3 )),
     2635permutationFromIntvec(intvec( 5, 9, 8, 2, 7, 6, 1, 10, 4, 3 )),
     2636permutationFromIntvec(intvec( 6, 1, 5, 7, 3, 8, 10, 2, 4, 9 )),
     2637permutationFromIntvec(intvec( 6, 1, 7, 5, 3, 10, 8, 4, 2, 9 )),
     2638permutationFromIntvec(intvec( 6, 3, 8, 10, 1, 5, 7, 2, 4, 9 )),
     2639permutationFromIntvec(intvec( 6, 3, 10, 8, 1, 7, 5, 4, 2, 9 )),
     2640permutationFromIntvec(intvec( 6, 5, 1, 7, 8, 3, 10, 2, 9, 4 )),
     2641permutationFromIntvec(intvec( 6, 5, 7, 1, 8, 10, 3, 9, 2, 4 )),
     2642permutationFromIntvec(intvec( 6, 7, 1, 5, 10, 3, 8, 4, 9, 2 )),
     2643permutationFromIntvec(intvec( 6, 7, 5, 1, 10, 8, 3, 9, 4, 2 )),
     2644permutationFromIntvec(intvec( 6, 8, 3, 10, 5, 1, 7, 2, 9, 4 )),
     2645permutationFromIntvec(intvec( 6, 8, 10, 3, 5, 7, 1, 9, 2, 4 )),
     2646permutationFromIntvec(intvec( 6, 10, 3, 8, 7, 1, 5, 4, 9, 2 )),
     2647permutationFromIntvec(intvec( 6, 10, 8, 3, 7, 5, 1, 9, 4, 2 )),
     2648permutationFromIntvec(intvec( 7, 1, 5, 6, 4, 9, 10, 2, 3, 8 )),
     2649permutationFromIntvec(intvec( 7, 1, 6, 5, 4, 10, 9, 3, 2, 8 )),
     2650permutationFromIntvec(intvec( 7, 4, 9, 10, 1, 5, 6, 2, 3, 8 )),
     2651permutationFromIntvec(intvec( 7, 4, 10, 9, 1, 6, 5, 3, 2, 8 )),
     2652permutationFromIntvec(intvec( 7, 5, 1, 6, 9, 4, 10, 2, 8, 3 )),
     2653permutationFromIntvec(intvec( 7, 5, 6, 1, 9, 10, 4, 8, 2, 3 )),
     2654permutationFromIntvec(intvec( 7, 6, 1, 5, 10, 4, 9, 3, 8, 2 )),
     2655permutationFromIntvec(intvec( 7, 6, 5, 1, 10, 9, 4, 8, 3, 2 )),
     2656permutationFromIntvec(intvec( 7, 9, 4, 10, 5, 1, 6, 2, 8, 3 )),
     2657permutationFromIntvec(intvec( 7, 9, 10, 4, 5, 6, 1, 8, 2, 3 )),
     2658permutationFromIntvec(intvec( 7, 10, 4, 9, 6, 1, 5, 3, 8, 2 )),
     2659permutationFromIntvec(intvec( 7, 10, 9, 4, 6, 5, 1, 8, 3, 2 )),
     2660permutationFromIntvec(intvec( 8, 2, 5, 9, 3, 6, 10, 1, 4, 7 )),
     2661permutationFromIntvec(intvec( 8, 2, 9, 5, 3, 10, 6, 4, 1, 7 )),
     2662permutationFromIntvec(intvec( 8, 3, 6, 10, 2, 5, 9, 1, 4, 7 )),
     2663permutationFromIntvec(intvec( 8, 3, 10, 6, 2, 9, 5, 4, 1, 7 )),
     2664permutationFromIntvec(intvec( 8, 5, 2, 9, 6, 3, 10, 1, 7, 4 )),
     2665permutationFromIntvec(intvec( 8, 5, 9, 2, 6, 10, 3, 7, 1, 4 )),
     2666permutationFromIntvec(intvec( 8, 6, 3, 10, 5, 2, 9, 1, 7, 4 )),
     2667permutationFromIntvec(intvec( 8, 6, 10, 3, 5, 9, 2, 7, 1, 4 )),
     2668permutationFromIntvec(intvec( 8, 9, 2, 5, 10, 3, 6, 4, 7, 1 )),
     2669permutationFromIntvec(intvec( 8, 9, 5, 2, 10, 6, 3, 7, 4, 1 )),
     2670permutationFromIntvec(intvec( 8, 10, 3, 6, 9, 2, 5, 4, 7, 1 )),
     2671permutationFromIntvec(intvec( 8, 10, 6, 3, 9, 5, 2, 7, 4, 1 )),
     2672permutationFromIntvec(intvec( 9, 2, 5, 8, 4, 7, 10, 1, 3, 6 )),
     2673permutationFromIntvec(intvec( 9, 2, 8, 5, 4, 10, 7, 3, 1, 6 )),
     2674permutationFromIntvec(intvec( 9, 4, 7, 10, 2, 5, 8, 1, 3, 6 )),
     2675permutationFromIntvec(intvec( 9, 4, 10, 7, 2, 8, 5, 3, 1, 6 )),
     2676permutationFromIntvec(intvec( 9, 5, 2, 8, 7, 4, 10, 1, 6, 3 )),
     2677permutationFromIntvec(intvec( 9, 5, 8, 2, 7, 10, 4, 6, 1, 3 )),
     2678permutationFromIntvec(intvec( 9, 7, 4, 10, 5, 2, 8, 1, 6, 3 )),
     2679permutationFromIntvec(intvec( 9, 7, 10, 4, 5, 8, 2, 6, 1, 3 )),
     2680permutationFromIntvec(intvec( 9, 8, 2, 5, 10, 4, 7, 3, 6, 1 )),
     2681permutationFromIntvec(intvec( 9, 8, 5, 2, 10, 7, 4, 6, 3, 1 )),
     2682permutationFromIntvec(intvec( 9, 10, 4, 7, 8, 2, 5, 3, 6, 1 )),
     2683permutationFromIntvec(intvec( 9, 10, 7, 4, 8, 5, 2, 6, 3, 1 )),
     2684permutationFromIntvec(intvec( 10, 3, 6, 8, 4, 7, 9, 1, 2, 5 )),
     2685permutationFromIntvec(intvec( 10, 3, 8, 6, 4, 9, 7, 2, 1, 5 )),
     2686permutationFromIntvec(intvec( 10, 4, 7, 9, 3, 6, 8, 1, 2, 5 )),
     2687permutationFromIntvec(intvec( 10, 4, 9, 7, 3, 8, 6, 2, 1, 5 )),
     2688permutationFromIntvec(intvec( 10, 6, 3, 8, 7, 4, 9, 1, 5, 2 )),
     2689permutationFromIntvec(intvec( 10, 6, 8, 3, 7, 9, 4, 5, 1, 2 )),
     2690permutationFromIntvec(intvec( 10, 7, 4, 9, 6, 3, 8, 1, 5, 2 )),
     2691permutationFromIntvec(intvec( 10, 7, 9, 4, 6, 8, 3, 5, 1, 2 )),
     2692permutationFromIntvec(intvec( 10, 8, 3, 6, 9, 4, 7, 2, 5, 1 )),
     2693permutationFromIntvec(intvec( 10, 8, 6, 3, 9, 7, 4, 5, 2, 1 )),
     2694permutationFromIntvec(intvec( 10, 9, 4, 7, 8, 3, 6, 2, 5, 1 )),
     2695permutationFromIntvec(intvec( 10, 9, 7, 4, 8, 6, 3, 5, 2, 1 ));
     2696return(simplexSymmetryGroup);
     2697}
     2698example
     2699{
     2700  echo = 2;
     2701  G25Action();
     2702}
     2703
     2704
     2705proc findOrbits(list G, int d)
     2706"USAGE: findOrbits(G,d); G list of permutations in a subgroup of the symmetric group; d int minimum cardinality of simplices to be considered
     2707PURPOSE: Computes the orbit decomposition of the action of G.
     2708RETURN: list of intvec.
     2709EXAMPLE: example findOrbits; shows an example
     2710"
     2711{
     2712int n = size(permutationToIntvec(G[1]));
     2713list listOrbits;
     2714list finished;
     2715int tst;
     2716bigint startel;
     2717intvec startelbin;
     2718list neworbit,neworbitint;
     2719int i,posToInsert;
     2720bigint nn;
     2721while (size(finished)<2^n){
     2722   startel=0;
     2723   if (size(finished)>0){
     2724      tst=0;
     2725      while ((tst==0) and (startel+1<=size(finished))){
     2726        if (finished[int(startel+1)]<>startel){
     2727          tst=1;
     2728        } else {
     2729          startel=startel+1;
     2730        }
     2731      }
     2732   }
     2733   if (startel==0){
     2734     neworbit[1]= list();
     2735     neworbitint[1]=0;
     2736   } else {
     2737      startelbin=bigintToBinary(startel,n);
     2738       neworbitint=list(startel);
     2739       for (i=2;i<=size(G);i++){
     2740         nn=binaryToBigint(applyPermutationToIntvec(startelbin,G[i]));
     2741         //nn;neworbitint;
     2742         //"place to insert";
     2743         posToInsert = findPlaceToInsert(neworbitint,nn);
     2744         //"pos";posToInsert;
     2745         if(posToInsert > 0)
     2746         {
     2747          //"vorher";neworbitint;
     2748          neworbitint = insertToList(neworbitint,nn,posToInsert);
     2749          //"nachher";neworbitint;
     2750         }
     2751       }
     2752       for (i=1;i<=size(neworbitint);i++){
     2753          neworbit[i]=bigintToBinary(neworbitint[i],n);
     2754       }
     2755   }
     2756   if (size(neworbit[1])>=d){
     2757     listOrbits[size(listOrbits)+1]=neworbit;
     2758   }
     2759   finished=sort(finished+neworbitint)[1];
     2760}
     2761return(listOrbits);}
     2762example
     2763{
     2764list G = G25Action();
     2765list orb = findOrbits(G);
     2766for (int i=1;i<=size(orb);i++){orb[i][1];}
     2767}
     2768
Note: See TracChangeset for help on using the changeset viewer.