C# 클래스 Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree

A Spatial Prefix Tree, or Trie, which decomposes shapes into prefixed strings at variable lengths corresponding to variable precision. Each string corresponds to a spatial region. Implementations of this class should be thread-safe and immutable once initialized.
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
ctx Spatial4n.Core.Context.SpatialContext
maxLevels int

공개 메소드들

메소드 설명
GetCell ( byte bytes, int offset, int len ) : Cell
GetCell ( byte bytes, int offset, int len, Cell target ) : Cell
GetCell ( string token ) : Cell

The cell for the specified token.

The cell for the specified token. The empty string should be equal to WorldCell. Precondition: Never called when token length > maxLevel.

GetCells ( IPoint p, int detailLevel, bool inclParents ) : IList

A Point-optimized implementation of GetCells(Shape, int, bool, bool). That method in facts calls this for points. This implementation depends on GetCell(string) being fast, as its called repeatedly when incPlarents is true.

GetCells ( IShape shape, int detailLevel, bool inclParents, bool simplify ) : IList

Gets the intersecting cells for the specified shape, without exceeding detail level.

Gets the intersecting cells for the specified shape, without exceeding detail level. If a cell is within the query shape then it's marked as a leaf and none of its children are added. This implementation checks if shape is a IPoint and if so returns GetCells(Point, int, bool).

GetDistanceForLevel ( int level ) : double

Given a cell having the specified level, returns the distance from opposite corners.

Given a cell having the specified level, returns the distance from opposite corners. Since this might very depending on where the cell is, this method may over-estimate.

GetLevelForDistance ( double dist ) : int

Returns the level of the largest grid in which its longest side is less than or equal to the provided distance (in degrees).

Returns the level of the largest grid in which its longest side is less than or equal to the provided distance (in degrees). Consequently dist acts as an error epsilon declaring the amount of detail needed in the grid, such that you can get a grid with just the right amount of precision.

SpatialPrefixTree ( SpatialContext ctx, int maxLevels ) : Spatial4n.Core.Context
ToString ( ) : string

보호된 메소드들

메소드 설명
GetCell ( IPoint p, int level ) : Cell

Returns the cell containing point p at the specified level.

비공개 메소드들

메소드 설명
CellsToTokenStrings ( ICollection cells ) : IList
RecursiveGetCells ( Cell cell, IShape shape, int detailLevel, bool inclParents, bool simplify, IList result ) : bool

Returns true if cell was added as a leaf.

Returns true if cell was added as a leaf. If it wasn't it recursively descends.

메소드 상세

GetCell() 보호된 메소드

Returns the cell containing point p at the specified level.
protected GetCell ( IPoint p, int level ) : Cell
p IPoint
level int
리턴 Cell

GetCell() 공개 추상적인 메소드

public abstract GetCell ( byte bytes, int offset, int len ) : Cell
bytes byte
offset int
len int
리턴 Cell

GetCell() 공개 메소드

public GetCell ( byte bytes, int offset, int len, Cell target ) : Cell
bytes byte
offset int
len int
target Cell
리턴 Cell

GetCell() 공개 추상적인 메소드

The cell for the specified token.
The cell for the specified token. The empty string should be equal to WorldCell. Precondition: Never called when token length > maxLevel.
public abstract GetCell ( string token ) : Cell
token string
리턴 Cell

GetCells() 공개 메소드

A Point-optimized implementation of GetCells(Shape, int, bool, bool). That method in facts calls this for points. This implementation depends on GetCell(string) being fast, as its called repeatedly when incPlarents is true.
public GetCells ( IPoint p, int detailLevel, bool inclParents ) : IList
p IPoint
detailLevel int
inclParents bool
리턴 IList

GetCells() 공개 메소드

Gets the intersecting cells for the specified shape, without exceeding detail level.
Gets the intersecting cells for the specified shape, without exceeding detail level. If a cell is within the query shape then it's marked as a leaf and none of its children are added. This implementation checks if shape is a IPoint and if so returns GetCells(Point, int, bool).
public GetCells ( IShape shape, int detailLevel, bool inclParents, bool simplify ) : IList
shape IShape the shape; non-null
detailLevel int the maximum detail level to get cells for
inclParents bool /// if true then all parent cells of leaves are returned /// too. The top world cell is never returned. ///
simplify bool /// for non-point shapes, this will simply/aggregate sets of /// complete leaves in a cell to its parent, resulting in /// ~20-25% fewer cells. ///
리턴 IList

GetDistanceForLevel() 공개 메소드

Given a cell having the specified level, returns the distance from opposite corners.
Given a cell having the specified level, returns the distance from opposite corners. Since this might very depending on where the cell is, this method may over-estimate.
public GetDistanceForLevel ( int level ) : double
level int [1 to maxLevels]
리턴 double

GetLevelForDistance() 공개 추상적인 메소드

Returns the level of the largest grid in which its longest side is less than or equal to the provided distance (in degrees).
Returns the level of the largest grid in which its longest side is less than or equal to the provided distance (in degrees). Consequently dist acts as an error epsilon declaring the amount of detail needed in the grid, such that you can get a grid with just the right amount of precision.
public abstract GetLevelForDistance ( double dist ) : int
dist double >= 0
리턴 int

SpatialPrefixTree() 공개 메소드

public SpatialPrefixTree ( SpatialContext ctx, int maxLevels ) : Spatial4n.Core.Context
ctx Spatial4n.Core.Context.SpatialContext
maxLevels int
리턴 Spatial4n.Core.Context

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

프로퍼티 상세

ctx 보호되어 있는 프로퍼티

protected SpatialContext,Spatial4n.Core.Context ctx
리턴 Spatial4n.Core.Context.SpatialContext

maxLevels 보호되어 있는 프로퍼티

protected int maxLevels
리턴 int