Click or drag to resize

IntegerText Class

Converts list of arbitrary objects into an integer array. This is done by creating an integer alphabet, which maps each unique element in the original list(s) to an integer value. The lexicographical order of the elements is maintained, i.e. when a list of elements of ascending order is mapped to an integer list, the integer list is also in ascending order.
Inheritance Hierarchy
SystemObject
  Altaxo.Collections.TextIntegerText

Namespace: Altaxo.Collections.Text
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class IntegerText

The IntegerText type exposes the following members.

Constructors
 NameDescription
Public methodIntegerTextInitializes a new instance of the IntegerText class
Top
Properties
 NameDescription
Public propertyAlphabetSize Size of the alphabet, i.e. the number of unique elements that occur in the original text (or, number of unique list elements). If the text was separated into individual words, the number of words (= number of separator elements) also contribute to the alphabet size.
Public propertyNumberOfWords Number of words, if the text was separated into individual words. Otherwise, this field is equal to one.
Public propertyPaddingLength Number of additional elements of array Text. Thus the length of this array is PaddingLength + TextLength
Public propertyTextOriginal text, converted to an integer alphabet. Each unique element of the original text (or each unique list element) corresponds to an integer value. The order of this integer alphabet is the same as the order of the original elements. Note that the value 0 is reserved for the internal algorithm. If the original text was separated in different words, the first numberOfWords integers (1..numberOfWords) are reserved as separator elements, too.
Public propertyTextLength Length of the text. This is the total length of the original text, plus, if the text was separated into words, the number of separator elements (which is equal to the number of words). Note that the array _text is needed to be longer than _textLength, since some additional elements are neccessary for most algorithms.
Public propertyWordStartPositions Start positions of the words in which the original text was separated in the array _text.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodStatic memberFromWords(IEnumerableString, Boolean, Int32, IComparerChar)Generates an integer text from words (= a collection of strings). The algorithm determines the lexicographical order of all elements in all lists and then maps each unique element to an integer value, with increasing values in the lexicographical order of the elements.
Public methodStatic memberFromWordsT(IEnumerableIEnumerableT, Boolean, Int32, Boolean, IComparerT)Generates an integer text from arbitrary elements. Each list in lists is treated as separate word. Each element is such a list is treated as character. The algorithm determines the lexicographical order of all elements in all lists and then maps each unique element to an integer value, with increasing values in the lexicographical order of the elements. A unique mapping is even possible, if the elements are not sortable (i.e. if they not implement IComparable).
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also