24 USE iso_c_binding,
ONLY :
c_float, c_double,
c_int, c_long, c_char, &
37#ifdef QPALM_FORTRAN_64BIT_INDICES
38 INTEGER,
PARAMETER :: integer_kind = c_long
40 INTEGER,
PARAMETER :: integer_kind =
c_int
43#ifdef QPALM_FORTRAN_SINGLE_PRECISION
51#ifdef LADEL_64BIT_INDICES
57#ifdef LADEL_SINGLE_PRECISION
79 TYPE,
BIND( C ),
PUBLIC :: QPALM_settings
83 INTEGER ( KIND = integer_kind_qpalm ) :: max_iter = 10000
87 INTEGER ( KIND = integer_kind_qpalm ) :: inner_max_iter = 100
139 INTEGER ( KIND = integer_kind_qpalm ) :: proximal = 1
155 INTEGER ( KIND = integer_kind_qpalm ) :: scaling = 10
159 INTEGER ( KIND = integer_kind_qpalm ) :: nonconvex = 0
163 INTEGER ( KIND = integer_kind_qpalm ) :: verbose = 1
167 INTEGER ( KIND = integer_kind_qpalm ) :: print_iter = 1
171 INTEGER ( KIND = integer_kind_qpalm ) :: warm_start = 0
175 INTEGER ( KIND = integer_kind_qpalm ) :: reset_newton_iter = 10000
180 INTEGER ( KIND = integer_kind_qpalm ) :: enable_dual_termination = 0
195 INTEGER ( KIND = integer_kind_qpalm ) :: ordering = 1
202 INTEGER ( KIND = integer_kind_qpalm ) :: factorization_method = 2
206 INTEGER ( KIND = integer_kind_qpalm ) :: max_rank_update = 160
211 max_rank_update_fraction = 0.1_real_kind_qpalm
221 TYPE,
BIND( C ),
PUBLIC :: QPALM_info
225 INTEGER ( KIND = integer_kind_qpalm ) :: iter
229 INTEGER ( KIND = integer_kind_qpalm ) :: iter_out
233 CHARACTER ( KIND = C_CHAR ),
DIMENSION( 31 ) :: status
245 INTEGER ( KIND = integer_kind_qpalm ) :: status_val
290 ane, arow, aptr, aval, cl, cu, settings, &
291 x, y, info ) bind( C, NAME = 'qpalm_fortran_c' )
299 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
VALUE :: n
303 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
VALUE :: m
308 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
VALUE :: hne
314 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
DIMENSION( hne ) :: hrow
320 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
DIMENSION( n + 1 ) :: hptr
325 REAL ( kind =
real_kind ),
INTENT( IN ),
DIMENSION( hne ) :: hval
329 REAL ( kind =
real_kind ),
INTENT( IN ),
DIMENSION( n ) :: g
333 REAL ( kind =
real_kind ),
INTENT( IN ),
VALUE :: f
337 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
VALUE :: ane
343 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
DIMENSION( ane ) :: arow
349 INTEGER ( KIND = integer_kind ),
INTENT( IN ),
DIMENSION( n + 1 ) :: aptr
354 REAL ( kind =
real_kind ),
INTENT( IN ),
DIMENSION( ane ) :: aval
359 REAL ( kind =
real_kind ),
INTENT( IN ),
DIMENSION( m ) :: cl
364 REAL ( kind =
real_kind ),
INTENT( IN ),
DIMENSION( m ) :: cu
373 REAL ( kind =
real_kind ),
INTENT( OUT ),
DIMENSION( n ) :: x
377 REAL ( kind =
real_kind ),
INTENT( OUT ),
DIMENSION( m ) :: y
ladel_int c_int
type for integer numbers
ladel_double c_float
type for floating point numbers
Fortran interface to the C package QPALM, with the aim to minimize the objective function.
real(kind=real_kind_qpalm), parameter ten
integer, parameter integer_kind_qpalm
integer, parameter real_kind
integer, parameter real_kind_qpalm
integer, parameter integer_kind
info derived type with component defaults bound to C’s QPALMInfo
settings derived type with component defaults bound to C’s QPALMSettings