|
MTCT
Design Automation and Optimization for ETCS Railway Networks
|
A separation function together with the name it is known by. More...
#include <VSSModel.hpp>
Public Member Functions | |
| constexpr | SeparationFunction (std::string_view name, SeparationFunctionCallable function) |
| Names a separation function. | |
| constexpr std::string_view | get_name () const |
| Retrieves the name of the separation function. | |
| double | operator() (size_t i, size_t n) const |
| Computes the normalized position of a node. | |
A separation function together with the name it is known by.
Two solver runs that only differ in their separation functions are otherwise indistinguishable, because a callable cannot be written out. Hence every separation function carries a name, which is what identifies it wherever the settings of a run are reported, e.g. in the exported solver data.
|
inlineconstexpr |
Names a separation function.
| name | Name identifying the function, must not be empty and must outlive the object, e.g., a string literal. |
| function | The separation function itself, must not be empty. |
| std::invalid_argument | if the name or the function is empty. |
|
inlinenodiscardconstexpr |
Retrieves the name of the separation function.
|
inlinenodiscard |
Computes the normalized position of a node.
| i | Zero-based node index. |
| n | Total number of nodes. |