Class: Distem::Algorithm::Algorithm

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

Overview

Interface that give the way Algorithms should work

Direct Known Subclasses

Network::TCAlgorithm

Instance Method Summary (collapse)

Constructor Details

- (Algorithm) initialize

Returns a new instance of Algorithm



7
8
# File 'lib/distem/algorithm/algorithm.rb', line 7

def initialize()
end

Instance Method Details

- (Object) apply(resource)

Apply the algorithm on a resource



11
12
13
# File 'lib/distem/algorithm/algorithm.rb', line 11

def apply(resource)
  undo(resource)
end

- (Object) undo(resource)

Undo the algorithm on a resource



16
17
# File 'lib/distem/algorithm/algorithm.rb', line 16

def undo(resource)
end