Skip to content

Commit

Permalink
Replace ACG by Random123 (#3190)
Browse files Browse the repository at this point in the history
* Fix tests
  • Loading branch information
alkino authored Nov 11, 2024
1 parent 4b62e56 commit 095d858
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 462 deletions.
1 change: 0 additions & 1 deletion .sanitizers/undefined.supp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pointer-overflow:coreneuron::net_receive_NetStim(coreneuron::Point_process*, int
pointer-overflow:coreneuron::_net_receive__VecStim(coreneuron::Point_process*, int, double)
pointer-overflow:NonLinImpRep::current(int, Memb_list*, int)
pointer-overflow:pr_realcell(PreSyn&, NrnThread&, _IO_FILE*)
shift-base:ACG::asLong()
shift-base:nrnRan4int
unsigned-integer-overflow:_philox4x32bumpkey(r123array2x32)
unsigned-integer-overflow:coreneuron::nrnran123_deletestream(coreneuron::nrnran123_State*, bool)
Expand Down
27 changes: 1 addition & 26 deletions docs/hoc/programming/math/random.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Random Class
from the gnu c++ class library. As of version 5.2, a cryptographic quality
RNG class wrapper for :hoc:func:`mcell_ran4` was added and is available
with the :hoc:meth:`Random.MCellRan4` method. The current default random generator
is :hoc:meth:`Random.ACG`.
is :hoc:meth:`Random.Random123`.

As of version 7.3, a more versatile cryptographic quality generator,
Random123, is available with the :hoc:meth:`Random.Random123` method. This generator
Expand Down Expand Up @@ -71,31 +71,6 @@ Random Class



.. hoc:method:: Random.ACG
Syntax:
``r.ACG()``

``r.ACG(seed)``

``r.ACG(seed, size)``


Description:
Use a variant of the Linear Congruential Generator (algorithm M)
described in Knuth, Art of Computer Programming, Vol. III in
combination with a Fibonacci Additive Congruential Generator. This is
a "very high quality" random number generator, Default size is 55,
giving a size of 1244 bytes to the structure. Minimum size is 7 (total
100 bytes), maximum size is 98 (total 2440 bytes).



----



.. hoc:method:: Random.MCellRan4
Expand Down
27 changes: 1 addition & 26 deletions docs/python/programming/math/random.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Random Class
from the gnu c++ class library. As of version 5.2, a cryptographic quality
RNG class wrapper for :func:`mcell_ran4` was added and is available
with the :meth:`Random.MCellRan4` method. The current default random generator
is :meth:`Random.ACG`.
is :meth:`Random.Random123`.

As of version 7.3, a more versatile cryptographic quality generator,
Random123, is available with the :meth:`Random.Random123` method. This generator
Expand Down Expand Up @@ -74,31 +74,6 @@ Random Class



.. method:: Random.ACG


Syntax:
``r.ACG()``

``r.ACG(seed)``

``r.ACG(seed, size)``


Description:
Use a variant of the Linear Congruential Generator (algorithm M)
described in Knuth, Art of Computer Programming, Vol. III in
combination with a Fibonacci Additive Congruential Generator. This is
a "very high quality" random number generator, Default size is 55,
giving a size of 1244 bytes to the structure. Minimum size is 7 (total
100 bytes), maximum size is 98 (total 2440 bytes).



----



.. method:: Random.MCellRan4


Expand Down
1 change: 0 additions & 1 deletion share/lib/helpdict
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ AbsoluteTolerance VariableStepControl Tools NEURONMainMenu GUI Reference 418 neu
accept_action List classes general neuron.exe Reference 69 neuron/general/classes/list.html#accept_action
accept_action SectionBrowser classes neuron neuron.exe Reference 316 neuron/neuron/classes/secbrows.html#accept_action
access CurrentlyAccessedSection Section neuron neuron.exe Reference 380 neuron/neuron/secspec.html#access
ACG Random classes general neuron.exe Reference 97 neuron/general/classes/random.html#ACG
action MechanismStandard classes neuron neuron.exe Reference 268 neuron/neuron/classes/mechstan.html#action
action MechanismType classes neuron neuron.exe Reference 274 neuron/neuron/classes/mechtype.html#action
action Shape classes neuron neuron.exe Reference 325 neuron/neuron/classes/shape.html#action
Expand Down
292 changes: 0 additions & 292 deletions src/gnu/ACG.cpp

This file was deleted.

Loading

0 comments on commit 095d858

Please sign in to comment.