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 #401

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.

marcelluethi commented 1 year ago

@Andreas-Forster I am aware that this PR does not pass scalafmt checks. The reason is that we need to upgrade to a more recent version of scalafmt first, which understands scala 3 syntax. I will do this in a separate PR.