Class: Minimization::PointValuePair
- Inherits:
-
Object
- Object
- Minimization::PointValuePair
- Defined in:
- lib/multidim/point_value_pair.rb
Overview
class which holds the point,value pair
Instance Attribute Summary collapse
-
#point ⇒ Object
readonly
Returns the value of attribute point.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#get_point_clone ⇒ Object
returns a copy of the point.
-
#initialize(point, value) ⇒ PointValuePair
constructor
Parameters: * point: Coordinates of the point * value: Function value at the point.
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
#point ⇒ Object (readonly)
Returns the value of attribute point.
6 7 8 |
# File 'lib/multidim/point_value_pair.rb', line 6 def point @point end |
#value ⇒ Object
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_clone ⇒ Object
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 |