contrib
contact
clib
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
}
HASHNO
#define HASHNO
Definition:
arith.h:23
s
short s
Definition:
structsize.c:2
arith.h
same
same(w, int en, TABLE hashtab)
Definition:
same.c:6
cone_post
cone_post(MATRIX s, MATRIX v, r, n, linetab, int start, int m, w)
Definition:
cone_post.c:5
COLLISION
#define COLLISION
Definition:
arith.h:22
line::s
REAL s[MAXRANK]
Definition:
arith.h:39
MAXEDGE
#define MAXEDGE
Definition:
arith.h:14
line
Definition:
arith.h:33
REAL
double REAL
Definition:
arith.h:25
start
static time_stamp_t start
Definition:
rgc_utils.c:75
MATRIX
VECTOR MATRIX[MAX]
Definition:
arith.h:27
EMPTY
#define EMPTY
Definition:
arith.h:21
MAX
#define MAX
Definition:
arith.h:12
line::next
int next
Definition:
arith.h:35
MAXRANK
#define MAXRANK
Definition:
arith.h:13
n
GLfloat n[6][3]
Definition:
cube.c:15
v
GLfloat v[8][3]
Definition:
cube.c:21
TABLE
int TABLE[HASHNO]
Definition:
arith.h:29
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43