4,265 reputation
1354
bio website
location
age
visits member for 2 years, 9 months
seen Nov 19 at 19:32

Jan
21
comment How to extract metadata from an image of a business card?
Ah right, but I want to solve the general problem :)
Nov
29
comment How can I link the c library GAUL into Mathematica?
I'm reading the documentation on LibraryLink now, but it's is a bit cryptic...
Nov
26
comment How can I convert a formatted text cell to latex code?
Thanks @silvia for your solution, but I feel that the other one is simpler...
Nov
26
comment How can I convert a formatted text cell to latex code?
Ok, no problem, thanks for the answer.
Nov
26
comment How can I convert a formatted text cell to latex code?
I know about them, but the examples I have seen only use FETokens and never execute arbitrary code.
Nov
26
comment How can I convert a formatted text cell to latex code?
Do you know how to add arbitrary commands into a item in KeyEventTranslations.tr?
Nov
26
comment How can I convert a formatted text cell to latex code?
It is! Thank you. I'd like this to be a key command such as Item[KeyEvent["y", Modifiers -> {Control}], FrontEndExecute[FrontEnd`CellPrint[ nb = NotebookCreate[Visible -> False]; NotebookWrite[nb, Cell[StringTrim@ StringReplace[ ExportString[NotebookRead[SelectedNotebook[]], "LaTeX"], __ ~~ "begin{document}" ~~ text__ ~~ "\\end{document}" ~~ ___ :> text], "Text"]]; SelectionMove[nb, All, Notebook]; FrontEndTokenExecute[nb, "Copy"]; NotebookClose[nb]; NotebookCreate[Visible -> False]; Cell["Copied!"]]] ] but I can't get it to work!
Nov
20
comment How can I convert a formatted text cell to latex code?
The first thing I tried was copying the text cell as LaTeX, but it didn't work. Gave this message: TeXForm::unspt: TeXForm of Map[SystemFEDumpTransformBoxesToTraditionalFormBoxes[SystemFEDumpprocessBoxe‌​sForCopyAsTeX[{TextForm},TextData[#1]]]&,<<14>>, if there is a TM that accepts it.] is not supported. >>
Nov
20
comment How can I convert a formatted text cell to latex code?
I pasted it back in. It returns $Aborted.
Nov
8
comment How can I access a variable in one evaluator from another evaluator?
@MikeHoneychurch It's a great answer. I should have asked "How can I (dynamically and/or most quickly) access a variable in one evaluator from another evaluator?"
Nov
6
comment How can I access a variable in one evaluator from another evaluator?
@MikeHoneychurch By lag I mean, that if you change the value dynamically in one notebook, the other lags behind: Slider[Dynamic[ CurrentValue[$FrontEndSession, {TaggingRules, "Alpha"}]], {0, 100}]
Nov
6
comment How can I access a variable in one evaluator from another evaluator?
There is significant lag in this example :(
Nov
5
comment How can I access a variable in one evaluator from another evaluator?
@MikeHoneychurch interesting approach, an you give all the code for your example as a solution?
Oct
25
comment How can I speed up the classic GA for graph coloring?
Hmm, it still doesn't terminate...
Oct
24
comment How can I speed up the classic GA for graph coloring?
But perhaps you can think of a way to relax these conditions or randomize things to make it faster with some probability of stopping?
Oct
24
comment How can I speed up the classic GA for graph coloring?
@Mr.Wizard Combining the annealing with some sort of branch and bound partial backtrack could do the trick... The real problem is getting a 28 coloring in a reasonable time, whatever the method, this is the desired result. I'm thinking I might have to write this in c...
Oct
24
comment How can I speed up the classic GA for graph coloring?
Yes, this is faster but gets stuck at 40 colors. The annealing gets down to 31...
Oct
24
comment How can I speed up the classic GA for graph coloring?
Nice idea, but I feel this approach is doomed as this problem is NP-complete. Isn't the point of approximation algorithms to use clever heuristics and shortcuts to get fast OK solutions? The speed is the issue and any sort of backtracking or exactly solving won't ever work on super large graphs.
Oct
24
comment How can I speed up the classic GA for graph coloring?
@OleksandrR. is correct about requiring domain-specific knowledge to make the recombination framework produce children that actually retain the important genes. In this application, the important genetic information is the partition of the graph into independent sets given by the proper coloring, i.e. the "color classes". So the trick is to splice the two color vectors in a way that preserves the properness of the coloring but also modulates the color classes... And if annealing is used, colors cannot be reduced too quickly, the temperature must be dropped slowly for optimal configurations.
Oct
24
comment How can I speed up the classic GA for graph coloring?
Version 8 has no GraphColor[] functionality... are you able to import the sample inputs from the website? info.univ-angers.fr/pub/porumbel/graphs I believe that you would need v8 Import to get the .col files... I can post them as compressed matrices if you need.