Skip to main content
Tweeted twitter.com/#!/StackMma/status/395894553368342528
deleted 35 characters in body; edited title
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

Intermediate logs with large Monitoring progress of long calculations

I've came upon a few methods of how to display "processing" information while MathematicaMathematica is running. But, from what I've understood, this only works in between lines of codes. Is it possible to display a "how far is something being processed"-information during a line of code?

For example, I wish to Map a function g over a very large list, for example:

Map[ g , Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

which will take quite some time. Now, because the list consists of 1000 times every number between 1 and 1000000, could it be possible do display (as a temporary display), which number is being processed?

I have thought of using Print and changing the function being mapped to

Map[ (Print[#]; g[#]) &, Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

but I was wondering if there was any "faster" method, which wouldn't print out every number of the list, but for example every 1000th number. I have thought about If before Print, but I think this method would take too much extra time.

Any thoughts? Thanks in advance!

Intermediate logs with large calculations

I've came upon a few methods of how to display "processing" information while Mathematica is running. But, from what I've understood, this only works in between lines of codes. Is it possible to display a "how far is something being processed"-information during a line of code?

For example, I wish to Map a function g over a very large list, for example:

Map[ g , Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

which will take quite some time. Now, because the list consists of 1000 times every number between 1 and 1000000, could it be possible do display (as a temporary display), which number is being processed?

I have thought of using Print and changing the function being mapped to

Map[ (Print[#]; g[#]) &, Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

but I was wondering if there was any "faster" method, which wouldn't print out every number of the list, but for example every 1000th number. I have thought about If before Print, but I think this method would take too much extra time.

Any thoughts? Thanks in advance!

Monitoring progress of long calculations

I've came upon a few methods of how to display "processing" information while Mathematica is running. But, from what I've understood, this only works in between lines of codes. Is it possible to display a "how far is something being processed"-information during a line of code?

For example, I wish to Map a function g over a very large list, for example:

Map[ g , Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

which will take quite some time. Now, because the list consists of 1000 times every number between 1 and 1000000, could it be possible do display (as a temporary display), which number is being processed?

I have thought of using Print and changing the function being mapped to

Map[ (Print[#]; g[#]) &, Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

but I was wondering if there was any "faster" method, which wouldn't print out every number of the list, but for example every 1000th number. I have thought about If before Print, but I think this method would take too much extra time.

Source Link
Gabriel
  • 1.9k
  • 12
  • 24

Intermediate logs with large calculations

I've came upon a few methods of how to display "processing" information while Mathematica is running. But, from what I've understood, this only works in between lines of codes. Is it possible to display a "how far is something being processed"-information during a line of code?

For example, I wish to Map a function g over a very large list, for example:

Map[ g , Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

which will take quite some time. Now, because the list consists of 1000 times every number between 1 and 1000000, could it be possible do display (as a temporary display), which number is being processed?

I have thought of using Print and changing the function being mapped to

Map[ (Print[#]; g[#]) &, Sort[Apply[Join, Table[Range[1000000], {1000}]]] ],

but I was wondering if there was any "faster" method, which wouldn't print out every number of the list, but for example every 1000th number. I have thought about If before Print, but I think this method would take too much extra time.

Any thoughts? Thanks in advance!