unibas-gravis / scalismo

Scalable Image Analysis and Shape Modelling
https://scalismo.org
Apache License 2.0
247 stars 65 forks source link

add given instances to make it easier to define a random or fixed seed #400

Closed marcelluethi closed 1 year ago

marcelluethi commented 1 year ago

To use a fixed seed for the random number generator, an explicit given instance had to be created by the user. Following the lead of breeze, this commit introduces instead a given instance for fixed and variable seed, which can be imported by the user. Scala 3 will produce a neat error message, if the import is missing.