Class: Glymour::Statistics::VariableContainer
- Inherits:
-
Object
- Object
- Glymour::Statistics::VariableContainer
- Defined in:
- lib/stats_module.rb
Instance Attribute Summary collapse
-
#number_unnamed ⇒ Object
readonly
Returns the value of attribute number_unnamed.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#variables ⇒ Object
Returns the value of attribute variables.
Instance Method Summary collapse
-
#initialize(table, variables = []) ⇒ VariableContainer
constructor
A new instance of VariableContainer.
Constructor Details
#initialize(table, variables = []) ⇒ VariableContainer
Returns a new instance of VariableContainer.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/stats_module.rb', line 7 def initialize(table, variables=[]) number_unnamed = 0 @table = table @variables = variables @variables.each do |var| var.variable_container = self var.set_intervals if var.num_classes var.name ||= "unnamed_variable#{number_unnamed += 1}" end end |
Instance Attribute Details
#number_unnamed ⇒ Object (readonly)
Returns the value of attribute number_unnamed.
4 5 6 |
# File 'lib/stats_module.rb', line 4 def number_unnamed @number_unnamed end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
4 5 6 |
# File 'lib/stats_module.rb', line 4 def table @table end |
#variables ⇒ Object
Returns the value of attribute variables.
5 6 7 |
# File 'lib/stats_module.rb', line 5 def variables @variables end |