// Cross Polytope in n dimensions. #include #include "l.h" static int gcount(int x) {int c=0; while(x){++c; x &= x-1;} return c;} bp gcp(int n){ R * wh = (R*)malloc((2*n)*n*sizeof(R)); short * tp = (short *)malloc((1< int main(){bp x = gcp(5); pm((mat){x.wh, x.vc, x.d}, "xes"); {int j=x.sc; while(j--) {int k=x.d; printf("["/*]*/); while(k--) printf("%3d; ", x.c[j*x.d + k]); printf(/*[*/"];\n");}} return 0;} // the yield of this test code is for the boundary tester at: // http://cap-lore.com/MathPhys/IP/ocaml/bndry.html #endif