Class Cell
Represents a grid cell. These are not necessarily thread-safe, although new Cell("") (world cell) must be.
@lucene.experimental
Inheritance
Inherited Members
Assembly: Lucene.Net.Spatial.dll
Syntax
[Serializable]
public abstract class Cell : IComparable<Cell>
Constructors
Name | Description |
---|---|
Cell(SpatialPrefixTree, Byte[], Int32, Int32) | |
Cell(SpatialPrefixTree, String) |
Fields
Name | Description |
---|---|
LEAF_BYTE | |
m_leaf | Always false for points. |
m_outerInstance | LUCENENET specific - we need to set the SpatialPrefixTree before calling overridden members of this class, just in case those overridden members require it. This is not possible from the subclass because the constructor of the base class runs first. So we need to move the reference here and also set it before running the normal constructor logic. |
m_shapeRel | When set via GetSubCells(IShape), it is the relationship between this cell and the given shape filter. |
Properties
Name | Description |
---|---|
Center | |
IsLeaf | For points, this is always false. |
Level | |
Shape | |
ShapeRel | |
SubCellsSize | GetSubCells().Count -- usually a constant. Should be >=2 |
TokenString | Note: doesn't contain a trailing leaf byte. |
Methods
Name | Description |
---|---|
CompareTo(Cell) | |
Equals(Object) | |
GetHashCode() | |
GetSubCell(IPoint) | Performant implementations are expected to implement this efficiently by considering the current cell's boundary. |
GetSubCells() | Gets the cells at the next grid cell level that cover this cell. |
GetSubCells(IShape) | Like GetSubCells() but with the results filtered by a shape. If
that shape is a IPoint then it must call
GetSubCell(IPoint). The returned cells
should have ShapeRel set to their relation with
Precondition: Never called when Level == maxLevel. |
GetTokenBytes() | Note: doesn't contain a trailing leaf byte. |
Reset(Byte[], Int32, Int32) | |
SetLeaf() | Note: not supported at level 0. |
ToString() |