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

learn more… | top users | synonyms

4
votes
2answers
258 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 ...
6
votes
1answer
84 views

Inverting an ImageAdjust

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 ...
2
votes
0answers
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. ...
3
votes
0answers
42 views

What is the Chebyshev method for `InterpolationFunction`?

With InterpolationOrder -> All, some methods of NDSolve returns interpolations with ...
10
votes
0answers
211 views

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 ...
0
votes
1answer
87 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 ...
4
votes
0answers
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: ...
5
votes
1answer
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 ...
4
votes
1answer
239 views

Mathematica's morphological thinning algorithm

Could anyone cite some papers that describe Mathematica's morphological thinning algorithm?
1
vote
0answers
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 ...
1
vote
2answers
124 views

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

NIntegrate owns the attribute HoldAll: Attributes@NIntegrate (* {HoldAll, Protected} *) ...
11
votes
2answers
126 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]] ...
0
votes
0answers
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 ...
4
votes
1answer
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 ...
2
votes
1answer
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....
0
votes
0answers
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 ...
5
votes
1answer
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 ...
0
votes
0answers
53 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: ...
2
votes
0answers
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$ ...
3
votes
0answers
94 views

FrobeniusSolve: how does it work?

Can someone suggest any reference to read? I would like to understand how the algorithm works.
3
votes
0answers
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 ...
8
votes
1answer
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 ...
7
votes
2answers
180 views

Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
1
vote
0answers
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 ...
9
votes
2answers
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 ...
8
votes
1answer
306 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 ...
3
votes
1answer
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 ...
2
votes
0answers
63 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 (...
7
votes
1answer
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 ...
3
votes
0answers
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 ...
2
votes
1answer
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. ...
5
votes
1answer
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 ...
5
votes
0answers
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?
13
votes
1answer
232 views

What governs images resizing in the FrontEnd environment

What is responsible for the middle Row images' size? And why single image row is different? ...
17
votes
1answer
2k views

How was Mathematica built?

I've been wondering this for a while now: How was Mathematica built? Is it written in Haskell? C++? I'd love to get a taste of the wizardry behind this incredible software.
2
votes
1answer
77 views

Is there a method to look inside at the internal code of Built-In functions? [duplicate]

How can I look at the code of built-in functions? Is there something like this: LookInsideFunction[SubsetQ] RETURNS ...
17
votes
2answers
335 views

What algorithm do the Compress and Uncompress functions use?

Compress and Uncompress are used internally by Mathematica to compress things like 3D data in notebook files - data that I'd like to read independently. Does anyone have any idea if the compression ...
10
votes
1answer
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 ...
4
votes
1answer
94 views

What is the default ColorFunction for MatrixPlot?

I think the the default ColorFunction for ArrayPlot is ColorNegate[RGBColor[{#, #, #}]] &...
5
votes
0answers
72 views

How does Plus work on machine precision Real arguments?

I thought Kahan's summation method would make a nice example for students to use to think about round-off error [W. Kahan, Pracniques: Further Remarks on Reducing Truncation Errors, Commun. ACM 8  (...
6
votes
0answers
75 views

What is the underlying algorithm to simplify sums of reciprocals of polynomials?

Flipping through Wolfram's blog entry on Leibniz, W noted Huygens' interview test for the young Leibniz, namely to determine: $$ \sum_{n\ge2} \frac{1}{{n \choose 2}} $$ It's one thing to do this by ...
2
votes
0answers
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 ...
1
vote
1answer
118 views

How to show steps of Integrate[Exp[-(I*(s*t))]/(Sqrt[2*Pi]*Sqrt[s]), {s, 0, Infinity}]? [duplicate]

I am trying to use Wolfram Alpha in Mathematica 10.2 to show me the steps for calculating the integral in the title, i.e I have written the following command: show steps of ...
5
votes
2answers
172 views

Why this upvalue doesn't escape from Sum?

Probably a hard question, but I decide to cry out loud :). This is actually another problem I encountered when answering this question. Consider the following transform rule stored as an upvalue: <...
8
votes
1answer
155 views

What values of $\delta$ and $\eta$ are being used in LatticeReduce?

The Lenstra–Lenstra–Lovász algorithm has a parameter $\delta$ with $1/4 < \delta < 1$, where roughly speaking the closer $\delta$ is to 1 the longer it takes, but the better basis reduction you ...
1
vote
0answers
97 views

What's the algorithm behind markov classifier in Classify function for text classification?

https://www.wolfram.com/mathematica/new-in-10/highly-automated-machine-learning/find-which-author-wrote-a-text.html The above url show the use of Classify ...
9
votes
2answers
177 views

Does LinearSolve know that I gave it a Sparse lower triangular matrix?

Let $\mathbf L$ be a nonsingular numeric (non-symbolic) large, lower triangular sparse matrix. Let $\mathbf b$ be an appropriately sized vector. I want to solve $\mathbf L\mathbf x=\mathbf b$. ...
2
votes
0answers
56 views

SetSystemOptions is obsolete? What is next? [closed]

When running the following code on Mathematica 10.2 SetSystemOptions[ "CompileOptions" -> "CompileReportExternal" -> True]; I received the message: ...
1
vote
1answer
122 views

What methods does Maximize use like $\mathtt{Maximize}\left[\left\{3 x^2+2 \sqrt{2} x y,x^4+y^4=1\right\},\{x,y\}\right]$

I used Maximize for the maximum value of $3 x^2+2 \sqrt{2} x y$ when $x^4+y^4=1$ , $x>0,y>0$. What methods does Maximize ...
6
votes
0answers
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 ...