Skip to content

Kerah/goaugmented

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goaugmented

Golang augmented tree realisation for interfaces types.

import (
    "github.com/Kerah/goaugmented"
    "github.com/Kerah/goaugmented/augmented"
    "fmt"
)

func main(){
  tree := goaugmented.New(1)
  iv := goaugmented.SingleDimensionInterval(
		NewFloat64(10.0),
		NewFloat64(100.0),
		1,
	)

	iv2 := goaugmented.SingleDimensionInterval(
		NewFloat64(50.0),
		NewFloat64(100.0),
		2,
	)
	
	tree.Add(iv, iv2)
	q := NewFloat64VI(64)
	ivs := tree.Query(q)


	data := map[uint64]struct{}{}

	for _, i := range ivs {
		fmt.Printf("Founded: %d\n", i.ID())
	}
}

About

Golang augmented tree

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages