class ObjectTable::MaskedColumn
Constants
- EMPTY
Attributes
indices[RW]
parent[RW]
Public Class Methods
mask(parent, indices)
click to toggle source
# File lib/object_table/masked_column.rb, line 8 def self.mask(parent, indices) if parent.empty? masked = parent.slice(indices) else masked = parent.slice(false, indices) end if masked.rank <= 0 column = new(masked.typecode, 0) else column = cast(masked) end column.parent = parent column.indices = indices column end
Public Instance Methods
clone()
click to toggle source
# File lib/object_table/masked_column.rb, line 35 def clone return NArray.new(typecode, 0) if empty? NArray.cast(self).clone end
coerce_rev(other, operator)
click to toggle source
# File lib/object_table/masked_column.rb, line 40 def coerce_rev(other, operator) return other.send(operator, EMPTY) if empty? other.send(operator, NArray.cast(self)) end