cone_pre.c
Go to the documentation of this file.
1 /* 07/13/95 Bug fix. rr[i] is introduced instead of r[i],
2  because r[n] happens to be overwritten
3  when i=n in the last loop. */
4 
5 #include "arith.h"
6 
7 cone_pre(x,n,p,u,s,v,r,f)
8 MATRIX x;
9 int n,p;
10 MATRIX u,s,v;
11 int r[MAX];
12 MATRIX f;
13 {
14  MATRIX e,work;
15  int job,info, rr[MAX];
16  int i,j;
17  int ssvdc();
18 
19  MATRIX ss,uu,vv;
20  unsigned int planetab;
21 
22  /* singular value decomposition of the matrix C */
23 
24  job=11;
25 
26  info=ssvdc(x,n,n,p,s,e,u,n,v,p,work,job);
27 
28  /* determine the rank of C */
29 
30  r[n]=rank(n,p,s);
31 
32  /* substitute U1Drr to F */
33 
34  mat_mult(n,r[n],r[n],u,s,f);
35 
36  /* select r independent hyperplane */
37 
38  rr[0]=0;
39  planetab=0;
40  for(i=1; i<=n; i++){
41  info=ssvdc(f,i,i,r[n],ss,e,uu,i,vv,r[n],work,job);
42  rr[i]=rank(i,r[n],ss);
43  if(rr[i] == rr[i-1]+1)
44  planetab= planetab | (1<<(i-1));
45  if(rr[i] == r[n])
46  break;
47  }
48  return(planetab);
49 }
int rank(int n, int p, MATRIX s)
Definition: rank.c:3
GLfloat n[6][3]
Definition: cube.c:15
ssvdc(MATRIX xarg, int ldx, int n, int p, MATRIX s, MATRIX e, MATRIX u, int ldu, MATRIX v, int ldv, MATRIX work, int job)
#define MAX
Definition: arith.h:12
cone_pre(MATRIX x, int n, int p, MATRIX u, MATRIX s, MATRIX v, r, MATRIX f)
Definition: cone_pre.c:7
mat_mult(int n, int m, int l, MATRIX amat, MATRIX bmat, MATRIX pmat)
Definition: mat_mult.c:9
short s
Definition: structsize.c:2
VECTOR MATRIX[MAX]
Definition: arith.h:27
GLfloat v[8][3]
Definition: cube.c:21


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