| 441 | } |
| 442 | |
| 443 | int tiny_set_x0(TinySolver* solver, tinyVector x0) { |
| 444 | if (!solver) { |
| 445 | std::cout << "Error in tiny_set_x0: solver is nullptr" << std::endl; |
| 446 | return 1; |
| 447 | } |
| 448 | if (x0.rows() != solver->work->nx) { |
| 449 | perror("Error in tiny_set_x0: x0 is not the correct length"); |
| 450 | } |
| 451 | solver->work->x.col(0) = x0; |
| 452 | return 0; |
| 453 | } |
| 454 | |
| 455 | int tiny_set_x_ref(TinySolver* solver, tinyMatrix x_ref) { |
| 456 | if (!solver) { |