| 1117 | } |
| 1118 | |
| 1119 | double uno_get_primal_solution_component(void* solver, uno_int index) { |
| 1120 | const Result* result = uno_get_result(solver); |
| 1121 | // shift the index with the base indexing |
| 1122 | index -= result->base_indexing; |
| 1123 | const size_t unsigned_index = static_cast<size_t>(index); |
| 1124 | if (index < 0 || result->number_variables <= unsigned_index) { |
| 1125 | throw std::runtime_error("The index is not valid."); |
| 1126 | } |
| 1127 | return result->primal_solution[unsigned_index]; |
| 1128 | } |
| 1129 | |
| 1130 | double uno_get_constraint_dual_solution_component(void* solver, uno_int index) { |
| 1131 | const Result* result = uno_get_result(solver); |
nothing calls this directly
no test coverage detected