root icon indicating copy to clipboard operation
root copied to clipboard

[math] PRBS generator

Open ferdymercury opened this issue 3 years ago • 14 comments

This Pull request:

Changes or fixes:

Adds PRBS generation code

Checklist:

  • [x] tested changes locally
  • [x] updated the docs (if necessary)

This PR fixes https://github.com/root-project/root/issues/8199

ferdymercury avatar Aug 04 '21 15:08 ferdymercury

Can one of the admins verify this patch?

phsft-bot avatar Aug 04 '21 15:08 phsft-bot

@phsft-bot build

I think new generators should go via ROOT::Math::TRandomEngine, not another TRandomXYZ, right @lmoneta? Also would be good to have some tests.

hahnjo avatar Aug 18 '21 08:08 hahnjo

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14 How to customize builds

phsft-bot avatar Aug 18 '21 08:08 phsft-bot

Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.

Errors:

  • [2021-08-18T08:28:49.366Z] CMake Error at C:/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1045 (message):

phsft-bot avatar Aug 18 '21 08:08 phsft-bot

Build failed on ROOT-debian10-i386/cxx14. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.

Errors:

  • [2021-08-18T08:37:44.395Z] stderr: error: could not read '.git/rebase-apply/head-name': No such file or directory

phsft-bot avatar Aug 18 '21 09:08 phsft-bot

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Dec 09 '22 10:12 phsft-bot

I would like to revive this PR, @ferdymercury do you feel like rebasing so that I can start the builds ?

dpiparo avatar Apr 25 '24 07:04 dpiparo

see also https://github.com/root-project/root/pull/8798#issuecomment-900917227

hahnjo avatar Apr 25 '24 07:04 hahnjo

Test Results

    12 files      12 suites   2d 10h 57m 28s :stopwatch:  2 628 tests  2 628 :white_check_mark: 0 :zzz: 0 :x: 29 840 runs  29 840 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 2c3bcff6.

github-actions[bot] avatar Apr 25 '24 09:04 github-actions[bot]

@hahnjo Thanks for the comment! I can move it there, but do I really need to derive from TRandomEngine? The parent methods are for double Rndm(), which does not seem very useful to me. This generator is a binary register generator, so rather a quite different structure, and it is not intended to be used as a normal generator, but rather as a test scenario or helper math functions for electronics testing. It also is inherently templated, etc. It returns an array rather than just a number Rndm(). See https://github.com/root-project/root/pull/8798/files#diff-2e848ceefaff2e24c9b2970fb86a8da1d3d00603fc4f48f920421e603198fab2

Wrt tests, I will 'copy' the mentioned tutorial as 'test' once it's clear where this class should go.

Thanks for the review!! :)

ferdymercury avatar Apr 26 '24 07:04 ferdymercury

Hello @ferdymercury I am not sure what the use case is for having this generator in ROOT. One could, in principle, also use the bits of the generated numbers of a good generator like RANLUX++. Do we have users that are asking for this feature?

lmoneta avatar Apr 26 '24 16:04 lmoneta

Hello @ferdymercury I am not sure what the use case is for having this generator in ROOT. One could, in principle, also use the bits of the generated numbers of a good generator like RANLUX++. Do we have users that are asking for this feature?

Thanks for the reply! We discussed this point in the associated issue: https://github.com/root-project/root/issues/8199#issuecomment-851570436

ferdymercury avatar Apr 26 '24 16:04 ferdymercury

I still think is very specific, and we could have it maybe as an external addition.

lmoneta avatar Apr 26 '24 17:04 lmoneta

Ok. What do you mean by external? Moving it to just a tutorial? Happy to change that once it's clarified.

ferdymercury avatar Apr 26 '24 17:04 ferdymercury