bvls_module Module

Module for bvls.

History

  • Original code from http://www.netlib.org/lawson-hanson/all
  • Jacob Williams, Nov 2018 : refactored into a module. some code cleanup.

Uses

  • module~~bvls_module~~UsesGraph module~bvls_module bvls_module module~slsqp_kinds slsqp_kinds module~bvls_module->module~slsqp_kinds module~slsqp_support slsqp_support module~bvls_module->module~slsqp_support iso_fortran_env iso_fortran_env module~slsqp_kinds->iso_fortran_env module~slsqp_support->module~slsqp_kinds

Used by

  • module~~bvls_module~~UsedByGraph module~bvls_module bvls_module module~slsqp_core slsqp_core module~slsqp_core->module~bvls_module module~slsqp_module slsqp_module module~slsqp_module->module~slsqp_core

Subroutines

public subroutine bvls_wrapper(a, mda, m, n, b, x, rnorm, w, zz, mode, max_iter)

Call bvls, but matching the interface of the old nnls.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout), dimension(mda,n) :: a
integer, intent(in) :: mda
integer, intent(in) :: m
integer, intent(in) :: n
real(kind=wp), intent(inout), dimension(m) :: b
real(kind=wp), intent(out), dimension(n) :: x
real(kind=wp), intent(out) :: rnorm
real(kind=wp), intent(inout), dimension(n) :: w
real(kind=wp), intent(inout), dimension(m) :: zz
integer, intent(out) :: mode
integer, intent(in) :: max_iter

maximum number of iterations (if <=0, then 3*n is used)

public subroutine bvls(a, b, bnd, x, rnorm, nsetp, w, index, ierr, max_iter)

Given an m by n matrix, , and an m-vector, , compute an n-vector, , that solves the least squares problem:

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout), dimension(:,:) :: a

On entry A() contains the M by N matrix, A. On return A() contains the product matrix, Q*A, where Q is an M by M orthogonal matrix generated by this subroutine. The dimensions are M=size(A,1) and N=size(A,2).

real(kind=wp), intent(inout), dimension(:) :: b

On entry B() contains the M-vector, B. On return, B() contains Q*B. The same Q multiplies A.

real(kind=wp), intent(in), dimension(:,:) :: bnd

BND(1,J) is the lower bound for X(J). BND(2,J) is the upper bound for X(J).

Read more…
real(kind=wp), intent(out), dimension(:) :: x

On entry X() need not be initialized. On return, X() will contain the solution N-vector.

real(kind=wp), intent(out) :: rnorm

Euclidean norm of the residual vector, b - A*X.

integer, intent(out) :: nsetp

Indicates the number of components of the solution vector, X(), that are not at their constraint values.

real(kind=wp), intent(out), dimension(:) :: w

An N-array. On return, W() will contain the dual solution vector. Using Set definitions below:

Read more…
integer, intent(out), dimension(:) :: index

An INTEGER working array of size N. On exit the contents of this array define the sets P, Z, and F as follows:

Read more…
integer, intent(out) :: ierr

Indicates status on return:

Read more…
integer, intent(in) :: max_iter

maximum number of iterations (if <=0, then 3*n is used)