C# Class Algorithms.KdTree

显示文件 Open project: beginor/practice

Public Methods

Method Description
Contains ( Point2D p ) : bool
Insert ( Point2D point ) : void
KdTree ( ) : System
Nearest ( Point2D p ) : Point2D
Range ( RectHV rect ) : IEnumerable

Private Methods

Method Description
Contains ( KdNode node, double x, double y ) : bool
Insert ( KdNode node, Point2D p, bool vertical ) : KdNode
LeftRect ( RectHV rect, KdNode node ) : RectHV
Nearest ( KdNode node, RectHV rect, double x, double y, Point2D candidate ) : Point2D
Range ( KdNode node, RectHV nrect, RectHV rect, Queue queue ) : void
RightRect ( RectHV rect, KdNode node ) : RectHV

Method Details

Contains() public method

public Contains ( Point2D p ) : bool
p Point2D
return bool

Insert() public method

public Insert ( Point2D point ) : void
point Point2D
return void

KdTree() public method

public KdTree ( ) : System
return System

Nearest() public method

public Nearest ( Point2D p ) : Point2D
p Point2D
return Point2D

Range() public method

public Range ( RectHV rect ) : IEnumerable
rect RectHV
return IEnumerable