Class: MOSAIK::Algorithm
- Inherits:
-
Object
- Object
- MOSAIK::Algorithm
- Defined in:
- lib/mosaik/algorithm.rb
Overview
Base class for algorithms
Direct Known Subclasses
Instance Attribute Summary collapse
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options, graph) ⇒ Algorithm
constructor
A new instance of Algorithm.
- #validate ⇒ Object
Constructor Details
#initialize(options, graph) ⇒ Algorithm
Returns a new instance of Algorithm.
10 11 12 13 |
# File 'lib/mosaik/algorithm.rb', line 10 def initialize(, graph) @options = @graph = graph end |
Instance Attribute Details
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
8 9 10 |
# File 'lib/mosaik/algorithm.rb', line 8 def graph @graph end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/mosaik/algorithm.rb', line 8 def @options end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'lib/mosaik/algorithm.rb', line 17 def call raise NotImplementedError end |
#validate ⇒ Object
15 |
# File 'lib/mosaik/algorithm.rb', line 15 def validate; end |