File: orbit.c

package info (click to toggle)
lie 2.2.2%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 1,000 kB
  • ctags: 1,801
  • sloc: ansic: 12,761; yacc: 395; makefile: 150; sh: 4
file content (14 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "lie.h"

matrix* Orbit(limit,vec,m,n) index limit,n; vector* vec; entry** m;
{ index i, j, l=vec->ncomp, last, cur;
  matrix* result = mkmatrix(limit+1,l); entry** res= result->elm;
  copyrow(vec->compon,res[0],l);
  for (cur=0,last=1; cur<last; cur++)
    for (i=0; i<n; i++)
    { mulvecmatelm(res[cur],m+i*l,res[last],l,l);
      j=0; while (!eqrow(res[j++],res[last],l)) {}
      if (j>last) if (++last>limit) error("Orbit size exceeds given limit\n");
    }
  result->nrows=last; return result;
}