contrib
contact
clib
cone_inter.c
Go to the documentation of this file.
1
/* Jan.17,1992. Bug fix. Set small coeficient be zero. */
2
#include "
arith.h
"
3
4
cone_inter
(x,
n
,w)
5
float
x[
MAX
][
MAXRANK
];
6
int
n
;
7
float
w[
MAXEDGE
][
MAXRANK
];
8
{
9
int
i,j,en;
10
MATRIX
dx;
11
REAL
dw[
MAXRANK
][
MAXEDGE
];
12
13
for
(i=0; i<
n
; i++){
14
for
(j=0; j<
MAXRANK
; j++){
15
dx[i][j]=(double)x[i][j];
16
/* Set small coecifients be zero */
17
if
(fabs(dx[i][j])<
EPS
)
18
dx[i][j]=0;
19
}
20
}
21
22
en=
cone
(dx,
n
,
MAXRANK
,dw);
23
24
for
(i=0; i<en; i++){
25
for
(j=0; j<
MAXRANK
; j++){
26
if
(fabs(dw[j][i])<0.000001)
27
w[i][j]=(float)0.0;
28
else
29
w[i][j]=(float)dw[j][i];
30
}
31
}
32
33
return
(en);
34
}
35
36
cone
cone(MATRIX x, int n, int p, w)
Definition:
cone.c:3
arith.h
EPS
#define EPS
Definition:
arith.h:15
MAXEDGE
#define MAXEDGE
Definition:
arith.h:14
cone_inter
cone_inter(x, int n, w)
Definition:
cone_inter.c:4
REAL
double REAL
Definition:
arith.h:25
MATRIX
VECTOR MATRIX[MAX]
Definition:
arith.h:27
MAX
#define MAX
Definition:
arith.h:12
MAXRANK
#define MAXRANK
Definition:
arith.h:13
n
GLfloat n[6][3]
Definition:
cube.c:15
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43