diff --git a/mash/example_test.go b/mash/example_test.go new file mode 100644 index 000000000..48743a721 --- /dev/null +++ b/mash/example_test.go @@ -0,0 +1,22 @@ +package mash_test + +import ( + "fmt" + + "github.com/TimothyStiles/poly/mash" +) + +func ExampleMash() { + fingerprint1 := mash.New(17, 10) + fingerprint1.Sketch("ATGCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGA") + + fingerprint2 := mash.New(17, 9) + fingerprint2.Sketch("ATGCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGA") + + distance := fingerprint1.Distance(fingerprint2) + + fmt.Println(distance) + + // Output: + // 0 +}