version 1.26, 2004/01/09 03:48:58 |
version 1.30, 2004/01/14 09:29:39 |
Line 313 def makeret(Res,Vars,FLAG){ |
|
Line 313 def makeret(Res,Vars,FLAG){ |
|
|
|
ResVec=newvect(ResNum)$ |
ResVec=newvect(ResNum)$ |
|
|
for(M=0,I=0;I<ResNum;I++){ |
if(FLAG) |
|
M=0$ |
|
else |
|
M=-1$ |
|
|
|
for(I=0;I<ResNum;I++){ |
if(member(Res[I][0],Vars)){ |
if(member(Res[I][0],Vars)){ |
ResVec[I]=Res[I][1]$ |
ResVec[I]=Res[I][1]$ |
|
|
if(FLAG && type(ResVec[I])==1){ |
if(FLAG){ |
if(M==0) |
if(type(ResVec[I])==1){ |
M=ResVec[I]$ |
if(M==0) |
else |
M=ResVec[I]$ |
if(ResVec[I]<M) |
else |
M=ResVec[I]$ |
if(ResVec[I]<M) |
} |
M=ResVec[I]$ |
} |
} |
|
else |
|
M=-1$ |
|
} |
|
} |
} |
} |
|
|
if(M!=0) |
|
|
if(M!=-1) |
ResVec=ResVec/M; |
ResVec=ResVec/M; |
|
|
RET=newvect(VarsNum,Vars)$ |
RET=newvect(VarsNum,Vars)$ |
Line 520 def qcheck(PolyList,Vars,FLAG){ |
|
Line 530 def qcheck(PolyList,Vars,FLAG){ |
|
else{ |
else{ |
|
|
TMP=vtol(TMP1[1])$ |
TMP=vtol(TMP1[1])$ |
|
RET0=[]$ |
if((TMP0=fixedpoint(TMP,0))!=[]){ |
if((TMP0=fixedpoint(TMP,0))!=[]){ |
|
|
for(I=0;I<length(TMP0);I++) |
for(I=0;I<length(TMP0);I++) |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
|
RET0=value2(Vars,TMP)$ |
TMP=value2(Vars,TMP)$ |
if(RET0!=[]) |
|
RET0=wsort(RET0,Vars,RET0,1/10)$ |
if(TMP!=[]) |
} |
RET=append(RET,wsort(TMP,Vars,TMP,1/10))$ |
|
} |
TMP=vtol(TMP1[1])$ |
else if((TMP0=fixedpoint(TMP,1))!=[]){ |
if(RET0==[] && (TMP0=fixedpoint(TMP,1))!=[]){ |
|
|
for(I=0;I<length(TMP0);I++) |
for(I=0;I<length(TMP0);I++) |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
|
RET0=value2(Vars,TMP)$ |
TMP=value2(Vars,TMP)$ |
|
|
|
if(TMP!=[]) |
if(RET0!=[]) |
RET=append(RET,wsort(TMP,Vars,TMP,1/10))$ |
RET0=wsort(RET0,Vars,RET0,1/10)$ |
} |
} |
|
RET=append(RET,RET0)$ |
} |
} |
} |
} |
else if(FLAG==1) |
else if(FLAG==1) |
Line 615 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
Line 625 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
else{ |
else{ |
|
|
TMP=vtol(TMP1[1])$ |
TMP=vtol(TMP1[1])$ |
|
RET0=[]$ |
if((TMP0=fixedpoint(TMP1[1],0))!=[]){ |
if((TMP0=fixedpoint(TMP,0))!=[]){ |
|
|
for(I=0;I<length(TMP0);I++) |
for(I=0;I<length(TMP0);I++) |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
|
RET0=value2(Vars,TMP)$ |
TMP=value2(Vars,TMP)$ |
if(RET0!=[]) |
|
RET0=wsort(RET0,Vars,RET0,ID+1/10)$ |
if(TMP!=[]) |
} |
RET=append(RET,wsort(TMP,Vars,TMP,ID+1/10))$ |
|
} |
TMP=vtol(TMP1[1])$ |
else if((TMP0=fixedpoint(TMP1[1],1))!=[]){ |
if(RET0==[] && (TMP0=fixedpoint(TMP,1))!=[]){ |
|
|
for(I=0;I<length(TMP0);I++) |
for(I=0;I<length(TMP0);I++) |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
TMP=map(subst,TMP,TMP0[I][0],TMP0[I][1])$ |
|
RET0=value2(Vars,TMP)$ |
TMP=value2(Vars,TMP)$ |
|
|
if(RET0!=[]) |
if(TMP!=[]) |
RET0=wsort(RET0,Vars,RET0,ID+1/10)$ |
RET=append(RET,wsort(TMP,Vars,TMP,ID+1/10))$ |
|
} |
} |
|
|
|
RET=append(RET,RET0)$ |
} |
} |
|
|
} |
} |
Line 695 def unitweight(ExpMat,Vars,PolyListNum,OneMat,FLAG){ |
|
Line 706 def unitweight(ExpMat,Vars,PolyListNum,OneMat,FLAG){ |
|
|
|
if(jacobi(ExtMatColNum,NormMat1,WorkMat)){ |
if(jacobi(ExtMatColNum,NormMat1,WorkMat)){ |
|
|
Res=newvect(ExpMatColNum)$ |
Res=newvect(ExtMatColNum)$ |
for(I=0;I<ExpMatColNum;I++){ |
for(I=0;I<ExtMatColNum;I++){ |
Res[I]=newvect(2)$ |
Res[I]=newvect(2)$ |
Res[I][0]=Vars[I]$ |
Res[I][0]=ExtVars[I]$ |
Res[I][1]=WorkMat[ExtMatColNum-1][I]$ |
Res[I][1]=WorkMat[ExtMatColNum-1][I]$ |
} |
} |
|
|
Line 714 def unitweight(ExpMat,Vars,PolyListNum,OneMat,FLAG){ |
|
Line 725 def unitweight(ExpMat,Vars,PolyListNum,OneMat,FLAG){ |
|
if(TMP!=[]) |
if(TMP!=[]) |
RET=append(RET,wsort(TMP1[1],Vars,TMP,2))$ |
RET=append(RET,wsort(TMP1[1],Vars,TMP,2))$ |
} |
} |
|
else if(FLAG==1) |
if(FLAG==1) |
|
RET=append(RET,[[1,Vars,vtol(TMP1[1])]])$ |
RET=append(RET,[[1,Vars,vtol(TMP1[1])]])$ |
} |
} |
} |
} |