package
Version:
v0.0.74
Opens a new window with list of versions in this module.
Published: Jul 23, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
区间树
用于处理 IP地址到国家的查找
例如: IP [A,B] -> CN
一个IP区间,对应一个国家
Documentation
¶
func (n *Node) Data() interface{}
func (t *Tree) Insert(low, high int64, data interface{})
*
- Insert
- insert range [low, high] into red-black tree
*
- interval tree lookup function
*
- search range [low, high] for overlap, return only one element
- use lookup & delete & insert schema to get multiple elements
*
- nil is returned if not found.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.