Documentation ¶
Overview ¶
Package rand provides random addition chain generators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddsGenerator ¶
type AddsGenerator struct {
N int
}
AddsGenerator generates a random chain by making N random adds.
func (AddsGenerator) GenerateChain ¶
func (a AddsGenerator) GenerateChain() (addchain.Chain, error)
GenerateChain generates a random chain based on N random adds.
func (AddsGenerator) String ¶
func (a AddsGenerator) String() string
type SolverGenerator ¶
type SolverGenerator struct { N uint Algorithm alg.ChainAlgorithm // contains filtered or unexported fields }
SolverGenerator generates random N-bit values and uses an algorithm to build a chain for them.
func NewSolverGenerator ¶
func NewSolverGenerator(n uint, a alg.ChainAlgorithm) SolverGenerator
NewSolverGenerator constructs a solver generator based on n-bit targets solved with a.
func (SolverGenerator) GenerateChain ¶
func (s SolverGenerator) GenerateChain() (addchain.Chain, error)
GenerateChain generates a random n-bit value and builds a chain for it using the configured chain algorithm.
func (SolverGenerator) String ¶
func (s SolverGenerator) String() string
Click to show internal directories.
Click to hide internal directories.