Class CollisionMap
HashMap to store colliding labels. See CompactLabelToOrdinal for details.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Facet.Taxonomy.WriterCache
Assembly: Lucene.Net.Facet.dll
Syntax
public class CollisionMap
Properties
Capacity
How many slots are allocated.
Declaration
public virtual int Capacity { get; }
Property Value
Type | Description |
---|---|
int |
Count
How many mappings.
Declaration
public virtual int Count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
AddLabel(FacetLabel, int, int)
Add another mapping.
Declaration
public virtual int AddLabel(FacetLabel label, int hash, int cid)
Parameters
Type | Name | Description |
---|---|---|
FacetLabel | label | |
int | hash | |
int | cid |
Returns
Type | Description |
---|---|
int |
AddLabelOffset(int, int, int)
This method does not check if the same value is already in the map because we pass in an char-array offset, so so we now that we're in resize-mode here.
Declaration
public virtual void AddLabelOffset(int hash, int offset, int cid)
Parameters
Type | Name | Description |
---|---|---|
int | hash | |
int | offset | |
int | cid |
Get(FacetLabel, int)
Return the mapping, or INVALID_ORDINAL if the label isn't recognized.
Declaration
public virtual int Get(FacetLabel label, int hash)
Parameters
Type | Name | Description |
---|---|---|
FacetLabel | label | |
int | hash |
Returns
Type | Description |
---|---|
int |