Beispiel #1
0
func TestSimple(t *testing.T) {
	var k = 4
	var numRows = 100
	var dimensionality = 100
	data := make([][]float64, numRows, numRows)
	for i := 0; i < numRows; i++ {
		row := make([]float64, dimensionality, dimensionality)
		for j := 0; j < dimensionality; j++ {
			row[j] = float64(i)
		}
		data[i] = row
	}
	RPHashObject := reader.NewSimpleArray(data, k)
	simpleObject := simple.NewSimple(RPHashObject)
	simpleObject.Run()
	t.Log(simpleObject.GetCentroids())
	t.Log("√ Simple test complete")
}
Beispiel #2
0
func Simple() *simple.Simple {
	return simple.NewSimple()
}