cone_post.c
Go to the documentation of this file.
1 /* Oct 12, 1990. Bug fix. substitute V2 to w based on the rank(C) */
2 
3 #include "arith.h"
4 
5 cone_post(s,v,r,n,linetab,start,m,w)
6 MATRIX s;
7 MATRIX v;
8 int r[MAX],n;
9 LINE linetab[MAXEDGE];
10 int start,m;
11 REAL w[MAXRANK][MAXEDGE];
12 {
13  TABLE hashtab;
14  int i,j,k,en,hash;
15 
16  for(i=0; i<HASHNO; i++)
17  hashtab[i]= EMPTY;
18 
19  en=0;
20  for(k=start; k<m; k=linetab[k].next){
21  for(i=0; i<MAXRANK; i++){
22  w[i][en]=0.0e0;
23  for(j=0; j<r[n]; j++){
24  w[i][en] += v[i][j] * linetab[k].s[j];
25  }
26  }
27  hash=same(w,en,hashtab);
28  if(hash != COLLISION){
29  hashtab[hash]=en;
30  en += 1;
31  }
32  }
33 
34 /* printf("edge number = %d\n",en); */
35 
36  for(j=r[n]; j<MAXRANK; j++){
37  for(i=0; i<MAXRANK; i++){
38  w[i][en]= v[i][j];
39  w[i][en+1]= -v[i][j];
40  }
41  en += 2;
42  }
43 
44  return(en);
45 }
#define EMPTY
Definition: arith.h:21
GLfloat n[6][3]
Definition: cube.c:15
double REAL
Definition: arith.h:25
#define MAXEDGE
Definition: arith.h:14
#define MAX
Definition: arith.h:12
same(w, int en, TABLE hashtab)
Definition: same.c:6
cone_post(MATRIX s, MATRIX v, r, n, linetab, int start, int m, w)
Definition: cone_post.c:5
Definition: arith.h:33
short s
Definition: structsize.c:2
int TABLE[HASHNO]
Definition: arith.h:29
#define MAXRANK
Definition: arith.h:13
static time_stamp_t start
Definition: rgc_utils.c:75
#define HASHNO
Definition: arith.h:23
VECTOR MATRIX[MAX]
Definition: arith.h:27
GLfloat v[8][3]
Definition: cube.c:21
#define COLLISION
Definition: arith.h:22


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 20:00:43