Class: DancingLinks::SparseMatrix::SparseMatrixRoot
- Inherits:
-
SparseMatrixNode
- Object
- SparseMatrixNode
- DancingLinks::SparseMatrix::SparseMatrixRoot
- Defined in:
- lib/dancing_links.rb
Overview
The class for the root node of the matrix. Adds one attribute that is needed
by the root node.
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
Attributes inherited from SparseMatrixNode
#down, #header, #left, #right, #row_num, #up
Instance Method Summary collapse
-
#initialize(*args) ⇒ SparseMatrixRoot
constructor
A new instance of SparseMatrixRoot.
Constructor Details
#initialize(*args) ⇒ SparseMatrixRoot
Returns a new instance of SparseMatrixRoot.
84 85 86 87 |
# File 'lib/dancing_links.rb', line 84 def initialize *args super( -1, nil, *args ) @count = 0 end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
88 89 90 |
# File 'lib/dancing_links.rb', line 88 def count @count end |