jeudi 5 septembre 2019

Is there Go function comparable to boost::uniform_int?

I'm translating a tool from C++ to Go. The C++ tool uses the boost::random library and invokes boost::uniform_int. I'd like to know if there's a comparable 'out of the box' function in Go. If not I need some help building my own.

I've combed through Go's math/rand package but didn't find anything that was obviously equivalent.

Here's a link to boost's documentation

This is function declaration/invocation in the C++ tool

boost::uniform_int<unsigned int> randomDistOp(1, 100);




Aucun commentaire:

Enregistrer un commentaire