File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ func LoadSavedGraph[K cmp.Ordered](path string) (*SavedGraph[K], error) {
300300}
301301
302302// Save writes the graph to the file.
303- func (g * SavedGraph [T ]) Save () error {
303+ func (g * SavedGraph [K ]) Save () error {
304304 tmp , err := renameio .TempFile ("" , g .Path )
305305 if err != nil {
306306 return err
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ func maxLevel(ml float64, numNodes int) int {
277277}
278278
279279// randomLevel generates a random level for a new node.
280- func (h * Graph [T ]) randomLevel () int {
280+ func (h * Graph [K ]) randomLevel () int {
281281 // max avoids having to accept an additional parameter for the maximum level
282282 // by calculating a probably good one from the size of the base layer.
283283 max := 1
@@ -301,7 +301,7 @@ func (h *Graph[T]) randomLevel() int {
301301 return max
302302}
303303
304- func (g * Graph [T ]) assertDims (n Vector ) {
304+ func (g * Graph [K ]) assertDims (n Vector ) {
305305 if len (g .layers ) == 0 {
306306 return
307307 }
@@ -313,7 +313,7 @@ func (g *Graph[T]) assertDims(n Vector) {
313313
314314// Dims returns the number of dimensions in the graph, or
315315// 0 if the graph is empty.
316- func (g * Graph [T ]) Dims () int {
316+ func (g * Graph [K ]) Dims () int {
317317 if len (g .layers ) == 0 {
318318 return 0
319319 }
@@ -447,7 +447,7 @@ func (h *Graph[K]) Search(near Vector, k int) []Node[K] {
447447}
448448
449449// Len returns the number of nodes in the graph.
450- func (h * Graph [T ]) Len () int {
450+ func (h * Graph [K ]) Len () int {
451451 if len (h .layers ) == 0 {
452452 return 0
453453 }
You can’t perform that action at this time.
0 commit comments