Exemplo n.º 1
0
func main() {
	flag.Int64Var(&Seed, "s", 0, "Seed")
	flag.IntVar(&NumCircuits, "n", 1, "Number of circuits to generate")
	flag.IntVar(&NumNodes, "k", 5, "Number of nodes in random module")
	flag.Parse()

	if Seed == 0 {
		Seed = time.Now().UnixNano()
	}
	rand.Seed(Seed)
	for i := 0; i < NumCircuits; i++ {
		e := eimg.RandomCircuit(NumNodes)
		fmt.Println(e)
	}
}
Exemplo n.º 2
0
func main() {
	flag.Int64Var(&Seed, "s", 0, "Seed")
	flag.IntVar(&NumNodes, "k", 5, "Number of nodes in random module")
	flag.IntVar(&NumMutants, "n", 10, "Number of mutants to generate")
	flag.Parse()

	if Seed == 0 {
		Seed = time.Now().UnixNano()
	}
	rand.Seed(Seed)

	e := eimg.RandomCircuit(NumNodes)
	fmt.Println("   ", e)
	for i := 0; i < NumMutants; i++ {
		c := e.Clone()
		c.Mutate()
		fmt.Println(c)
	}
}