Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12035
| From | Ray Koopman <koopman@sfu.ca> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: fast summing alternative? |
| Date | 2012-10-11 06:13 +0000 |
| Message-ID | <k55o32$e7l$1@smc.vnet.net> (permalink) |
| References | <k4tth1$sgq$1@smc.vnet.net> <k50a7p$3sh$1@smc.vnet.net> <k531af$93q$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On Oct 9, 10:34 pm, Ray Koopman <koop...@sfu.ca> wrote:
> On Oct 8, 9:48 pm, Ray Koopman <koop...@sfu.ca> wrote:> On Oct 7, 11:59
>>
>> tab2 = Transpose @ With[{negnewMat = - newMat}, MapThread[
>> Dot, {weights, UnitStep[# + negnewMat]} ]& /@ sortMat ]
>
> This should be faster:
>
> tab3 = Transpose[ MapThread[Dot,{weights,#}]& /@ Partition[
> UnitStep[Plus@@Transpose@Tuples@{sortMat,-newMat}], bNum] ]
This may be marginally faster yet:
tab4 = Transpose@Developer`PartitionMap[ MapThread[Dot,{weights,#}]&,
UnitStep[Plus@@Transpose@Tuples@{sortMat,-newMat}], bNum]
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
fast summing alternative? Chris <kristoph.steikert@gmail.com> - 2012-10-08 06:57 +0000
Re: fast summing alternative? Roland Franzius <roland.franzius@uos.de> - 2012-10-09 04:46 +0000
Re: fast summing alternative? Ray Koopman <koopman@sfu.ca> - 2012-10-09 04:46 +0000
Re: fast summing alternative? Ray Koopman <koopman@sfu.ca> - 2012-10-10 05:33 +0000
Re: fast summing alternative? Ray Koopman <koopman@sfu.ca> - 2012-10-11 06:13 +0000
csiph-web