Exemple #1
0
func NewWalker(conf *config.Config, estimatingWalks int, max bool) (*Walker, error) {
	ests, err := conf.BytesFloatMultiMap("uniprox-weight-ests")
	if err != nil {
		return nil, err
	}
	prs, err := conf.BytesFloatMultiMap("uniprox-selection-prs")
	if err != nil {
		return nil, err
	}
	miner := &Walker{
		EstimatingWalks: estimatingWalks,
		Ests:            ests,
		Prs:             prs,
		Max:             max,
	}
	miner.Walker = *walker.NewWalker(conf, graple.MakeAbsorbingWalk(graple.MakeSample(miner), make(chan error)))
	return miner, nil
}
Exemple #2
0
func NewWalker(conf *config.Config) *Walker {
	miner := &Walker{}
	miner.Walker = *walker.NewWalker(conf, graple.MakeAbsorbingWalk(graple.MakeSample(miner), make(chan error)))
	return miner
}