Class: MOSAIK::Algorithm

Inherits:
Object
  • Object
show all
Defined in:
lib/mosaik/algorithm.rb

Overview

Base class for algorithms

Direct Known Subclasses

MOSAIK::Algorithms::Louvain

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options, graph)
  @options = options
  @graph = graph
end

Instance Attribute Details

#graphObject (readonly)

Returns the value of attribute graph.



8
9
10
# File 'lib/mosaik/algorithm.rb', line 8

def graph
  @graph
end

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/mosaik/algorithm.rb', line 8

def options
  @options
end

Instance Method Details

#callObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/mosaik/algorithm.rb', line 17

def call
  raise NotImplementedError
end

#validateObject



15
# File 'lib/mosaik/algorithm.rb', line 15

def validate; end