QPALM main
Proximal Augmented Lagrangian method for Quadratic Programs
Loading...
Searching...
No Matches
Functions
util.c 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.c.

#include <qpalm/util.h>
#include <qpalm/lin_alg.h>
#include <qpalm/global_opts.h>
#include <qpalm/types.h>
#include <string.h>
#include <stdio.h>
+ Include dependency graph for util.c:

Go to the source code of this file.

Functions

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

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

Definition at line 19 of file util.c.

+ Here is the caller graph for this function:

◆ 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:

◆ 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: