QPALM main
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
Functions
util.h File Reference

Detailed Description

Utility functions.

Author
Ben Hermans

This file contains some utility functions, to copy the settings, to update the solver status, to print information and to time the algorithm.

Definition in file util.h.

#include <qpalm/types.h>
#include <qpalm/constants.h>
+ Include dependency graph for util.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

QPALMSettingscopy_settings (const QPALMSettings *settings)
 Copy settings creating a new settings structure.
 
void c_strcpy (char dest[], const char source[])
 Custom string copy to avoid string.h library.
 
void update_status (QPALMInfo *info, c_int status_val)
 Update solver status (value and string).
 
void print_header (void)
 Print the header with QPALM version number and fields.
 
void print_iteration (c_int iter, QPALMWorkspace *work)
 Print information about the current iteration.
 
void print_final_message (QPALMWorkspace *work)
 Print final message as a box with info.
 
void qpalm_tic (QPALMTimer *t)
 Start timer.
 
c_float qpalm_toc (QPALMTimer *t)
 Report time in seconds since last call to qpalm_tic.
 

Function Documentation

◆ copy_settings()

QPALMSettings * copy_settings ( const QPALMSettings settings)

Copy settings creating a new settings structure.

Warning
This function uses malloc.
Parameters
settingsSettings to be copied
Returns
New settings structure

Definition at line 25 of file util.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ c_strcpy()

void c_strcpy ( char  dest[],
const char  source[] 
)

Custom string copy to avoid string.h library.

Parameters
destDestination string
sourceSource string

Definition at line 19 of file util.c.

+ Here is the caller graph for this function:

◆ update_status()

void update_status ( QPALMInfo info,
c_int  status_val 
)

Update solver status (value and string).

Parameters
infoQPALMInfo
status_valNew status value

Definition at line 62 of file util.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_header()

void print_header ( void  )

Print the header with QPALM version number and fields.

Definition at line 111 of file util.c.

◆ print_iteration()

void print_iteration ( c_int  iter,
QPALMWorkspace work 
)

Print information about the current iteration.

(Residuals, stepsize and objective value)

Parameters
iterThe current iteration number
workWorkspace

Definition at line 117 of file util.c.

+ Here is the caller graph for this function:

◆ print_final_message()

void print_final_message ( QPALMWorkspace work)

Print final message as a box with info.

(Final residuals, objective function, runtime)

Parameters
workWorkspace

Definition at line 125 of file util.c.

+ Here is the call graph for this function:

◆ qpalm_tic()

void qpalm_tic ( QPALMTimer t)

Start timer.

Parameters
tTimer object
+ Here is the caller graph for this function:

◆ qpalm_toc()

c_float qpalm_toc ( QPALMTimer t)

Report time in seconds since last call to qpalm_tic.

Parameters
tTimer object
Returns
Reported time in seconds
+ Here is the caller graph for this function: