Mapping tag-value lists to a third
- To: mathgroup at smc.vnet.net
- Subject: [mg132442] Mapping tag-value lists to a third
- From: carlos.felippa%colorado.edu at gtempaccount.com
- Date: Mon, 17 Mar 2014 02:27:31 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
Hi, I have 2 lists of equal length such as tag={0, 1, 0, 0, 0, 1, 0, 1}; val={f1,f2,f3,f4,f5,f6,f7,f8} and want to produce a third: tagval={f2,f6,f8} with length Count[tag,1] containing the entries of val marked by 1-tags. Should be something efficient, since the source lists may be large (10^6 to 10^7). Thanks.
- Follow-Ups:
- Re: Mapping tag-value lists to a third
- From: Carl K Woll <carlw@wolfram.com>
- Re: Mapping tag-value lists to a third
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: Mapping tag-value lists to a third
- From: Sseziwa Mukasa <mukasa@gmail.com>
- Re: Mapping tag-value lists to a third
- From: Francisco Gutierrez <fgutiers2002@yahoo.com>
- Re: Mapping tag-value lists to a third