stree

package
v1.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package stree implements a segment tree and serial algorithm to query intervals

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stree

type Stree struct {
	// contains filtered or unexported fields
}

Stree represents a Segment Tree.

func (*Stree) AddRange

func (t *Stree) AddRange(from, to ValueType)

AddRange pushes new interval to stack

func (*Stree) Build

func (t *Stree) Build()

Build segment tree out of interval stack

func (*Stree) Clear

func (t *Stree) Clear()

Clear the interval stack

func (Stree) Contains

func (t Stree) Contains(value ValueType) bool

Contains returns truee if value is in segment tree.

type ValueType

type ValueType uint32

ValueType is the type of a single value in the segment tree.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL