Class: Dphil::LDDataSet
- Inherits:
-
Object
- Object
- Dphil::LDDataSet
- Includes:
- LDOutput
- Defined in:
- lib/dphil/ld_data_set.rb
Instance Attribute Summary collapse
-
#matrix ⇒ Object
readonly
Returns the value of attribute matrix.
-
#trees ⇒ Object
readonly
Returns the value of attribute trees.
Instance Method Summary collapse
- #as_json(options = nil) ⇒ Object
-
#initialize(matrix:, trees:) ⇒ LDDataSet
constructor
A new instance of LDDataSet.
- #to_h ⇒ Object
Methods included from LDOutput
Constructor Details
#initialize(matrix:, trees:) ⇒ LDDataSet
Returns a new instance of LDDataSet.
9 10 11 12 |
# File 'lib/dphil/ld_data_set.rb', line 9 def initialize(matrix:, trees:) @matrix = matrix @trees = trees end |
Instance Attribute Details
#matrix ⇒ Object (readonly)
Returns the value of attribute matrix.
7 8 9 |
# File 'lib/dphil/ld_data_set.rb', line 7 def matrix @matrix end |
#trees ⇒ Object (readonly)
Returns the value of attribute trees.
7 8 9 |
# File 'lib/dphil/ld_data_set.rb', line 7 def trees @trees end |
Instance Method Details
#as_json(options = nil) ⇒ Object
21 22 23 |
# File 'lib/dphil/ld_data_set.rb', line 21 def as_json( = nil) to_h.as_json() end |
#to_h ⇒ Object
14 15 16 17 18 19 |
# File 'lib/dphil/ld_data_set.rb', line 14 def to_h { matrix: matrix, trees: trees, } end |