spatial

package
v0.0.0-...-659ce9b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFunc1D

func CompareFunc1D(a, b interface{}) int

func CompareReverseFunc1D

func CompareReverseFunc1D(b, a interface{}) int

func DeserializeRaw

func DeserializeRaw(bb []byte) (v interface{}, err error)

func DeserializeUint64

func DeserializeUint64(bb []byte) uint64

func FloatFromSortableInt

func FloatFromSortableInt(n uint64) float64

func FloatToSortableInt

func FloatToSortableInt(f float64) uint64

func GobDeserialize

func GobDeserialize(bb []byte) (*_Item, error)

func GobSerialize

func GobSerialize(v *_Item) ([]byte, error)

func KeyToRange

func KeyToRange(bb []byte) (r Range, id []byte)

func NewID

func NewID(id []byte) _ID

func NewItem

func NewItem(id []byte, v interface{}, rs ...Range) *_Item

func ParseOpts

func ParseOpts(opts []Options) (m map[int]interface{}, err error)

func SerializeRaw

func SerializeRaw(v interface{}) ([]byte, error)

func SerializeUint64

func SerializeUint64(n uint64) []byte

Types

type Debugger

type Debugger struct {
	*Spatial1D
}

func (*Debugger) DumpRange

func (this *Debugger) DumpRange(begin, end []byte, cb func(k, v []byte))

func (*Debugger) DumpRangeExtInfo

func (this *Debugger) DumpRangeExtInfo(begin, end []byte, cb func(k, v []byte))

func (*Debugger) Store

func (this *Debugger) Store() kv.KVStore

type OptKVDir

type OptKVDir struct{ Dir string }

type OptKVName

type OptKVName struct{ AnyKey interface{} }

type Options

type Options interface{}

type Spatial1D

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

func New1D

func New1D(opts ...Options) (o *Spatial1D, err error)

func (*Spatial1D) AsDebug

func (this *Spatial1D) AsDebug() *Debugger

func (*Spatial1D) Close

func (this *Spatial1D) Close()

func (*Spatial1D) Contains

func (this *Spatial1D) Contains(x uint64) Enum

func (*Spatial1D) ContainsRange

func (this *Spatial1D) ContainsRange(min, max uint64) Enum

func (Spatial1D) DbPath

func (this Spatial1D) DbPath() string

func (*Spatial1D) FlushExt

func (this *Spatial1D) FlushExt() (err error)

func (*Spatial1D) GetExtInfo

func (this *Spatial1D) GetExtInfo(category uint8, id []byte) (v interface{}, err error)

func (*Spatial1D) Set

func (this *Spatial1D) Set(id []byte, r Range, v interface{}) error

func (*Spatial1D) SetExtBatchSize

func (this *Spatial1D) SetExtBatchSize(n uint)

func (*Spatial1D) SetExtInfo

func (this *Spatial1D) SetExtInfo(category uint8, id []byte, v interface{}) error

func (*Spatial1D) WithinRange

func (this *Spatial1D) WithinRange(min, max uint64) Enum

type Spatial2D

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

func New2D

func New2D(opts ...Options) (o *Spatial2D, err error)

func (*Spatial2D) Close

func (this *Spatial2D) Close()

func (*Spatial2D) Contains

func (this *Spatial2D) Contains(x, y uint64) Enum

func (*Spatial2D) ContainsRange

func (this *Spatial2D) ContainsRange(x, y Range) Enum

func (*Spatial2D) GetExtInfo

func (this *Spatial2D) GetExtInfo(category uint8, id []byte) (v interface{}, err error)

func (*Spatial2D) Set

func (this *Spatial2D) Set(id []byte, x, y Range, v interface{}) error

func (*Spatial2D) SetExtInfo

func (this *Spatial2D) SetExtInfo(category uint8, id []byte, v interface{}) error

func (*Spatial2D) WithinRange

func (this *Spatial2D) WithinRange(x, y Range) Enum

type Spatial3D

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

func New3D

func New3D(opts ...Options) (o *Spatial3D, err error)

func (*Spatial3D) Close

func (this *Spatial3D) Close()

func (*Spatial3D) Contains

func (this *Spatial3D) Contains(x, y, z uint64) Enum

func (*Spatial3D) ContainsRange

func (this *Spatial3D) ContainsRange(x, y, z Range) Enum

func (*Spatial3D) GetExtInfo

func (this *Spatial3D) GetExtInfo(category uint8, id []byte) (v interface{}, err error)

func (*Spatial3D) Set

func (this *Spatial3D) Set(id []byte, x, y, z Range, v interface{}) error

func (*Spatial3D) SetExtInfo

func (this *Spatial3D) SetExtInfo(category uint8, id []byte, v interface{}) error

func (*Spatial3D) WithinRange

func (this *Spatial3D) WithinRange(x, y, z Range) Enum

Jump to

Keyboard shortcuts

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