Class: Minimization::PointValuePair

Inherits:
Object
  • Object
show all
Defined in:
lib/multidim/point_value_pair.rb

Overview

class which holds the point,value pair

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(point, value) ⇒ PointValuePair

Parameters:

  • point: Coordinates of the point
  • value: Function value at the point


12
13
14
15
# File 'lib/multidim/point_value_pair.rb', line 12

def initialize(point, value)
  @point = point.clone
  @value  = value
end

Instance Attribute Details

#pointObject (readonly)

Returns the value of attribute point.



6
7
8
# File 'lib/multidim/point_value_pair.rb', line 6

def point
  @point
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/multidim/point_value_pair.rb', line 4

def value
  @value
end

Instance Method Details

#get_point_cloneObject

returns a copy of the point



18
19
20
# File 'lib/multidim/point_value_pair.rb', line 18

def get_point_clone
  return @point.clone
end