func (p Point) Compare(other datastructures.Comparable) int {
	rhs := other.(Point)
	for dim := 0; dim < len(p.Vals); dim++ {
		if p.Vals[dim] != rhs.Vals[dim] {
			return int(p.Vals[dim] - rhs.Vals[dim])
		}
	}
	return int(p.UserData - rhs.UserData)
}
Compare is part of datastructures.Comparable interface
package bkdtree
import (
	"encoding/binary"
	"sort"
	datastructures "github.com/deepfabric/go-datastructures"
	"github.com/keegancsmith/nth"
)
type Point struct {
	Vals     []uint64
	UserData uint64
}
type PointArray interface {
	sort.Interface
	GetPoint(idx int) Point
	GetValue(idx int) uint64
	SubArray(begin, end int) PointArray
	Erase(point Point) bool
	Append(point Point)
}
type PointArrayMem struct {
	points []Point
	byDim  int
}
type PointArrayExt struct {
	data        []byte
	numPoints   int
	byDim       int
	bytesPerDim int
	numDims     int
	pointSize   int
}