scaling.h 778 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef SCALING_H
  2. # define SCALING_H
  3. # ifdef __cplusplus
  4. extern "C" {
  5. # endif // ifdef __cplusplus
  6. // Functions to scale problem data
  7. # include "types.h"
  8. # include "lin_alg.h"
  9. # include "constants.h"
  10. // Enable data scaling if EMBEDDED is disabled or if EMBEDDED == 2
  11. # if EMBEDDED != 1
  12. /**
  13. * Scale problem matrices
  14. * @param work Workspace
  15. * @return exitflag
  16. */
  17. c_int scale_data(OSQPWorkspace *work);
  18. # endif // if EMBEDDED != 1
  19. /**
  20. * Unscale problem matrices
  21. * @param work Workspace
  22. * @return exitflag
  23. */
  24. c_int unscale_data(OSQPWorkspace *work);
  25. /**
  26. * Unscale solution
  27. * @param work Workspace
  28. * @return exitflag
  29. */
  30. c_int unscale_solution(OSQPWorkspace *work);
  31. # ifdef __cplusplus
  32. }
  33. # endif // ifdef __cplusplus
  34. #endif // ifndef SCALING_H