BCLS: Bound Constrained Least Squares

Version 0.1

lsqr.c File Reference

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#include <cblas.h>

Include dependency graph for lsqr.c:

Go to the source code of this file.

Defines

#define ZERO   0.0
#define ONE   1.0

Functions

static double d2norm (const double a, const double b)
static void dload (const int n, const double alpha, double x[])
void lsqr (int m, int n, void(*aprod)(int mode, int m, int n, double x[], double y[], void *UsrWrk), double damp, void *UsrWrk, double u[], double v[], double w[], double x[], double se[], double atol, double btol, double conlim, int itnlim, FILE *nout, int *istop_out, int *itn_out, double *anorm_out, double *acond_out, double *rnorm_out, double *arnorm_out, double *xnorm_out)


Detailed Description

ISO C version of LSQR.

This file is a "line-by-line" translation of Michael Saunders's F77 version to ISO C.

Definition in file lsqr.c.


Define Documentation

#define ONE   1.0

Definition at line 25 of file lsqr.c.

Referenced by lsqr().

#define ZERO   0.0

Definition at line 24 of file lsqr.c.

Referenced by lsqr().


Function Documentation

static double d2norm ( const double  a,
const double  b 
) [static]

Definition at line 34 of file lsqr.c.

Referenced by lsqr().

static void dload ( const int  n,
const double  alpha,
double  x[] 
) [static]

Examples:
/examples/bcsol.c.

Definition at line 47 of file lsqr.c.

Referenced by lsqr().

void lsqr ( int  m,
int  n,
void(*)(int mode, int m, int n, double x[], double y[], void *UsrWrk)  aprod,
double  damp,
void *  UsrWrk,
double  u[],
double  v[],
double  w[],
double  x[],
double  se[],
double  atol,
double  btol,
double  conlim,
int  itnlim,
FILE *  nout,
int *  istop_out,
int *  itn_out,
double *  anorm_out,
double *  acond_out,
double *  rnorm_out,
double *  arnorm_out,
double *  xnorm_out 
)

Definition at line 57 of file lsqr.c.

References cblas_dcopy(), cblas_dnrm2(), cblas_dscal(), d2norm(), dload(), ONE, and ZERO.

Referenced by bcls_newton_step_lsqr().

Here is the call graph for this function:

Generated on Sun Mar 4 22:50:03 2007 by Doxygen 1.5.1