Class: DancingLinks::SparseMatrix::SparseMatrixRoot

Inherits:
SparseMatrixNode show all
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

Attributes inherited from SparseMatrixNode

#down, #header, #left, #right, #row_num, #up

Instance Method Summary collapse

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

#countObject

Returns the value of attribute count.



88
89
90
# File 'lib/dancing_links.rb', line 88

def count
  @count
end