Class: TSS::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/tss/link.rb

Overview

Class representing links(suffixes) between vertexes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vertex, end_index = nil) ⇒ Link

Create new ACT::Link object



22
23
24
25
26
# File 'lib/tss/link.rb', line 22

def initialize(vertex, end_index = nil)
  @vertex = vertex
  @char = @vertex.char
  @end_index = end_index
end

Instance Attribute Details

#charObject (readonly)

Character to simplify search



14
15
16
# File 'lib/tss/link.rb', line 14

def char
  @char
end

#end_indexObject

Index of word in dictionary if vertex is ending, or nil if vertex is suffix



18
19
20
# File 'lib/tss/link.rb', line 18

def end_index
  @end_index
end

#vertexObject

Linked vertex



11
12
13
# File 'lib/tss/link.rb', line 11

def vertex
  @vertex
end