QPALM
A proximal augmented Lagrangian method for QPs.
Functions
util.h File Reference

Utility functions. More...

#include "types.h"
#include "constants.h"

Go to the source code of this file.

Functions

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

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.

Function Documentation

◆ c_strcpy()

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

Custom string copy to avoid string.h library.

Parameters
destDestination string
sourceSource string

◆ 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

◆ print_final_message()

void print_final_message ( QPALMWorkspace work)

Print final message as a box with info.

(Final residuals, objective function, runtime)

Parameters
workWorkspace

◆ print_header()

void print_header ( void  )

Print the header with QPALM version number and fields.

◆ 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

◆ qpalm_tic()

void qpalm_tic ( QPALMTimer t)

Start timer.

Parameters
tTimer object

◆ 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

◆ update_status()

void update_status ( QPALMInfo info,
c_int  status_val 
)

Update solver status (value and string).

Parameters
infoQPALMInfo
status_valNew status value