version 1.35, 2004/05/06 02:28:07 |
version 1.37, 2004/05/17 12:03:17 |
Line 306 def makeret(Res,Vars,FLAG){ |
|
Line 306 def makeret(Res,Vars,FLAG){ |
|
else |
else |
M=-1$ |
M=-1$ |
|
|
for(I=0;I<ResNum;I++){ |
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){ |
if(FLAG){ |
if(type(ResVec[I])==1){ |
if(type(ResVec[I])==1){ |
if(M==0) |
if(M==0) |
M=ResVec[I]$ |
M=ResVec[I]$ |
else |
else |
if(ResVec[I]<M) |
if(ResVec[I]<M) |
M=ResVec[I]$ |
M=ResVec[I]$ |
} |
} |
else |
else |
M=-1$ |
M=-1$ |
} |
} |
} |
} |
} |
} |
|
|
|
|
if(M!=-1) |
if(M!=-1) |
ResVec=ResVec/M; |
ResVec=ResVec/M; |
|
|
Line 471 def value2(Vars,Ans,Ba){ |
|
Line 470 def value2(Vars,Ans,Ba){ |
|
|
|
if(nonposdegchk(Res)){ |
if(nonposdegchk(Res)){ |
TMP1=makeret(Res,Vars,1)$ |
TMP1=makeret(Res,Vars,1)$ |
return vtol(TMP1[1])$ |
return [vtol(TMP1[1]),vtol(map(drint,TMP1[1]*1.0))]$ |
} |
} |
else |
else |
return []$ |
return []$ |
Line 525 def qcheck(PolyList,Vars,FLAG){ |
|
Line 524 def qcheck(PolyList,Vars,FLAG){ |
|
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,1)$ |
RET0=value2(Vars,TMP,1)$ |
|
|
if(RET0!=[]) |
if(RET0!=[]) |
RET0=wsort(RET0,Vars,RET0,-1)$ |
RET0=wsort(RET0[0],Vars,RET0[1],-1)$ |
} |
} |
|
|
TMP=vtol(TMP1[1])$ |
TMP=vtol(TMP1[1])$ |
Line 537 def qcheck(PolyList,Vars,FLAG){ |
|
Line 537 def qcheck(PolyList,Vars,FLAG){ |
|
RET0=value2(Vars,TMP,-1)$ |
RET0=value2(Vars,TMP,-1)$ |
|
|
if(RET0!=[]) |
if(RET0!=[]) |
RET0=wsort(RET0,Vars,RET0,-1)$ |
RET0=wsort(RET0[0],Vars,RET0[1],-1)$ |
} |
} |
RET=append(RET,RET0)$ |
RET=append(RET,RET0)$ |
} |
} |
Line 756 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
Line 756 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
|
|
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)$ |
RET0=value2(Vars,TMP,1)$ |
|
|
if(RET0!=[]) |
if(RET0!=[]) |
RET0=wsort(RET0,Vars,RET0,-ID)$ |
RET0=wsort(RET0[0],Vars,RET0[1],-ID)$ |
} |
} |
|
|
TMP=vtol(TMP1[1])$ |
TMP=vtol(TMP1[1])$ |
Line 766 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
Line 767 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
|
|
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)$ |
RET0=value2(Vars,TMP,-1)$ |
|
|
if(RET0!=[]) |
if(RET0!=[]) |
RET0=wsort(RET0,Vars,RET0,-ID)$ |
RET0=wsort(RET0[0],Vars,RET0[1],-ID)$ |
} |
} |
|
|
RET=append(RET,RET0)$ |
RET=append(RET,RET0)$ |
Line 780 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
Line 781 def leastsq(NormMat,ExpMat,Vars,FLAG,ID){ |
|
RET=append(RET,[[ID,Vars,vtol(TMP1[1])]])$ |
RET=append(RET,[[ID,Vars,vtol(TMP1[1])]])$ |
} |
} |
|
|
return RET$ |
return [NormMat0,RET]$ |
} |
} |
|
|
def weight(PolyList,Vars,FLAG){ |
def weight(PolyList,Vars,FLAG){ |
Line 823 def weight(PolyList,Vars,FLAG){ |
|
Line 824 def weight(PolyList,Vars,FLAG){ |
|
if(TMP[1]!=[]) |
if(TMP[1]!=[]) |
RET=append(RET,TMP[1])$ |
RET=append(RET,TMP[1])$ |
|
|
TMP=unitweight2(TMP[0],ExpMat,Vars,FLAG,3)$ |
TMP=leastsq(0,ExpMat,Vars,FLAG,3)$ |
if(TMP[1]!=[]) |
if(TMP[1]!=[]) |
RET=append(RET,TMP[1])$ |
RET=append(RET,TMP[1])$ |
else{ |
|
TMP=leastsq(0,ExpMat,Vars,FLAG,7)$ |
|
RET=append(RET,TMP)$ |
|
} |
|
|
|
ExpMat=qsort(ExpMat,junban)$ |
ExpMat=qsort(ExpMat,junban)$ |
|
|
Line 840 def weight(PolyList,Vars,FLAG){ |
|
Line 837 def weight(PolyList,Vars,FLAG){ |
|
|
|
if(size(ExpMat)[0]!=length(ExpMat2)){ |
if(size(ExpMat)[0]!=length(ExpMat2)){ |
ExpMat=newvect(length(ExpMat2),ExpMat2)$ |
ExpMat=newvect(length(ExpMat2),ExpMat2)$ |
TMP=unitweight2(0,ExpMat,Vars,FLAG,5)$ |
TMP=leastsq(0,ExpMat,Vars,FLAG,5)$ |
if(TMP[1]!=[]) |
if(TMP[1]!=[]) |
RET=append(RET,TMP[1])$ |
RET=append(RET,TMP[1])$ |
else{ |
|
TMP=leastsq(0,ExpMat,Vars,FLAG,9)$ |
|
RET=append(RET,TMP)$ |
|
} |
|
} |
} |
else{ |
else{ |
TMP=map(ltov,TMP[1])$ |
TMP=map(ltov,TMP[1])$ |
Line 856 def weight(PolyList,Vars,FLAG){ |
|
Line 849 def weight(PolyList,Vars,FLAG){ |
|
TMP[I][0]=5$ |
TMP[I][0]=5$ |
else if(TMP[I][0]==4) |
else if(TMP[I][0]==4) |
TMP[I][0]=6$ |
TMP[I][0]=6$ |
else if(TMP[I][0]==7) |
|
TMP[I][0]=9$ |
|
else if(TMP[I][0]==8) |
|
TMP[I][0]=10$ |
|
} |
} |
|
|
TMP=map(vtol,TMP)$ |
TMP=map(vtol,TMP)$ |