Linked Questions

602 votes
19 answers

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
122 votes
7 answers

Minimal effort method for integrating C++ functions into Mathematica

Update: While at the time of writing the question loading DLLs with .NET/Link seemed easier, now I always use LibraryLink, which I recommend to anyone with a similar problem! As of Mathematica 8, ...
Szabolcs's user avatar
  • 235k
45 votes
5 answers

Fastest way to calculate matrix of pairwise distances

It is a very common problem that given a distance function $d(p_1,p_2)$ and a set of points pts, we need to construct a matrix ...
Szabolcs's user avatar
  • 235k
26 votes
6 answers

Returning multiple results from a LibraryLink function

What is the best way to return multiple inhomogeneous results from a LibraryLink function? Imagine that the result of a single computation is several tensors of different dimensions and several ...
Szabolcs's user avatar
  • 235k
27 votes
2 answers

How can we produce a graph layout with hierarchical edge bundling in Mathematica?

I'm looking to reproduce the types of graph layout that are possible in D3 ( in Mathematica. Since Mathematica doesn't explicitly support force directed edge ...
Daniel's user avatar
  • 271
13 votes
5 answers

How do I find the Euclidean distance between one point and all the points in a list?

I want to find the Euclidean distance between one point (x1) and a list of points (y1), which contains a lot of coordinates x1 = killer[[2]] {6.05102, 5.87667} ...
psy's user avatar
  • 133
21 votes
2 answers

C compilation not working with Visual Studio 2013

I'm running Mathematica 9 on a 64 bit Windows 8.1 laptop. I'm having no luck getting C compilation to work. ...
user11990's user avatar
  • 311
37 votes
1 answer

Drawing Clifford Attractors in Mathematica

I came upon the "Clifford Attractor" today, which are equations of the form: $$x_{n+1}=\sin(a\ y_n) + c \cos(x_n)$$ $$y_{n+1}=\sin(b\ x_n) + d \cos(y_n)$$ They create some incredible images by ...
Nico A's user avatar
  • 3,634
14 votes
4 answers

Implementing a compilable Faddeeva function of complex argument

For those, who are looking at Halirutan's answer and thinking "gee, I wish I was that good at LibraryLink, then I could really speed up my code!" I leave here the ...
LLlAMnYP's user avatar
  • 11.5k
35 votes
1 answer

How can I work with RawArray?

RawArray seems to be able to efficiently hold integer and floating point data of various sizes. What is RawArray good for? How ...
Szabolcs's user avatar
  • 235k
12 votes
3 answers

How to debug the C code for LibraryLink?

Recently, I use the C to rewrite a Mathematica function NonzeroBasis[], please see here for fully descriptions. Here, ...
xyz's user avatar
  • 625
15 votes
2 answers

MinGW-64 and CompilationTarget -> "C": can't make library

I'm trying to set up my new Windows 8.1 tablet to compile Mathematica (9.0.1) functions to C, using the MinGW-64 compiler. I have it set up so that the following works: ...
Leon Avery's user avatar
  • 1,342
8 votes
2 answers

How to speed up interpreting numbers from strings?

In processing a large text file I have batches from ReadList of 100,000 Records of the form. ...
Edmund's user avatar
  • 42.3k
18 votes
1 answer

How to learn the LibraryLink technique for the newcomer?

Description For the built-in programming language(or called Wolfram Language) of Wolfram Mathematica, I think it is much easier and simpler to learn than other computer language(such as C/C++ or java)...
xyz's user avatar
  • 625
16 votes
2 answers

Finding Kuratowski subdivisions of nonplanar graphs

The graph ...
Simon's user avatar
  • 1,435

15 30 50 per page