# Tagged Questions

For questions regarding the underlying implementation of built-in functions.

1k views

### How is pattern specificity decided?

Mathematica has a notion of pattern specificity, which is a partial ordering on patterns. The rules (e.g. DownValues, SubValues,...
250 views

### Graph diameter algorithm

Does anyone know what the complexity of Mathematica's GraphDiameter algorithm is? I have a family of very large (and very regular and very sparse) graphs, and if Mathematica uses something like the ...
982 views

### How to retrieve the parameters calculated and used by ImageAdjust?

When ImageAdjust is called with an image, i.e. with one parameter, it returns an automatically adjusted Image. I would like to ...
82 views

ImageAdjust does an excellent job of auto-leveling an image. Although there doesn't appear to be an explicit way to get the contrast, brightness and gamma values ...
56 views

### Rationalize error

The docs state that "Rationalize[x,dx] yields the rational number with smallest denominator that lies within dx of x." However, testing this out it appears to be false. ...
201 views
+200

### What does the GraphLayout -> “SpectralEmbedding” option do (mean) when displaying a graph?

I have some relational data represented as a graph. As such some of the relational properties can be recognized. When I use the GraphLayout -> "SpectralEmbedding" option a very nice and sharply ...
258 views

### Why does't SeedRandom work here?

From the docs on SeedRandom, SeedRandom[] resets the generator, using as a seed the time of day and certain attributes of ...
40 views

### What is the Chebyshev method for InterpolationFunction?

With InterpolationOrder -> All, some methods of NDSolve returns interpolations with ...
86 views

### How is Integrate Implemented? [duplicate]

At the end of this 90 minute lecture by Stephen Wolfram on the history of the development of Mathematica, Wolfram takes questions from the audience. One of those questions asked how the ...
91 views

### Why patterns names aren't scoped by default?

In a recent question [1] OP asked how to make Module scope working inside Set, so how to get: ...
114 views

### The implementation of FunctionRange

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn't provide any references or even a name of ...
234 views

### Mathematica's morphological thinning algorithm

Could anyone cite some papers that describe Mathematica's morphological thinning algorithm?
92 views

### How does ListInterpolation work?

ListInterpolation takes an array of data and interpolates between the entries. Let us interpolate between the elements of the identity matrix. For reference, this ...
313 views

### What method does NIntegrate use by default?

There is a variety of algorithms for performing numerical integration (See wiki). What method does NIntegrate use by default? I looked at the documentation page ...
35 views

### Where can I find documentation on the methods/algorithm used in FindGraphPartition in Mathematica 10?

I am working on a graph theoretical project where it would be helpful to know the name of the algorithm used in FindGraphPartition. Question: Where can I find ...
124 views

### NIntegrate evaluates its 1st argument while it has the attribute HoldAll?

NIntegrate owns the attribute HoldAll: Attributes@NIntegrate (* {HoldAll, Protected} *) ...
125 views

### Why NIntegrate is badly-behaved on $J_{\frac{9}{2}}(x)$ by default?

A friend of mine showed me this example: Plot[BesselJ[9/2, x], {x, 0, 1}, PlotLabel -> Style["The integrand seems to be simple", 14]] ...
40 views

### What is the default method used by NSolve

I have a system of 6 polynomial equations of the form aijk xi xj + bik xi = ck (k=1,2,...,6; summation convention on i & j) I am using NSolve[{eq1,eq2,...,eq6},{x1,x2,...,x6},Reals] What ...
73 views

### Classifying text and number features

I am new to the ML algorithms and I am checking the Classify function of Mathematica. I understand the math for the random forest algorithm, but I have a question ...
76 views

### Are the triangles in DelaunayMesh oriented ccw?

MeshCells[R, 2] returns the triangles from R=DelaunayMesh[pts], where pts is a list of 2D ...
35 views

### What is the default SignificanceTest setting for FindClusters with Optimize method?

According to the documentation, the default value of FindCluster's Method option is Optimize....
52 views

### Can parallelization speed up FindClusters?

I have a clustering task that would take FindClusters 2-3 months1 to complete. Can this calculation be sped up with parallelization? (FWIW, the data to be ...
180 views

### Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
252 views

### GroebnerBasis without specifying variables

All the examples in the Mathematica documentation specify that the syntax for the GroebnerBasis command is ...
52 views

### min and max in Ticks determination

I wonder, how Mathematica determines the values that it sends to custom tick functions, ie. the minimum and the maximum on the axes? Here is an example: ...
94 views

### How does Mathematica compute the determinant of a matrix? [closed]

I have been trying to write efficient code for calculating the matrix determinant for some time now. I noticed last night that Mathematica is able to compute the determinant of a $200 \times 200$ ...
129 views

### Accuracy of PrimeQ function

Using PrimeQ in Mathematica 10 on integers up to $2\cdot 10^{5717}$ the function appears to work. The Documentation for Mathematica 5 says that ...
94 views

### FrobeniusSolve: how does it work?

Can someone suggest any reference to read? I would like to understand how the algorithm works.
30 views

### Where do DistributeDefinitions and ParallelNeeds put their definitions for newly-launched kernels to find

I'm sorry to keep banging on the definition distribution bell, but here is another (hopefully well-focused enough) question on that vein. If one is trying to distribute the definitions in a package ...
573 views

### Where can I get detailed information on how the Plot command works?

The command Plot[x^2, {x, -3, 3}, PlotStyle -> Arrowheads[{-.025, .025}]] /.Line -> Arrow produces this output. What I don't understand is what ...
78 views

### How can I access the Criterion function of KI method in FindThreshold for a dataset?

I want to find a threshold for some data set, using Kittler-Illingworth minimum error thresholding method (KI method). To do so, I use the Mathematica built-in function ...
840 views

### What is behind experimental function: FindFormula?

In version 10.2 there is a new experimental function: FindFormula[]. I suspect that a genetic programming algorithm (symbolic regression) is behind this new ...
118 views

### The theory/algorithm knowledge behind the built-in Discretize* and Boundary*

The ComputationalGeometry package was built-in in V10 distribution. In classical computational geometry field, the following questions were investigated. Convex ...
76 views

### Meaning of the character sequence after an Entity's name

Mathematica can interpret an entity when you type Ctrl+=, like this: Then we'll get an entity We can get the InputForm You will get a canonical name ...
157 views

### What is the simplest way to determine which call to a superfunction has generated a Message?

I have a complicated function which contains many calls to NIntegrate, NSolve, FindRoot and ...
305 views

### Show how Mathematica defines a function

Is there a way to show how Mathematica defines a function, such as In: Something[Sqrt], Out: Sqrt[x] -> x^(1/2) As far as I understand it the command ...
91 views

### What kind of preprocessing does Mathematica do when I use EdgeDetect on an image?

I am doing my own implementation of Canny and Sobel in another language (not in Mathematica). I was testing the EdgeDetect method (Sobel and Canny), and my own, and ...
85 views

### Heliocentric coordinates in PlanetData

I tried to use planets' HeliocentricLongitude and I wonder if anyone has any insight on what coordinate system they use. I took vernal equinox times from http://ns1763.ca/equinox/eqindex.html and ...
149 views

### The algorithm of ListGraphs[n,m]

I'm not sure if this is a Mathematica problem, math problem or a CS problem, so if this is off-topic please transfer it. In the package Combinatorica there is a ...
811 views

### How does ListPlot3D interpolate data?

I have data of the form {{x1, y1, f(x1, y1}, {x2, y2, f(x2, y2)}, ...}. I need to interpolate the data to get an interpolated ...
61 views

### Algorithm used by Fit[]

Does anyone know what algorithm Mathematica's basic Fit[] function uses? Is it proprietary? I'm trying to do some pretty basic, linear, polynomial data fitting (...
99 views

### Is the Method -> Automatic option for Classify not deterministic?

I just prepared an (well known) example in machine learning, the weather dependent determination of whether to play golf or not, as shown in this picture (of a corresponding Dataset) Now I set up ...
72 views

### What CPU instruction set extensions does Mathematica support?

Most CPUs in desktops and laptops nowadays are backwards compatible with the x86-64 instruction sets. But newer CPUs also have additional instruction set extensions like AVX 2, FMA3, and BMI/BMI2 ...
73 views

### What is the encoding used when exporting images as MOV with “VideoEncoding” -> “MPEG-4 Video”?

I have a few rasterised images generated in Mathematica, and I want to output them in a video file, ideally using H.264 encoding. I found the following command. ...
557 views

### Symbolic derivatives are being calculated numerically

Just found the following while debugging a problem. Mathematica is calculating the derivative of IntegerPart[x] in some odd way: ...
55 views

### How many clusters does DominantColors return?

Is there any documentation on how it automatically chooses the number of colors - does it use X-means or some other heuristic to determine the number of clusters it automatically returns?
202 views

### How does Mathematica calculate $\sin(\pi/5)$?

Consider: Sin[Pi/5] which returns: $$\sqrt{\frac58-\frac{\sqrt5}{8}}$$ Does anyone know how to figure out the trigonometric identities used by Mathematica to ...
94 views

### What is the default ColorFunction for MatrixPlot?

I think the the default ColorFunction for ArrayPlot is ColorNegate[RGBColor[{#, #, #}]] &...