cone_pre.c
Go to the documentation of this file.
00001 /*   07/13/95 Bug fix.  rr[i] is introduced instead of r[i],
00002                         because r[n] happens to be overwritten
00003                         when i=n in the last loop.                          */
00004 
00005 #include "arith.h"
00006 
00007 cone_pre(x,n,p,u,s,v,r,f)
00008 MATRIX x;
00009 int n,p;
00010 MATRIX u,s,v;
00011 int r[MAX];
00012 MATRIX f;
00013 {
00014     MATRIX e,work;
00015     int job,info, rr[MAX];
00016     int i,j;
00017     int ssvdc();
00018 
00019     MATRIX ss,uu,vv;
00020     unsigned int planetab;
00021 
00022     /* singular value decomposition of the matrix C */
00023 
00024     job=11;
00025 
00026     info=ssvdc(x,n,n,p,s,e,u,n,v,p,work,job);
00027 
00028     /* determine the rank of C */
00029     
00030     r[n]=rank(n,p,s);
00031 
00032     /* substitute U1Drr to F */
00033 
00034     mat_mult(n,r[n],r[n],u,s,f);
00035 
00036     /* select r independent hyperplane */
00037 
00038     rr[0]=0;
00039     planetab=0;
00040     for(i=1; i<=n; i++){
00041         info=ssvdc(f,i,i,r[n],ss,e,uu,i,vv,r[n],work,job);
00042         rr[i]=rank(i,r[n],ss);
00043         if(rr[i] == rr[i-1]+1)
00044             planetab= planetab | (1<<(i-1));
00045         if(rr[i] == r[n])
00046             break;
00047     }
00048     return(planetab);
00049 }


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Sep 3 2015 10:36:19