Wolfram Mathematica

Welcome! This is the main Mathematica chat room for mathematic...
Aug 17, 2017 21:59
@Alucard I might still make the replacement rule more specific, Subscript[val_, k] :> Subscript[ val, p]
Aug 17, 2017 21:46
@Alucard - what am I missing? Subscript[1, k] /. k -> p
Aug 9, 2017 17:12
@uwnojpjm hog.grinvin.org/data/cubics/cub20.g6 has the 510,489 graphs that you mentioned in this comment
Aug 9, 2017 17:04
@uwnojpjm importing the graphs would be the first step. You can grab all 500k graphs using the code posted above. All the links in the table here can be imported the same way: hog.grinvin.org/Cubic
Aug 9, 2017 16:56
file = URLDownload["https://hog.grinvin.org/data/cubics/cub20.g6"];

stream = OpenRead[file]

n = 0;
graphs10K = Table[
n++;
ImportString[
ReadLine@stream,
"Graph6"
]
, {10000}
];~Monitor~n
Aug 9, 2017 16:56
For the one with a half million graphs, I would not try to just Import the file, I would grab them one line at a time. Here is code that will generate 10,000 cubic graphs with 20 vertices,
Aug 9, 2017 16:55
and then just import them.
Aug 9, 2017 16:54
If you just want to have them, then you can download their string identifiers here: hog.grinvin.org/Cubic
Aug 9, 2017 16:52
@uwnojpjm Are you trying to generate all the half million graphs yourself, or do you just want to import them into mathematica?
Aug 4, 2017 17:35
If[MemberQ[test, #], 1, 0] & /@ Range[8]
Aug 4, 2017 17:35
but really, your method is faster. I might rewrite it as this, but that's just coding style
Aug 4, 2017 17:30
test = {1, 3, 5};
Replace[Range[8], {x : Alternatives @@ test :> 1, _ -> 0}, 1]
Aug 4, 2017 17:30
@Semiclassical - another option,
Jul 12, 2017 13:24
nevermind, thought I had a workaround
Jul 12, 2017 13:21
@htf - why rasterize, if you don't mind my asking?
Jul 11, 2017 14:23
@Edmund - would something like myfunc[args__] := Block[ {$MinPrecision = 2 $MachinePrecision}, func ] work?
Jul 6, 2017 20:54
In the second one, I believe I'm telling it that I want the number 1 with +0 digits of precision
Jul 6, 2017 20:54
I get something completely different from "1.` (1.` + 0)" than I do from "1.` (1.`+0)"
Jul 6, 2017 20:53
@Edmund - are you getting thrown by the non-space between the + and the 0?
Jun 22, 2017 22:16
this may be a better venue
Jun 22, 2017 22:15
@Szabolcs - Are you around? I have a few questions about LTemplate
Jun 20, 2017 19:07
Maybe @user21 knows why all the XXXElement wrappers behave this way
Jun 20, 2017 18:55
For the purposes of Position, it treats the arguments of TriangleElements as being atomic. Not so for Cases though
Jun 20, 2017 18:53
In[35]:= TriangleElement[{{3, 4, 7}, {4, 8, 7}, {7, 9, 12}, {7, 8,
9}}, {5, 5, 7, 7}] // Position[#, _] &
placeHolder[{{3, 4, 7}, {4, 8, 7}, {7, 9, 12}, {7, 8, 9}}, {5, 5, 7,
7}] // Position[#, _] &

Out[35]= {{0}, {1}, {2}, {}}

Out[36]= {{0}, {1, 0}, {1, 1, 0}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1,
1}, {1, 2, 0}, {1, 2, 1}, {1, 2, 2}, {1, 2, 3}, {1, 2}, {1, 3,
0}, {1, 3, 1}, {1, 3, 2}, {1, 3, 3}, {1, 3}, {1, 4, 0}, {1, 4,
1}, {1, 4, 2}, {1, 4, 3}, {1, 4}, {1}, {2, 0}, {2, 1}, {2, 2}, {2,
3}, {2, 4}, {2}, {}}
Jun 20, 2017 18:53
@C.E. - that is indeed odd:
Jun 17, 2017 03:38
You can still use the option PlotTheme -> None in your ListLinePlot and it overrides, but to make it permanent you have to hack it.
Jun 17, 2017 03:34
It does mean that you can't use SetOptions[ListLinePlot, Plotmarkers -> None], because the `PlotTheme will override it.
Jun 17, 2017 03:33
So using a plot theme has the effect of overriding default values for any number of options, and I don't think they are documented explicitly what those options are.
Jun 17, 2017 03:31
@Alan - I still very much think it was by design. Plot themes are just some sugar on top, not overly documented I think. For any plot theme, a set of options were decided on that someone like the look of.
May 11, 2017 21:07
May 11, 2017 21:06
``` f[] := (notGlobalContextc++; (-1)^notGlobalContextc) ```
May 11, 2017 21:06
the little back ticks didn't come through
May 11, 2017 21:06
f[] := (notGlobalContextc++; (-1)^notGlobalContextc)
May 11, 2017 21:06
Don't forget you can just make up a garbage context to put variables in, like
May 9, 2017 14:01
Glad to help
May 9, 2017 13:59
ListLinePlot[Table[{i, RandomInteger[{1, 50}]}, {i, 10, 30}],
Prolog -> highlight]
May 9, 2017 13:59
or feed Prolog to the plotting function
May 9, 2017 13:58
highlight = {Yellow, Rectangle[{14, 0}, {15, 55}]};
Show[Testdata, Prolog -> highlight]
May 9, 2017 13:58
but since you want the graphics in highlight to be underneath, you can use Prolog
 

 IntelliJIDEA Plugin for Mathematica

Discussion related to the development of the IntelliJIDEA plug...
Jul 14, 2017 20:31
You mentioned in a post recently that you use CLion - do you pay for it or are you using it for opensource so it's free?
Jul 14, 2017 20:30
I haven't so much - I"m interested in trying, but I have everything set up in Eclipse to work so there's a learning curve I'd have to overcome to use it
Jul 7, 2017 22:35
Have a nice weekend!
Jul 7, 2017 22:35
Great, will take a look
Jul 7, 2017 22:32
Yeah - that proposal to make workbench open source went down like a lead balloon
Jul 7, 2017 22:30
Well - seems to work - thanks! Not sure now whether to switch only for certain projects or move the whole workspace from eclipse. My workspace in eclipse is so bloated, its RAM usage is very high
Jul 7, 2017 22:26
version 2.4.2
Jul 7, 2017 22:25
I assume the most recent version, downloaded the community version of idea today, and got your plugin through the settings/search method
Jul 7, 2017 22:14
is there a way to do that in IntelliJIDEA?
Jul 7, 2017 22:13
@halirutan - tried your plugin for the first time today - I like it, but miss one thing from eclipse. If I'm making a Module, Block, etc, and I type a new variable I can quickly localize it to the enclosing Module by selecting the work and hitting Cmd-1 and selecting the right macro
 

 LibraryLink & MathLink

chat about LibraryLink, MathLink and extending Mathematica wit...
Jun 9, 2017 17:41
@Szabolcs - are you around?