| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new class AutoSeeded_RNG that is a RandomNumberGenerator that wraps
up the logic formerly in RandomNumberGenerator::make_rng. make_rng in
fact now just returns a new AutoSeeded_RNG object.
AutoSeeded_RNG is a bit more convenient because
- No need to use auto_ptr
- No need to dereference (same syntax everywhere - it's an underestimated
advantage imo)
Also move the code from timer/timer_base to timer/
|
| |
|
| |
|
| |
|
|
|
|
| |
Update the examples
|
|
|
|
|
|
|
| |
bother creating it, just let it be initialized lazily when needed.
Reindents in encypt.cpp and hash_fd.cpp (indenting the brace after a try
statement).
|
|
|
|
|
|
| |
cycle size is based on the square root of the prime factors, bailing
after 2^16 would mean we would be unlikely to find any factors larger
than 32 bits.
|
|
|
|
| |
might be composite.
|
|
|
|
|
| |
instead of a while loop so it doesn't have to be initialized each time
through.
|
| |
|
|
|
|
|
|
|
|
| |
if we don't find a cycle fairly quickly.
Use (x^2 + x) % n instead of (x^2 - 1) % n; it seems to be giving better
(ie, faster) results, though to be honest I'm not sure exactly why this
should be the case.
|
| |
|
| |
|
|
|
|
|
| |
Change the output to sort the factors, and use ':' instead of '=' so
the output exactly matches that of the BSD 'factor' program.
|
|
|