Class: Coopy::Alignment

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/coopy/alignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAlignment

Returns a new instance of Alignment.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/lib/coopy/alignment.rb', line 7

def initialize
  @map_a2b = {}
  @map_b2a = {}
  @ha = @hb = 0
  @map_count = 0
  @reference = nil
  @meta = nil
  @order_cache_has_reference = false
  @ia = 0
  @ib = 0
end

Instance Attribute Details

#metaObject

Returns the value of attribute meta.



37
38
39
# File 'lib/lib/coopy/alignment.rb', line 37

def meta
  @meta
end

#referenceObject

Returns the value of attribute reference.



36
37
38
# File 'lib/lib/coopy/alignment.rb', line 36

def reference
  @reference
end

Instance Method Details

#a2b(a) ⇒ Object



72
73
74
# File 'lib/lib/coopy/alignment.rb', line 72

def a2b(a)
  return @map_a2b[a]
end

#add_index_columns(unit) ⇒ Object



63
64
65
66
# File 'lib/lib/coopy/alignment.rb', line 63

def add_index_columns(unit)
  @index_columns = Array.new if @index_columns == nil
  @index_columns.push(unit)
end

#b2a(b) ⇒ Object



76
77
78
# File 'lib/lib/coopy/alignment.rb', line 76

def b2a(b)
  return @map_b2a[b]
end

#countObject



80
81
82
# File 'lib/lib/coopy/alignment.rb', line 80

def count 
  return @map_count
end

#get_index_columnsObject



68
69
70
# File 'lib/lib/coopy/alignment.rb', line 68

def get_index_columns 
  return @index_columns
end

#get_sourceObject



96
97
98
# File 'lib/lib/coopy/alignment.rb', line 96

def get_source 
  return @ta
end

#get_source_headerObject



104
105
106
# File 'lib/lib/coopy/alignment.rb', line 104

def get_source_header 
  return @ia
end

#get_targetObject



100
101
102
# File 'lib/lib/coopy/alignment.rb', line 100

def get_target 
  return @tb
end

#get_target_headerObject



108
109
110
# File 'lib/lib/coopy/alignment.rb', line 108

def get_target_header 
  return @ib
end

#headers(ia, ib) ⇒ Object



49
50
51
52
# File 'lib/lib/coopy/alignment.rb', line 49

def headers(ia,ib)
  @ia = ia
  @ib = ib
end


57
58
59
60
61
# File 'lib/lib/coopy/alignment.rb', line 57

def link(a,b)
  @map_a2b[a] = b
  @map_b2a[b] = a
  @map_count+=1
end

#range(ha, hb) ⇒ Object



39
40
41
42
# File 'lib/lib/coopy/alignment.rb', line 39

def range(ha,hb)
  @ha = ha
  @hb = hb
end

#set_rowlike(flag) ⇒ Object



54
55
# File 'lib/lib/coopy/alignment.rb', line 54

def set_rowlike(flag)
end

#tables(ta, tb) ⇒ Object



44
45
46
47
# File 'lib/lib/coopy/alignment.rb', line 44

def tables(ta,tb)
  @ta = ta
  @tb = tb
end

#to_orderObject



92
93
94
# File 'lib/lib/coopy/alignment.rb', line 92

def to_order 
  return self.to_order_cached(false,false)
end

#to_order_pruned(rowlike) ⇒ Object



88
89
90
# File 'lib/lib/coopy/alignment.rb', line 88

def to_order_pruned(rowlike)
  return self.to_order_cached(true,rowlike)
end

#to_sObject



84
85
86
# File 'lib/lib/coopy/alignment.rb', line 84

def to_s 
  return "" + "not implemented yet"
end