Help main page

Counter parameters

This calculator allows not only spot measurements of the end-to-end probability distribution at single points, but also tables to be generated of the distribution at a number of points. Alternatively, measurements can be made of a number of different distributions, or of the same distribution at multiple levels of resolution, and displayed as a table. Generating a table involves a counter variable 'c' which can be written into any of the textual fields.

To generate a table, the measurement of the distribution is made multiple times with different values of the counter. The fields that determine the measurement are reevaluated with each iteration before a measurement is made. The output is a table with the values of the counter, along with the values of the distribution at each iteration.

To create a table, one needs to set each of the following parameters:

So, for example, if min = -3, max = 1, and step = 1.2, then a table is generated with counter evaluated at -3, -1.8, -0.6, 0.6.

There is one final parameter:

The reason to skip initialization if possible is that it is time-consuming. The Spakowitz computation does some of its calculation in its initialization, which can take up much of the runtime when the calculation is inherently quick (e.g. displacements are being summed). The Monte Carlo method is more severely affected, since the generation of chains is done in the initialization step. If the only fields that are affected by the counter have to do with sampling, then leave the "loop initialization" button unchecked. If any of the chain parameter fields, l_max, K_step, K_max, "segments per Lp" or "num samples" involve the counter, then this button needs to be checked.

Within the textual fields, the counter is given the symbol 'c'. So just writing 'c' into a given field gives it the value of the counter, at each row in the table that is generated. The counter can also be embedded into expressions, as in:

More generally, any field can take expressions even if the counter is not being used. The allowed operators are '+', '-', '*', '/', '^' (raising to a power), and terms may be grouped by parentheses. The functions cos(), sin(), tan(), acos(), asin(), atan(), and log() are also defined. Finally, there are three predefined variables: 'pi', 'e' (for computing exponentials), and of course the counter 'c'.