Bill Allombert on Fri, 03 Nov 2023 09:53:43 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: asking for a new GP-Pari command
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: asking for a new GP-Pari command
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Fri, 3 Nov 2023 09:53:26 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1699001610; c=relaxed/relaxed; bh=k4pXeYpROluFvMxozioz0fFUqEvGr82CQR4Y5mosTuc=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=0GZ1Dc2UoHnRX8WdVsIicrOOVkLERR7HvuTUJ+1FPRT8pPwasMcJvOpjBRcBZ2VzI8aiIyuljmp0ndKmDdJrlPLW6L27Jx5uij8mvdBzUlmqij+EA2xXmexADLIfjyS9RhY9g3UPtNNcJBObp5c//KohkLknTzaGDSccgRaoxBWmR4EhB/mfDst5YxxsL8vALZXGq/gK34gbVWzE5gpmM/tGiSj82wxcLlpdMUMeUlryF3EVLV8mtRAh15eKHqOq7j9rSKnB9JfhdBFo0geudk6OeCYo4BohH0prhPrDUoG5+I4KIg7wNWBtjcwN98UZuEumTHcTAtQvexu534VSPe7fE1dZDOl5JnXc8jc7+SM7cOqQ586sd37c82CZCA/H/wCBHNGBd4aObVpUo+sYmDzAvGs89lwpTa89Hbi7+3/kmcRFGxEE7fcYI6L8+lYYFc0Fr55Y/JZJ9t1GffL+7gOiIOBuaifHOpCMBmNXAHdIymGZKWXyfpxUOeStAlkU59rvIxnbySBg2BqqJY0nkk4snCe/y1K9SieW/L7bnhvqdKVyJA3m9Po5zLp+oKIQz/81b0izgQpwV9vMWHrTgCDXvmg725ZWQF6F/VhvNTlM+625fvHadylu4C/mn2u9RHIJ2nmNAOy+BtgXO1xumdRRmUz8DGJJthBk3h0eHwM=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1699001610; cv=none; b=knZ3W5KBuXUVyPD2nqqsoZO/0nHDEL89GPElYHGFbEW7vIjuhK0iPPpwYnmTPElLHi1Xduaruu5dntHejH3Qdhh1pi/wHap6NPtBZvNzIOGX/KyinSoqRFnbaBSAsDycTTAM+Jzjxz7td6u8J9wW4etJr/k+f46UZboHBQu2jWFkihbV/g9ohbPJsYJFC0gMJxyF6F9cC00SZug40pLTF/ZxmTooD24smrqGy6VlIhdsVugjV8Ccr3fSbObm8B0wAwCLopf2BF6hV/+WgmVZVx4W+SeNv5xGn3Q4aTAeKoajSRXOFlCuXVA2iKpfqcSOIsNgAO0VzQeLFSfXR9sR+d8xuLXNQXeIGq6jfB2vdTpvN5rHJUNxJHbpu7kaWy96VZ7QEYKp5vzY7QOcD8SBY5wnkAQPlkTFqfruLGDkna/UWJyuCh6B12Jg2QTQROUl7N2grejc9BIeNd7tC0dByY1ORiY+P+haZTcNPDjv8tSfHnGj4+Os2KMytM5Nk7qjJ37gpZbjcg+HixSYjT9/9CAI5bEEvxeEri8AkPVUEt0P7Iba50clpzlm98eHYKgd8eMejhbaBzEn/yCtc90XtasCl7uqJ+w+25AH/rCmqg8qF6v6XL/Nq6q6jV01Vy1cHtS1C1Sh791v0ZsMbjLPhr0VVIbCLA1vaCpRj2MhdNM=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Fri, 03 Nov 2023 09:53:43 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1699001610; bh=k4pXeYpROluFvMxozioz0fFUqEvGr82CQR4Y5mosTuc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=pOCY9z44bpcmhtU86B8mg23nduMicSlWgOKt0AdxFonfhHOHFnfA8FrJXOoyc+ISc Ry8/6/yPCTKsgeoHPFyvOmoeIVF+uAfc9mQXU3zGvKNQQmD09R8YPAURkf8Gs7B3zv Xvpe6ctFsCFhHnJXsEfyWtBRNi02QDdTbjPHLdxzrrFiNzaU1JeEKG1lhvI1QK5NZO Rlg90zMyf5EiTL/goMyOxkRwHrV4BAofgQ78884Nq9L8BGGZrRUA642U7GdXW4QJR7 LpE4urZV9t67M1pksegBsd6zSLYDhMNN3k3Ea/wCf37tb8HLq3ehiOSigqd7K4G9Jb Fp3nLvg5/3Rh9kN/Y63GZl7D6PEySXOtN2vswqWl9/x0afmaJQLLGh00OsDpjyklRj 520G1SHCE1PTjYIcXf1d5ZRd9PT8aSA9kgpOOAEGSC3YuSPIQaV+83hzAcjuDjqktB pRLn5aLUaECwErA9998k0SG1evQwyiKmtZdAxwx8jjm49nRgpezaFIH+5aG3CIvVw/ Wz/KG45yo8ERTC61O8SaVuLdOWQrA5fx5jXZmn20ryINLIqkmW4HncuWUyasQey85b b7ju+jY5C9VdYkbJJ5qB98n2VrnYQSCUgauW6dT2Fpt/N3EgolKwyku4bAotnDg85V 9nUhK0hpy59FGVQaP8EzKNNA=
- In-reply-to: <cfe89aa6-61a2-4a45-ae61-10db967e21f0@gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <cfe89aa6-61a2-4a45-ae61-10db967e21f0@gmail.com>
On Thu, Nov 02, 2023 at 04:28:04PM -0700, American Citizen wrote:
> To all:
>
> Recently I had to remove duplicate entries from a vector.
>
> Can GP-Pari create a command which will work with both lists and vectors to
> output duplicate entries?
>
> I am aware that vecsort has flag=8 in vecsort(V,,8) and listsort has flag =
> 1 in listsort(L,1) to remove duplicates, but I need to find them, not erase
> them.
>
> Suppose v = [1,2,3,4,5,3,6]
>
> Then I would like a GP-Pari command called "duplicates(v)" to produce the
> following output.
>
> duplicates(v) = [3]
You can do that:
duplicates(v) = [x[1]|x<-matreduce(v)~,x[2]>1];
? v = [1,2,3,4,5,3,6]
? duplicates(v)
%6 = [3]
Cheers,
Bill