Re: efficiently testing a list

• To: mathgroup at smc.vnet.net
• Subject: [mg122540] Re: [mg122514] efficiently testing a list
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Mon, 31 Oct 2011 06:52:23 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201110300925.EAA15453@smc.vnet.net>

```data = Table[{a[i], b[i]}, {i, 1, 3}];

And @@ (f[#[[1]]] < #[[2]] & /@ data)

f[a[1]] < b[1] && f[a[2]] < b[2] && f[a[3]] < b[3]

Bob Hanlon

On Sun, Oct 30, 2011 at 5:25 AM, zb <zaeem.burq at gmail.com> wrote:
> Consider the list of pairs:
>
> List = Table[ {a[i],b[i]} , {i,1,N} ].
>
> or
>
> List = { {a[1],b[1]} , {a[2],b[2]} , {a[3],b[3]} , ... ,
> {a[N],b[N]} },
>
> and a given function f[a].
>
> What is the quickest way of testing if all elements of List satisfy
> f[a[i]] < b[i].
>

```

• Prev by Date: plotting cdf of a piece-wise continuous distribution
• Next by Date: Putting Points and Lines into RegionPlot3D
• Previous by thread: efficiently testing a list
• Next by thread: Re: efficiently testing a list