コード例 #1
0
ファイル: dist_matrix_test.go プロジェクト: soniakeys/cluster
func ExampleDistanceMatrix_Square() {
	d1 := cluster.DistanceMatrix{
		{0, 3},
		{3, 0},
	}
	d2 := cluster.DistanceMatrix{}
	d3 := cluster.DistanceMatrix{
		{0},
		{3, 0},
	}
	fmt.Println(d1.Square())
	fmt.Println(d2.Square())
	fmt.Println(d3.Square())
	// Output:
	// true
	// true
	// false
}