-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitvector.random #31
Comments
@phanrahan I agree it would make sense to make the random method a classmethod instead of a staticmethod (already the case FPVector). I am not quite sure what it means to ensure half the random numbers are positive and half are negative on a method that returns a single number. |
We could alternate generating positive and negative numbers. Just make sure for a small number of calls that we stratify the samples. Mostly, I want to create a framework for using better sampling methods. |
@phanrahan I created an SMT based constrained random generator for fault. However, the constraints are on individual samples not over a set of samples.
to
or
tagging @leonardt |
if I do Bits16 = BitVector[16]
I can't do Bits16.random() to get a random number. I seem to need to call BitVector.random(16).
Am I missing something? I am contantly generating number numbers for tests, so this would be a nice feature to have.
I am thinking it would also be good to create options for different distributions of random numbers. For example, SIntVector.random(width, sampler="stratified") which ensures that half the random numbers are positive and half are negative. Similarly for FPVector.
The text was updated successfully, but these errors were encountered: