![]() |
SuperSCS
1.3.2
|
Go to the source code of this file.
Data Structures | |
struct | scs_timer |
SCS timer structure. More... | |
Macros | |
#define | _POSIX_C_SOURCE 200112L |
Typedefs | |
typedef struct scs_timer | ScsTimer |
Functions | |
void | scs_tic (ScsTimer *timer) |
Starts the timer. More... | |
scs_float | scs_toc (ScsTimer *timer) |
Stops the timer. More... | |
scs_float | scs_strtoc (char *str, ScsTimer *timer) |
Stops the timer and prints a custom message. More... | |
scs_float | scs_toc_quiet (ScsTimer *timer) |
Stops the timer. More... | |
void | scs_print_cone_data (const ScsCone *RESTRICT cone) |
Prints the content of a Cone object. More... | |
void | scs_print_data (const ScsData *data) |
Prints the content of a Data object. More... | |
void | scs_print_work (const ScsWork *work) |
Prints the content of a Work object. More... | |
void | scs_print_array (const scs_float *RESTRICT arr, scs_int n, const char *RESTRICT name) |
Prints an array. More... | |
void | scs_set_default_settings (ScsData *RESTRICT data) |
Sets the settings to certain default values. More... | |
void | scs_set_restarted_broyden_settings (ScsData *RESTRICT data, scs_int broyden_memory) |
void | scs_set_anderson_settings (ScsData *RESTRICT data, scs_int anderson_memory) |
void | scs_set_tolerance (ScsData *RESTRICT data, scs_float tolerance) |
void | scs_set_memory (ScsData *RESTRICT data, scs_int memory) |
void | scs_free_sol (ScsSolution *RESTRICT sol) |
Frees the memory allocated for a Sol object. More... | |
void | scs_free_data (ScsData *RESTRICT data) |
void | scs_free_cone (ScsCone *RESTRICT cone) |
void | scs_free_data_cone (ScsData *RESTRICT d, ScsCone *RESTRICT k) |
Frees the memory allocate of a Data and a Cone object. More... | |
void | scs_free_info (ScsInfo *RESTRICT info) |
Frees the memory allocated for an Info object. More... | |
int | scs_special_print (scs_int print_mode, FILE *RESTRICT __stream, const char *RESTRICT __format,...) |
Custom print function for SCS. More... | |
#define _POSIX_C_SOURCE 200112L |
Frees the memory associated with an ScsCone structure
cone | pointer to cone |
Frees the memory associated with an ScsData structure.
data | pointer to data |
Frees the memory allocate of a Data and a Cone object.
Frees the memory allocated for an Info object.
info | pointer to allocated ScsInfo structure |
void scs_free_sol | ( | ScsSolution *RESTRICT | sol | ) |
Frees the memory allocated for a Sol object.
sol | pointer to allocated ScsSolution structure |
Prints an array.
arr | pointer to array |
n | length of array |
name | name of the array |
Prints the content of a Cone object.
cone | pointer to cone |
void scs_print_data | ( | const ScsData * | data | ) |
Prints the content of a Data object.
data | pointer to data |
void scs_print_work | ( | const ScsWork * | work | ) |
Prints the content of a Work object.
work | pointer to work |
Calls scs_set_default_settings and sets the direction to anderson_acceleration and the memory to a specified value.
2
and the given memory. k0
to 1
data | pointer to data |
anderson_memory | desired memory length |
Sets the settings to certain default values.
data | Pointer to data |
1
, then you should not use this function. If you really want to use it, however, you should set the parameter previous_max_iters to the maximum number of iterations you used in the previous run. This is in order to avoid memory management errors.0
, you may ignore this warning.Sets the memory for limited-memory quasi-Newtonian direction methods.
memory
is below 2
the memory is set to 2
. memory
is higher than the problem dimension, the memory is saturated to exactly the problem dimension. This rule applies to the Anderson acceleration method. It is not advisable to use too high memory values.data | pointer to data |
memory | memory length |
Calls scs_set_default_settings and sets the direction to restarted_broyden and the memory to a specified value.
2
and the given memory. k0
to 0
data | pointer to data |
broyden_memory | desired memory length |
Sets the tolerance to a given value.
10 * DBL_EPSILON
.10 * DBL_EPSILON
, the tolerance is set to 10 * DBL_EPSILON
.1e-14
to 5e-2
.data | pointer to data |
tolerance | desired tolerance |
int scs_special_print | ( | scs_int | print_mode, |
FILE *RESTRICT | __stream, | ||
const char *RESTRICT | __format, | ||
... | |||
) |
Custom print function for SCS.
This functions allows to print in different streams. The argument print_mode
specifies whether it is allowed to override the default stream and use a print function other than printf
.
For example, if SCS is interfaced via a MEX function, MATLAB expects to use printf
exclusively which it then delegated to mexPrintf
; a function that prints the program's output to the console of MATLAB.
When SCS is called from other software, it is likely that print_mode
has to be set to 0.
print_mode | whether to override the default behavior (using printf ) |
__stream | an output stream |
__format | string format |
... | arguments specifying data to print |
print
or vfprintf
Stops the timer and prints a custom message.
str | string |
timer | pointer to timer structure |
void scs_tic | ( | ScsTimer * | timer | ) |
Starts the timer.
timer | pointer to timer structure |
Stops the timer.
This function prints a message of the form:
to the standard output using printf
.
timer | pointer to timer structure |