Module Algorithms::SimulatedAnnealing::Support
In: lib/algorithms/simulated_annealing.rb

Methods

Public Instance methods

Apply the given transition to your current object.

[Source]

# File lib/algorithms/simulated_annealing.rb, line 166
          def apply_transition ( transition )
            raise NotImplementedError
          end

Return a transition which can be applied by apply_transition.

[Source]

# File lib/algorithms/simulated_annealing.rb, line 152
          def choose_transition ( generator=nil )
            raise NotImplementedError
          end

This method should return the copy of the current solution it will be called to save the best solution (argmin).

[Source]

# File lib/algorithms/simulated_annealing.rb, line 174
          def copy_of_the_current_solution
            raise NotImplementedError
          end

[Source]

# File lib/algorithms/simulated_annealing.rb, line 145
      def included ( aModule )

        aModule.module_eval do

          #
          # Return a transition which can be applied by apply_transition.
          #
          def choose_transition ( generator=nil )
            raise NotImplementedError
          end

          #
          # Return a cost difference
          #
          def transition_cost ( current_cost, transition )
            raise NotImplementedError
          end

          #
          # Apply the given transition to your current object.
          #
          def apply_transition ( transition )
            raise NotImplementedError
          end

          #
          # This method should return the copy of the current solution
          # it will be called to save the best solution (argmin).
          #
          def copy_of_the_current_solution
            raise NotImplementedError
          end

        end

      end

Return a cost difference

[Source]

# File lib/algorithms/simulated_annealing.rb, line 159
          def transition_cost ( current_cost, transition )
            raise NotImplementedError
          end

[Validate]