File: point_value_pair.rb

package info (click to toggle)
ruby-minimization 0.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 232 kB
  • sloc: ruby: 1,243; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Minimization
  # class which holds the point,value pair
  class PointValuePair
    attr_reader   :value
    attr_accessor :value
    attr_reader   :point

    # == Parameters:
    # * <tt>point</tt>: Coordinates of the point
    # * <tt>value</tt>: Function value at the point
    #
    def initialize(point, value)
      @point = point.clone
      @value  = value
    end

    # returns a copy of the point
    def get_point_clone
      return @point.clone
    end
  end
end