Penn State Professor Receives ACM Test of Time Award for Paper on Data Privacy hpcwire.com - get the latest breaking news, showbiz & celebrity photos, sport news & rumours, viral videos and top stories from hpcwire.com Daily Mail and Mail on Sunday newspapers.
The SQLite R Tree Module
►
Table Of Contents
1. Overview
An R-Tree is a special
index that is designed for doing range queries. R-Trees are most commonly
used in geospatial systems where each entry is a rectangle with minimum and
maximum X and Y coordinates. Given a query rectangle, an R-Tree is able
to quickly find all entries that are contained within the query rectangle
or which overlap the query rectangle. This idea is easily extended to
three dimensions for use in CAD systems. R-Trees also find use in time-domain
range look-ups. For example, suppose a database records the starting and
RMI
usage
Create an index and make lookups
// load the age column and parse values into float64 values
ageColumn := extractAgeColumn( data/people.csv )
// create an index over the age column
index := index.New(ageColumn)
// search an age and get back its line position inside the file people.csv
search, := strconv.ParseFloat(os.Args[1], 64)
lines, := index.Lookup(search)
the
data/people.csv age column.
It outputs :
$ cat data/people.csv
name,age,sex
jeanne,90,F
jean,23,M
Carlos,3,M
Carlotta,45,F
Miguel,1,M
Martine,1.5,F
Georgette,23,F
$ go run main.go 23
2020/11/15 20:29:56 People who are 23 years old are located at [8 3] inside data/people.csv