Squeak Class Documentation category index | class index  
 
CRLookupResult
  category: Genie-Engine
  superclass: SortedCollection
  subclasses:

Whenever a feature is looked up in a dictionary, the result is stored in an instance of this class. In general, the result doesn't contain only the most similar feature. Much more, it contains a certain amount of similar features ordered by distance.

Besides other access possibilities, instances of this class provide an iterator to iterate through the result.

instance methods
  accessing
  add:
addFeature:char:distance:
addResult:
at:
char
charAt:
charType
charTypeAt:
copyWithoutParentFeatures
correspondingKeystrokes
correspondingKeystrokesAt:
correspondingMouseEventsHand:position:buttons:
correspondingMouseEventsHand:position:buttons:at:
correspondsToKeystrokes
correspondsToKeystrokesAt:
correspondsToMouseEvents
correspondsToMouseEventsAt:
dictionary
dictionary:
distance
distanceAt:
distanceDifference
distanceDifferenceFrom:to:
distanceDifferenceFrom:toDistinctChar:
distanceDifferenceToDistinctChar
distinctCharItem:
distinctCharSize
eliminateParentFeatures
evaluateCodeIn:
evaluateCodeIn:at:
feature
featureAt:
indexOfDistinctChar:
indexOfDistinctChar:startAt:
isCode
isCodeAt:
isCommand
isCommandAt:
isStrokes
isStrokesAt:
lookupIndex
lookupIndex:
minSize
minSize:
nextDistinctCharMatch
nextDistinctCharMatchRollover:
nextMatch
nextMatchRollover:
normalizedCharAt:
relativeDistanceDifference
relativeDistanceDifferenceFrom:to:
relativeDistanceDifferenceFrom:toDistinctChar:
relativeDistanceDifferenceToDistinctChar

  copying
  copy

  initialize-release
  initializeDictionary:minSize:

  private
  isAvailable:
isDistinctCharAvailable:
isWorseThanDistance:difference:relativeDifference:

  testing
  isAlert:
isReject:

class methods
  instance creation
  dictionary:
dictionary:minSize:

instance methods
  accessing top  
 

add:

Add a new lookup item to the result


 

addFeature:char:distance:

Construct new lookup item and add to result


 

addResult:

Add all the items of the other result to this result


 

at:

Answer my element at index anInteger. at: is used by a knowledgeable
client to access an existing element


 

char

return character at iterator position


 

charAt:


 

charType

Return type of character at iterator position


 

charTypeAt:


 

copyWithoutParentFeatures

Copy the result and eliminate all the features that are not in the base dictionary


 

correspondingKeystrokes

Return the corredponsing keystrokes of the charater at the iterator position


 

correspondingKeystrokesAt:


 

correspondingMouseEventsHand:position:buttons:


 

correspondingMouseEventsHand:position:buttons:at:


 

correspondsToKeystrokes

Does the character at the iterator positon correspond to a keystroke?


 

correspondsToKeystrokesAt:


 

correspondsToMouseEvents

Does the character at the iterator position corrpesond to a mouse event?


 

correspondsToMouseEventsAt:


 

dictionary


 

dictionary:


 

distance

Return the distance at the iterator position


 

distanceAt:


 

distanceDifference

Distance difference between best and second best match


 

distanceDifferenceFrom:to:

Distance difference between two matches identified by their position.


 

distanceDifferenceFrom:toDistinctChar:

Distance between two matches with different assigned characters!


 

distanceDifferenceToDistinctChar

Distance from the best match to the next best feature that is associated to
a distinct character


 

distinctCharItem:

Return the item of the n-th dictinct character


 

distinctCharSize

Number of matches with dictinct characters


 

eliminateParentFeatures

Eliminate all the features that are not included in the dictionary


 

evaluateCodeIn:

Evaluate the code of the character at the current iterator position


 

evaluateCodeIn:at:


 

feature

Feature at the iterator position


 

featureAt:


 

indexOfDistinctChar:

Index of the n-th distinct char


 

indexOfDistinctChar:startAt:

Index of the n-th dictinct char from startInteger


 

isCode

Is character at interator position code?


 

isCodeAt:


 

isCommand

Is character at interator position command?


 

isCommandAt:


 

isStrokes

Is character at interator position strokes?


 

isStrokesAt:


 

lookupIndex

Iterator position


 

lookupIndex:

iterator position


 

minSize

Minimum size (number of matches) of the result


 

minSize:

Minimum size (number of matches) of the result


 

nextDistinctCharMatch

Move the iterator to the next dictinct character


 

nextDistinctCharMatchRollover:

Move the iterator to the next dictinct character


 

nextMatch

Move the iterator to the next match


 

nextMatchRollover:

Move the iterator to the next match


 

normalizedCharAt:


 

relativeDistanceDifference


 

relativeDistanceDifferenceFrom:to:

Relative distance between two matches


 

relativeDistanceDifferenceFrom:toDistinctChar:


 

relativeDistanceDifferenceToDistinctChar


  copying top  
 

copy

Answer another instance just like the receiver. Subclasses typically
override this method; they typically do not override shallowCopy.


  initialize-release top  
 

initializeDictionary:minSize:


  private top  
 

isAvailable:

Does the instance contain at least indexNumber features?


 

isDistinctCharAvailable:

Does the instance contain at least indexNumber features that are assigned to a distinct
character? (Features assigned to the same character count only once)


 

isWorseThanDistance:difference:relativeDifference:

Determines wheter the lookup suffice to the given quality requirements:
1) The distance to the best match must be no more than distanceNumber
(distanceNumber is given in percent of the maximum distance).
2) The distance between the best and the second best match must be bigger than
diffNumber (distanceNumber is given in percent of the maximum distance)
OR:
The relative distance from the best to the second best match must be bigger
than relDiffNumber (relDiffNumber is given in percent).


  testing top  
 

isAlert:

Is match so bad (ambiguous) that user should be warned?


 

isReject:

Is match too bad (ambiguous) to be accepted?


class methods
  instance creation top  
 

dictionary:


 

dictionary:minSize: