@SjoerdCdeVries thanks, I see what you mean; that question was clearly borderline according to the criteria set out in the blog post. On the other hand, since that was written, more SE sites have been launched that have nominally marginal subjective questions as a major focus (I'm thinking scifi especially, and perhaps RPG and Judaism to the extent that they're based mainly on people's personal opinions and experience and not all questions necessarily have a meaningful "best" answer).
These other sites seem to be successful despite the profusion of supposedly marginal questions, but probably a significant part of why it works is that these communities accept such questions and take then seriously when answering. So, from my point of view, if the community doesn't object and useful answers can actually be given (even if in the form of general advice), perhaps we don't have to follow the "rules" too rigidly.
This article about the design of LLVM is eerily familiar. Anyone else think that the new (in v. 8) compilation processes grew out of some of those ideas, including SymbolicC?
Plus, the pattern matching in the optimizer is familiar to anyone who has used mma. I liked the project before I read the article; I like it better now.
@rcollyer Not sure I follow. Personally I wouldn't have thought to draw comparisons between LLVM and Mathematica's compiler. LLVM is much more advanced.
I suppose there are similarities, such as the bytecode generation for an abstract VM. I always took that to be a mechanism to make a faster interpreter, though (like many other interpreted languages that have an intermediate bytecode representation, such as Python).
@OleksandrR it just looked very familiar, and I think they're drawing on the same pool of ideas, if not looking over each other's shoulder, as it were.
@rcollyer I'm not sure but I think there may be certain other optimizations that were considered at one point. CompileOptimizations -> 2 in V7 is undocumented and seems to produce sometimes not working code. In V8, may as well just emit C and let the C compiler deal with it.
@VitaliyKaurov while you're here, NVidia says my GPU supports CUDA, yet Mathematica does not believe it. Do you know how I can convince it that it should work?
@VitaliyKaurov that's one of my favorites.
@OleksandrR likely. As I said, I'm likely seeing patterns where they don't exist. (However, I like my hunches. :P )
@VitaliyKaurov I'm currently working on speeding up the generation of those plots.
@rcollyer SymbolicC seems to me more like part of the front end of a compiler--it can be used to represent C code as a parse tree (and as we work more or less directly with the parse trees in Mathematica, lets us deal with C as if it were a normal expression.) Undoubtedly SymbolicC is used for compilation to C, but the process is in reverse--first expression optimization happens, then bytecode gets generated, and then the bytecode is translated into C.
@rcollyer GeForce GT 330M is rather old and not particularly powerful; could it be possible that Nvidia dropped support for it from the CUDA compiler, or simply didn't bother to support some necessary new feature on it? ATI's done that with cards they didn't want to have to deal with any more. (Like mine. Grr.)
@VitaliyKaurov mine is part of my doctoral research, and, at the time, there was the possibility that it could cause difficulty if I did that. That said, now that I'm near the end, I don't care so much anymore.
In fact, I was tempted to hop on the SE.blog bandwagon and discuss how I built the functionality to do that.
@VitaliyKaurov I sent Brett some bits of it prior to learning how to speed it up, a bit. InterpolatingFunction isn't the fastest thing on Mathematica. However, after that I figured out how to turn it on its head, and 10^5 random points takes around 7 secs. I'd like an order of magnitude faster, but it is sufficient for plotting.
@VitaliyKaurov Are you linked to Brett or Arnoud on LinkedIn?
@VitaliyKaurov I can imagine :) Also, I guess the questions had to be broad and of general interest — something that most people would find useful... You don't find a horse next to a chinese building with Beethoven inside every day :P
@RM hah! no, but I just tried the introduction of one of our publications. Fascinating! I had to dial down the parameter that excludes words that appear fewer than 10 times. Enlightening!
@Szabolcs Not really. Judging from the comments it seems that the OP wants a spectral decomposition of his matrix, but I don't see how the order is relevant in this. This bit confuses me as well: "I want the eigenvalues/eigenvectors to be given in such an order so that when I build U, the diagonalizing matrix, I get: U^dagger x A x U = D, D being diagonal, and more importantly, U*D*U^dagger gives me A back."
Surely if U is normal then U^*.A.U=D implies U.D.U^*=A no matter what order the eigenvalues/eigenvectors are in.
@Szabolcs regarding the eigenvalue problem: what OP requests does not IMO make much sense. Eigenvalues/ eigenvectors are used to characterize the invariant subspaces of a linear operator. Their order is not an invariant.
Here is a simple 2x2 example: the transformation {{0,1},{1,0}} has a determinant -1 and represents the flip of 2 eigenvalues, so to say. This is not an SO(2) transformation, so for 2x2 matrix, such transforms are ruled out (directly)
@Szabolcs but for higher dimensions, a combination of rotations can give such transforms, so they are valid members of the group. Considering real symmetric matrices again for simplicity, already 3D case shows this: a combination of 2 rotations around z and then y axes counterclockwise (Pi/2) will lead such a matrix: {{0,0,1},{0,1,0},{-1,0,0}}.{{0,-1,0},{1,0,0},{0,0,1}} yields O = {{0,0,1},{1,0,0},{0,1,0}}, which is SO(3) yet it flips the eigenvalues: O.Diag[{1,2,3}].O^T = Diag[{3,1,2}].
@Szabolcs So, the ordering of eigenvalues is not an invarant under the general SO(n) for n>2, and therefore, his question seems ill-defined. Perhaps, in certain conditions, for matrices "close enough" to a diagonal, it may make some sense.
@Heike The scary part is that it isn't uncommon. As a software tester, that's how we ran the vast majority of our reporting, and the development side wasn't much better: MS Project.
g = RandomGraph[{10, 20}]
SetProperty[g, {VertexShapeFunction -> (Circle[#, .1] &)}]
The output looks like this:
Note how the circles match up with the lines perfectly, as if they were disks covering them. This is true regardless of the circle diameter.
This seems impossible unless Mathematica is aware of the sizes of those circles. I just don't see how it works.
I would have expected something more ugly like what `SetProperty[g, {VertexShapeFunction -> (Circle[#, .1] &), EdgeShapeFunction -> (Line[#] &)}]` produces.
Hmm ... inspecting the Graphics version of the output confirms that the lines are indeed offset back by the correct amount.
But this information doesn't seem to be passed to the EdgeShapeFunction.
And now I tried to capture what's actually being passed to that function using Sow, and for the umpteenth time, I bump into the problem of not having access to evaluation during formatting time ...
Just like when trying to work around with an $IterationLimit problem when displaying graphics with too many GeometricTransformation in them, Block[{$IterationLimit = Infinity}, ...] won't work because the problem function is called during formatting, not main evaluation.
@JM What do you see? I don't see a difference for as long as the circles don't intersect.
Maple can separate and eliminate a function in a system of PDE equations, with casesplit in the PDEtools package. How to do that in Mathematica? Starting PDEs are:
$$ -A\frac{\partial ^2Q(x,y)}{\partial x^2}+B\frac{\partial ^3P(x,y)}{\partial x^3}+C Q(x,y)-C\frac{\partial P(x,y)}{\partial x}+D\...
@VitaliyKaurov As JM said, first we can take it slow. With a monthly schedule we'll have material for at least half a year. Are you interested in contributing? (Are you in a position to do that?)
@JM Yep. Saturday is the worst day to go shopping for groceries. Especially during holiday weekends like Easter and Pentecost when the supermarkets are also closed on the following Monday.
@rcollyer Most towns have "shopping Sundays" about once a month, but the christian lobby is trying to restrict the number of Sundays per year during which shops are allowed to open.
@rcollyer got an answer for u from TS. You should contact TS directly, they got pipeline and tricks and it'll be much faster than with me as the middle link
@VitaliyKaurov Ah. True. CUDALink seems to recognize the newly downloaded drivers from NVidia, so I'll walk through the setup, first, to ensure it works. If it doesn't, I'll ask questions, then.
@JM interesting question! I don't think that's possible directly, but here's what I would do: transform f[arg1_, arg2_, arg3_, arg4_, arg5_] into f[g[arg1_, arg2_, arg3_], arg4_, arg5_] with gOrderless.
@JM I guess you could do something like SetAttributes[orderless, Orderless]; f[a_,b_,c_,d_,e_]:=fo[orderless[a,b,c],d,e]; fo[orderless[a_,b_,c_],d_,e_]:=...
The special function I'm trying to implement takes p + q arguments, and is symmetric in the first p arguments, which is what got me thinking about this problem. I'd want f[5, 3, 1, 4, 2] == f[3, 1, 5, 4, 2] to be True, since both are turned into f[1, 3, 5, 4, 2].
and I'm leaving too. If anyone knows how to shut the "laucnhing krenels", or "downloading data from wolfream server", or all those temporary cells for a partcular calculation, ping me up
Likely because BeginPackage["Outer`"] prepends Outer` onto $ContextPath. Not surprising now that I look at it, but initially annoying for what I wanted to use it for.
@OleksandrR I remember I spend half an hour once trying to figure it out, but it didn't do what I expected it to (i.e. have the same localization mechanism that Module/With/Function, etc have, i.e. appending a single $ and no number after symbols, I'm not talking about the x$nnn Module-variables)
@rcollyer It doesn't prepend it... BeginPackage temporarily sets $ContextPath to be just your context and System`
Simply asking ?mySymbol will only look for that symbol in the current context. So the response is correct: there is no such symbol in the Outer`Inner` context
@RM Well, asking for the definition was just shorthand for asking is it accessible? The surprising part, for me, was the outer context was not accessible by the inner context via mySymbol, it required Outer`mySymbol. This is not intuitive, as it is not how c++ namespaces behave. The closest equivalent is using BeginPackage instead of Begin.