Пример #1
0
func testPermutation() {
	fs := search.NewFS(2)
	p1 := search.NewPerm([]uint8{1, 2})
	p2 := search.NewPerm([]uint8{2, 1})
	fs.Store(p1)

	fmt.Println(p1.Hash())
	fmt.Println(p2.Hash())
	fmt.Println(fs.Test(p1), fs.Test(p2))
	fmt.Println(fs.Full())
	fs.Store(p2)
	fmt.Println(fs.Full())
}
Пример #2
0
func testHash() {
	p1 := search.NewPerm([]uint8{1, 2, 4, 3})
	p2 := search.NewPerm([]uint8{4, 1, 2, 3})
	fmt.Println(p1)
	fmt.Println(p2)
}