numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class of hyper rectangle in DIRECT method. More...
Public Member Functions | |
rectangle (const variable_type &lower, const variable_type &upper, const value_type &value) | |
Constructor. | |
auto | dist () const -> const value_type & |
Get distance between center point and end point. | |
auto | divide (index_type dim, value_type lower, value_type upper, value_type value) const -> std::shared_ptr< rectangle > |
Divide this object and return the divided rectangle. | |
void | divide_in_place (index_type dim, value_type lower, value_type upper, value_type value) |
Divide this object in place. | |
auto | is_divided () const -> const std::vector< bool > & |
Get whether each dimension is divided. | |
auto | lower () const -> const variable_type & |
Get element-wise lower limit. | |
auto | upper () const -> const variable_type & |
Get element-wise upper limit. | |
auto | value () const -> const value_type & |
Get function value at the center. | |
Private Attributes | |
value_type | dist_ |
Distance between center point and end point. | |
std::vector< bool > | is_divided_ |
Whether each dimension is divided. | |
variable_type | lower_ |
Element-wise lower limit. | |
variable_type | upper_ |
Element-wise upper limit. | |
value_type | value_ |
Function value at the center. | |
Static Private Attributes | |
static const auto | half = static_cast<value_type>(0.5) |
Half. | |
Class of hyper rectangle in DIRECT method.
Definition at line 230 of file dividing_rectangles.h.
|
inline |
Constructor.
[in] | lower | Element-wise lower limit. |
[in] | upper | Element-wise upper limit. |
[in] | value | Function value at the center. |
Definition at line 239 of file dividing_rectangles.h.
|
inlinenodiscard |
Get distance between center point and end point.
Definition at line 279 of file dividing_rectangles.h.
|
inlinenodiscard |
Divide this object and return the divided rectangle.
[in] | dim | Dimension index. |
[in] | lower | New lower bound. |
[in] | upper | New upper bound. |
[in] | value | New value. |
Definition at line 327 of file dividing_rectangles.h.
|
inline |
Divide this object in place.
[in] | dim | Dimension index. |
[in] | lower | New lower bound. |
[in] | upper | New upper bound. |
[in] | value | New value. |
Definition at line 296 of file dividing_rectangles.h.
|
inlinenodiscard |
Get whether each dimension is divided.
Definition at line 270 of file dividing_rectangles.h.
|
inlinenodiscard |
Get element-wise lower limit.
Definition at line 252 of file dividing_rectangles.h.
|
inlinenodiscard |
Get element-wise upper limit.
Definition at line 261 of file dividing_rectangles.h.
|
inlinenodiscard |
Get function value at the center.
Definition at line 286 of file dividing_rectangles.h.
|
private |
Distance between center point and end point.
Definition at line 353 of file dividing_rectangles.h.
|
inlinestaticprivate |
Half.
Definition at line 337 of file dividing_rectangles.h.
|
private |
Whether each dimension is divided.
If all dimensions are divided once, flags are reset.
Definition at line 350 of file dividing_rectangles.h.
|
private |
Element-wise lower limit.
Definition at line 340 of file dividing_rectangles.h.
|
private |
Element-wise upper limit.
Definition at line 343 of file dividing_rectangles.h.
|
private |
Function value at the center.
Definition at line 356 of file dividing_rectangles.h.