Example #1
0
void al2_oo(int arg)
  {
  int i,j,k, aarg, ord;
  Logic found;

  if (arg < 0)
    { aarg = -arg; }
  else
    { aarg = arg; }

  found = FALSE;
  for (i = 2; i < nextdf; i++)
    {
    if (COL1(i) >= 0)
      {
      if (al1_bldrep(i))
        { 
        if ((ord = al1_ordrep()) == 0)
          { continue; }
        if ((arg == 0) || (ord%aarg == 0))
          {
          if (!found)
            {
            found = TRUE;
            fprintf(fop, "  coset |  order  rep\n");
            fprintf(fop, "--------+------------\n");
            }

          fprintf(fop, "%7d | %6d  ", i, ord);
          for (j = 0; j < repsiz; j++)
            {
            k = colgen[currrep[j]];             /* generator number */
            if (!galpha)
              { fprintf(fop, "%d ", k); }
            else
              { fprintf(fop, "%c", 
                             (k > 0) ? algen[k] : toupper(algen[-k])); }
            }
          fprintf(fop, "\n");

          if ((arg > 0) && (ord%aarg == 0))
            { break; }
          }
        }
      else
        { al2_continue("unable to build coset rep've"); }
      }
    }

  if (!found)
    { fprintf(fop, "* Nothing found\n"); }
  }
Example #2
0
void al1_prtct(int f, int l, int s, Logic c, Logic or)
  {
  int i, j, row;

  if (f < 1)
    { f = 1; }
  if (l > nextdf-1)
    { l = nextdf-1; }
  if (s < 1)
    { s = 1; }

  fprintf(fop, " coset |");		/* above coset number */
  if (!galpha)
    {
    for (i = 1; i <= ncol; i++) 
      { fprintf(fop, " %6d", colgen[i]); }
    }
  else
    {
    for (i = 1; i <= ncol; i++) 
      { fprintf(fop, "      %c", (colgen[i] > 0) 
                        ? algen[colgen[i]] : toupper(algen[-colgen[i]])); }
    }
  if (or) 
    { fprintf(fop,"   order   rep've"); }
  fprintf(fop, "\n");

  fprintf(fop, "-------+");
  for (i = 1; i <= ncol; i++) 
    { fprintf(fop, "-------"); }
  if (or) 
    { fprintf(fop,"-----------------"); }
  fprintf(fop, "\n");

  row = f;
  if (!c)
    {
    while (row < nextdf && COL1(row) < 0)
      { row++; }
    }
  while (row <= l)
    {
    fprintf(fop, "%6d |", row);
    for (i = 1; i <= ncol; i++) 
      { fprintf(fop, " %6d", CT(row,i)); }
    if (or && row != 1)
      {
      if (COL1(row) < 0)
        { fprintf(fop, "       -   -"); }
      else
        {
        if (al1_bldrep(row))
          {
          fprintf(fop, " %7d   ", al1_ordrep());
          for (i = 0; i < repsiz; i++)
            {
            j = colgen[currrep[i]];		/* generator number */
            if (!galpha)
              { fprintf(fop, "%d ", j); }
            else
              { fprintf(fop, "%c", 
                             (j > 0) ? algen[j] : toupper(algen[-j])); }
            }
          }
        else
          { fprintf(fop, "       ?   ?"); }
        }
      }
    fprintf(fop, "\n");

    /* If we're printing *all* rows, we can just incr row by s.  If not, we
    have to jump over non-redundant rows. */

    if (c)
      { row += s; }
    else
      {
      for (i = 1; i <= s; i++)
        {
        row++;
        while (row < nextdf && COL1(row) < 0)
          { row++; }
        if (row == nextdf)
          { break; }
        }
      }
    }
  }