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

Utility functions. More...

#include "util.h"
#include "lin_alg.h"
#include "global_opts.h"
#include "string.h"
#include "types.h"

Functions

void c_strcpy (char dest[], const char source[])
 Custom string copy to avoid string.h library. More...
 
QPALMSettingscopy_settings (const QPALMSettings *settings)
 Copy settings creating a new settings structure. 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...
 

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

◆ update_status()

void update_status ( QPALMInfo info,
c_int  status_val 
)

Update solver status (value and string).

Parameters
infoQPALMInfo
status_valNew status value