2
votes
How to efficiently Append a result of an operation on each element of a list to itself?
list = {{a, b, c}, {e, f, g}};
Splice came with V 12.1
...
2
votes
Which object-oriented paradigm approach to use in Mathematica?
I want to talk about why I specifically made my short realization and what format I chose.
Lately I have been developing small paclets that can be used for general purpose. For example a client for ...
1
vote
1
vote
How to efficiently Append a result of an operation on each element of a list to itself?
lst={{x1, y1, z1}, {x2, y2, z2},{x3,y3,z3}}
MapThread[Append,{#,#[[All,2]] #[[All,3]]}]&@lst
(*{{x1,y1,z1,y1 z1},{x2,y2,z2,y2 z2},{x3,y3,z3,y3 z3}} *)
...
1
vote
How to efficiently Append a result of an operation on each element of a list to itself?
This is basically the same as Rojo's idea, but it appears to be 10% faster on my system (M1 Max):
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
programming × 1577list-manipulation × 207
performance-tuning × 109
functions × 107
function-construction × 97
evaluation × 56
equation-solving × 55
plotting × 48
graphics × 48
dynamic × 48
matrix × 47
syntax × 44
mathematical-optimization × 40
functional-style × 38
notebooks × 37
front-end × 36
pattern-matching × 34
graphs-and-networks × 33
scoping × 33
differential-equations × 31
manipulate × 31
recursion × 31
core-language × 31
algorithm × 30
calculus-and-analysis × 28