Kevin Ryde on Sun, 25 Feb 2018 08:04:58 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
empty permutation true/false
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: empty permutation true/false
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Date: Sun, 25 Feb 2018 18:02:44 +1100
- Delivery-date: Sun, 25 Feb 2018 08:04:58 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1519542290; bh=zzaJCRqcBuyslGCbvZPIrxSCB4wQx4OHGNrCwzpMIR0=; h=From:To:Subject:Date:From:Subject; b=Wo2dvwKw8b+Bfvu4S+Q1t8o6glAVzAYddcmz89TRLbS6mFYm8c6r0UXejkGdSeclG2ZKLn8g+KAvDdByK8Bf3Xcq/FDzxW/njmj08zldise3szVtUX/al5bFl6s/tHM96AkuixcHICXbi+8jQDBDrzsbtcrjuDuHllPbzcQjeHlQPSu+I8KdpqgSugl5tZdfP+D2CJRV4Byyx8plQIaf+2BbBCvcQ6qEjsyXQNR2ja5tAjs2vgMLVdwV7MgGTxmgZsBIuiYmtFCyCxIxXeNs2nw0IsxGM2hH207fUHbOj7S2i5zWOFDefWKAjG0Wtn3z2ikDKzlzaEojMzx2niJ16Q==
- Organization: Bah Humbug
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
I see an empty Vecsmall is true,
if(Vecsmall([]), print("yes"), print("no"));
=> yes
Is that intended, rely on etc? I only wondered since an empty full Vec
is false, per the user manual (just),
if([], print("yes"), print("no"));
=> no
I have a func where I thought to return a (possibly empty) Vecsmall
permutation if found, or 0 if not found. That allows if(perm,...) to do
something when found/not found -- as long as empty permutation is true.
Or is some other type of "no such permutation" return usual?