convtree

package module
v0.0.0-...-247b593 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 4 Imported by: 0

README

conv-tree

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvTree

type ConvTree struct {
	ID               string
	IsLeaf           bool
	MaxPoints        int
	MaxDepth         int
	Depth            int
	GridSize         int
	ConvNum          int
	Kernel           [][]float64
	Points           []Point
	MinXLength       float64
	MinYLength       float64
	TopLeft          Point
	BottomRight      Point
	ChildTopLeft     *ConvTree
	ChildTopRight    *ConvTree
	ChildBottomLeft  *ConvTree
	ChildBottomRight *ConvTree
}

func NewConvTree

func NewConvTree(topLeft Point, bottomRight Point, minXLength float64, minYLength float64, maxPoints int, maxDepth int,
	convNumber int, gridSize int, kernel [][]float64, initPoints []Point) (ConvTree, error)

func (*ConvTree) Check

func (tree *ConvTree) Check()

func (*ConvTree) Clear

func (tree *ConvTree) Clear()

func (*ConvTree) Insert

func (tree *ConvTree) Insert(point Point, allowSplit bool)

type Point

type Point struct {
	X       float64
	Y       float64
	Weight  int
	Content interface{}
}

type QuadTree

type QuadTree struct {
	ID     string
	IsLeaf bool

	Depth int

	Points      []Point
	TopLeft     Point
	BottomRight Point

	ChildTopLeft     *QuadTree
	ChildTopRight    *QuadTree
	ChildBottomLeft  *QuadTree
	ChildBottomRight *QuadTree
	// contains filtered or unexported fields
}

func NewQuadTree

func NewQuadTree(topLeft Point, bottomRight Point, minXLength float64, minYLength float64, maxPoints int,
	maxDepth int, initPoints []Point) (QuadTree, error)

func (*QuadTree) Insert

func (tree *QuadTree) Insert(point Point)

func (QuadTree) Print

func (tree QuadTree) Print(prefix string)

Jump to

Keyboard shortcuts

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