hermann on Fri, 09 Feb 2024 17:26:41 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Best way to determine horizontal plane ℤ³ that contains most vectors of given vector of vectrs |
The good thing with PARI/GP is, that I most times get what I want somehow, like here:
L=[v[3]|v<-S]; C=[[l,#[v|v<-S,v[3]==l]]|l<-[vecmin(L)..vecmax(L)]]; mx=vecsort(C,2)[#C][1]; P=[(Q*v)~|v<-S,v[3]==mx];But sorting and iteration over all possible vecmin..vecmax values looks not nice. Is there a more intuitive way to set P to all vectors in plane with maximal vectors?
Regards, Hermann.