Versions in this module Expand all Collapse all v0 v0.1.0 Nov 29, 2023 Changes in this version + var ErrNilReader = fmt.Errorf("%w: nil reader", Error) + var ErrNilWriter = fmt.Errorf("%w: nil writer", Error) + var Error = errors.New("index") + type Child struct + ID dag.ID + Parent dag.ID + type ChildList []Child + func (childrenList ChildList) Get(id dag.ID) *Child + func (childrenList ChildList) Len() int + func (childrenList ChildList) Less(i, j int) bool + func (childrenList ChildList) Sort() chan<- Child + func (childrenList ChildList) Swap(i, j int) + type CollectionIDList []VariantID + func (c CollectionIDList) Has(collectionID VariantID) bool + func (c CollectionIDList) Len() int + func (c CollectionIDList) Less(i, j int) bool + func (c CollectionIDList) Swap(i, j int) + type CollectionTableNumber storage.ID16 + func (collectionTableNumber CollectionTableNumber) Add(addition int) CollectionTableNumber + func (collectionTableNumber CollectionTableNumber) ID16() storage.ID16 + func (collectionTableNumber CollectionTableNumber) VariantID(indexInTable VariantSubID) VariantID + type Index struct + func New() *Index + func (index *Index) AddRunes(runes []rune) (dag.Node, error) + func (index *Index) AddString(word string) (node dag.Node, err error) + func (index *Index) AddToNode(parentID dag.ID, runes []rune) (dag.Node, error) + func (index *Index) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (index *Index) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (index *Index) Children() dag.NodeMap + func (index *Index) FetchFromItem(parentID dag.ID, runes []rune) (dag.Node, error) + func (index *Index) FetchItemFromParent(parentID dag.ID, runes []rune) (*Node, error) + func (index *Index) FetchRunes(runes []rune) (dag.Node, error) + func (index *Index) FetchString(word string) (dag.Node, error) + func (index *Index) Get(nodeIdx dag.ID) (node dag.Node, err error) + func (index *Index) GetChildrenIDMap(id dag.ID) (res dag.IdMap) + func (index *Index) GetChildrenMap(id dag.ID) dag.NodeMap + func (index *Index) GetItem(id dag.ID) *Node + func (index *Index) NodesCount() int + func (index *Index) Optimize() + func (index *Index) TagID(name dag.TagName, parent dag.TagName) dag.TagID + func (index *Index) TagSet(tagSet TagSet) (res dag.TagSet, err error) + func (index *Index) TagSetIndex() TagSetIndex + func (index *Index) Variants(id VariantID) (tagSetCollection TagSetIDCollection, err error) + func (index *Index) WordsCount() int + func (index Index) Tags() dag.Idx + type Item struct + ID dag.ID + Letter rune + Parent dag.ID + Variants VariantID + func (i *Item) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (i *Item) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (i Item) String() string + type Items struct + func NewItems() *Items + func (items *Items) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (items *Items) Extend(count int) + func (items *Items) Get(id dag.ID) *Item + func (items *Items) NewChild(parentID dag.ID, letter rune) Item + func (items Items) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (items Items) NextID() dag.ID + type Letter struct + ID dag.ID + Letter rune + type Node struct + func (node *Node) AddTagSet(newTagSet ...dag.TagName) error + func (node *Node) Id() dag.ID + func (node *Node) String() string + func (node *Node) TagSets() (res []dag.TagSet) + func (node *Node) Word() string + func (node Node) Item() Item + type TagSet []dag.TagID + func (tagSet *TagSet) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (tagSet *TagSet) ReadFrom(r io.Reader) (totalBytesTaken int64, err error) + func (tagSet TagSet) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (tagSet TagSet) EqualTo(another TagSet) bool + func (tagSet TagSet) Len() int + func (tagSet TagSet) Less(i, j int) bool + func (tagSet TagSet) Sort() + func (tagSet TagSet) String() string + func (tagSet TagSet) Swap(i, j int) + func (tagSet TagSet) WriteTo(w io.Writer) (n int64, err error) + type TagSetID storage.ID32 + func (tagSetID TagSetID) TagSetSubID() TagSetSubID + func (tagSetID TagSetID) TagSetTableNumber() TagSetTableNumber + type TagSetIDCollection []TagSetID + func (t *TagSetIDCollection) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (t TagSetIDCollection) Add(additionalTagSetID TagSetID) TagSetIDCollection + func (t TagSetIDCollection) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (t TagSetIDCollection) EqualTo(another TagSetIDCollection) bool + func (t TagSetIDCollection) GoString() string + func (t TagSetIDCollection) Has(searchTagSetID TagSetID) bool + func (t TagSetIDCollection) Len() int + func (t TagSetIDCollection) Less(i, j int) bool + func (t TagSetIDCollection) Swap(i, j int) + type TagSetIndex []TagSetTable + func (tagSetIndex *TagSetIndex) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (tagSetIndex *TagSetIndex) Find(item TagSet) (storageIdx TagSetID, found bool) + func (tagSetIndex *TagSetIndex) Index(item TagSet) (storageIdx TagSetID) + func (tagSetIndex TagSetIndex) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (tagSetIndex TagSetIndex) Get(storageIdx TagSetID) (TagSet, bool) + func (tagSetIndex TagSetIndex) Size() (res int) + func (tagSetIndex TagSetIndex) TableIDs() (res []TagSetID) + type TagSetSubID storage.ID16 + func (tagSetID TagSetSubID) ID16() storage.ID16 + func (tagSetID TagSetSubID) Int() int + type TagSetTable []TagSet + func (tagSetTable *TagSetTable) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (tagSetTable *TagSetTable) Index(item TagSet) (storageIdx TagSetSubID) + func (tagSetTable TagSetTable) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (tagSetTable TagSetTable) Find(item TagSet) (storageIdx TagSetSubID, found bool) + func (tagSetTable TagSetTable) Get(storageIdx TagSetSubID) (tagSet TagSet, found bool) + func (tagSetTable TagSetTable) Len() int + func (tagSetTable TagSetTable) String() string + type TagSetTableNumber storage.ID16 + func (tagSetTableNumber TagSetTableNumber) Add(increment int) TagSetTableNumber + func (tagSetTableNumber TagSetTableNumber) ID16() storage.ID16 + func (tagSetTableNumber TagSetTableNumber) Int() int + func (tagSetTableNumber TagSetTableNumber) TagSetID(id TagSetSubID) TagSetID + type VariantID storage.ID32 + func (variantID VariantID) CollectionTableID() (res VariantSubID) + func (variantID VariantID) TableNum() (res CollectionTableNumber) + type VariantSubID storage.ID16 + func (variantSubID VariantSubID) Add(value int) VariantSubID + func (variantSubID VariantSubID) ID16() storage.ID16 + type VariantsIndex []VariantsTable + func (tagSetIndex *VariantsIndex) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (tagSetIndex *VariantsIndex) Index(item TagSetIDCollection) (storageIdx VariantID) + func (tagSetIndex VariantsIndex) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (tagSetIndex VariantsIndex) Find(item TagSetIDCollection) (storageIdx VariantID, found bool) + func (tagSetIndex VariantsIndex) Get(storageIdx VariantID) TagSetIDCollection + func (tagSetIndex VariantsIndex) KnownID() (res []VariantID) + func (tagSetIndex VariantsIndex) Table(tableID CollectionTableNumber) VariantsTable + func (tagSetIndex VariantsIndex) Tables() []VariantsTable + type VariantsTable []TagSetIDCollection + func (variantsTable *VariantsTable) BinaryReadFrom(reader *binutils.BinaryReader) (err error) + func (variantsTable *VariantsTable) Index(item TagSetIDCollection) (storageIdx VariantSubID) + func (variantsTable VariantsTable) BinaryWriteTo(writer *binutils.BinaryWriter) (err error) + func (variantsTable VariantsTable) Find(item TagSetIDCollection) (storageIdx VariantSubID, found bool) + func (variantsTable VariantsTable) Following(storageIdx VariantSubID) (res []VariantSubID) + func (variantsTable VariantsTable) Get(storageIdx VariantSubID) TagSetIDCollection