Class: Coopy::Alignment
- Inherits:
-
Object
- Object
- Coopy::Alignment
- Defined in:
- lib/lib/coopy/alignment.rb
Instance Attribute Summary collapse
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#reference ⇒ Object
Returns the value of attribute reference.
Instance Method Summary collapse
- #a2b(a) ⇒ Object
- #add_index_columns(unit) ⇒ Object
- #b2a(b) ⇒ Object
- #count ⇒ Object
- #get_index_columns ⇒ Object
- #get_source ⇒ Object
- #get_source_header ⇒ Object
- #get_target ⇒ Object
- #get_target_header ⇒ Object
- #headers(ia, ib) ⇒ Object
-
#initialize ⇒ Alignment
constructor
A new instance of Alignment.
- #link(a, b) ⇒ Object
- #range(ha, hb) ⇒ Object
- #set_rowlike(flag) ⇒ Object
- #tables(ta, tb) ⇒ Object
- #to_order ⇒ Object
- #to_order_pruned(rowlike) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Alignment
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
#meta ⇒ Object
Returns the value of attribute meta.
37 38 39 |
# File 'lib/lib/coopy/alignment.rb', line 37 def @meta end |
#reference ⇒ Object
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 |
#count ⇒ Object
80 81 82 |
# File 'lib/lib/coopy/alignment.rb', line 80 def count return @map_count end |
#get_index_columns ⇒ Object
68 69 70 |
# File 'lib/lib/coopy/alignment.rb', line 68 def get_index_columns return @index_columns end |
#get_source ⇒ Object
96 97 98 |
# File 'lib/lib/coopy/alignment.rb', line 96 def get_source return @ta end |
#get_source_header ⇒ Object
104 105 106 |
# File 'lib/lib/coopy/alignment.rb', line 104 def get_source_header return @ia end |
#get_target ⇒ Object
100 101 102 |
# File 'lib/lib/coopy/alignment.rb', line 100 def get_target return @tb end |
#get_target_header ⇒ Object
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 |
#link(a, b) ⇒ Object
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_order ⇒ Object
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_s ⇒ Object
84 85 86 |
# File 'lib/lib/coopy/alignment.rb', line 84 def to_s return "" + "not implemented yet" end |