Class: Alf::Algebra::Rank
- Inherits:
-
Object
- Object
- Alf::Algebra::Rank
- Includes:
- Operator, Relational, Unary
- Defined in:
- lib/alf/algebra/operator/rank.rb
Instance Attribute Summary
Attributes included from Operator
Instance Method Summary collapse
Methods included from Unary
included, #operand, #with_operand
Methods included from Relational
Methods included from Support::Registry
#each, #listen, #listeners, #register, #registered
Methods included from Operator
#==, #dup, #hash, included, #initialize, #signature, #to_cog, #to_lispy, #to_relvar, #to_s, #type_check, #with_operands
Methods included from TypeCheck
#joinable_headings!, #no_name_clash!, #same_heading!, #type_check_error!, #valid_ordering!
Methods included from Operand
#attr_list, coerce, #resulting_type, #to_ascii_tree, #to_cog, #to_relation, #type_check
Instance Method Details
#heading ⇒ Object
13 14 15 |
# File 'lib/alf/algebra/operator/rank.rb', line 13 def heading @heading ||= operand.heading.merge(as => Integer) end |
#keys ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/alf/algebra/operator/rank.rb', line 17 def keys @keys ||= begin keys, selectors = operand.keys, order.to_attr_list if keys.any?{|k| k.subset_of?(selectors) } keys + [ AttrList[as] ] else keys end end end |