Changeset 38939


Ignore:
Timestamp:
Sep 1, 2009, 2:00:36 AM (15 years ago)
Author:
hamish
Message:

G_math_solvps() should return something

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/branches/develbranch_6/lib/gmath/ccmath_grass_wrapper.c

    r38890 r38939  
    165165    return solv(a[0],b, n);
    166166}
     167
     168
    167169/**
    168170     \brief Solve a symmetric positive definite linear system S*x = b.
     
    171173     \param  b = array containing system vector b as input and solution vector x as output
    172174     \param  n = dimension of system
    173      \return: 0 -> normal exit 1 -> input matrix not positive definite
     175     \return: 0 -> normal exit; -1 -> input matrix not positive definite
    174176 */
    175177 int G_math_solvps(double **a,double *b,int n)
    176178{
    177     solvps(a[0], b,n);
    178 }
     179    return solvps(a[0], b,n);
     180}
     181
     182
    179183/**
    180184     \brief Solve a tridiagonal linear system M*x = y.
     
    192196    return;
    193197}
     198
     199
    194200/*
    195201     \brief Solve an upper right triangular linear system T*x = b.
     
    200206     \return value: f = status flag, with 0 -> normal exit, -1 -> system singular
    201207*/
    202 
    203208int G_math_solvru(double **a,double *b,int n)
    204209{
    205210    return solvru(a[0], b, n);
    206211}
     212
     213
    207214/**
    208215     \brief Invert (in place) a general real matrix A -> Inv(A).
    209 
    210216
    211217     \param  a = array containing the input matrix A. This is converted to the inverse matrix.
     
    217223    return minv(a[0], n);
    218224}
     225
     226
    219227/**
    220228     \brief Invert (in place) a symmetric real matrix, V -> Inv(V).
     
    230238}
    231239
    232 /**
    233 
     240
     241/**
    234242     \brief Invert an upper right triangular matrix T -> Inv(T).
    235 
    236243
    237244     \param  a = pointer to array of upper right triangular matrix, This is replaced by the inverse matrix.
     
    243250    return ruinv(a[0], n);
    244251}
     252
     253
    245254/*
    246255-----------------------------------------------------------------------------
     
    252261
    253262     \brief Compute the eigenvalues of a real symmetric matrix A.
    254 
    255263
    256264     \param  a = pointer to array of symmetric n by n input matrix A. The computation alters these values.
     
    263271    return;
    264272}
     273
     274
    265275/**
    266276     \brief Compute the eigenvalues and eigenvectors of a real symmetric matrix A.
     
    282292    return;
    283293}
     294
     295
    284296/*
    285297     \brief Compute the maximum (absolute) eigenvalue and corresponding eigenvector of a real symmetric matrix A.
     
    359371-------------------------------------------------------------------------------
    360372*/
     373
     374
    361375/**
    362376     \brief Compute the singular values of a real m by n matrix A.
     
    374388    return svdval(d, a[0], m, n);
    375389}
     390
     391
    376392/**
    377393
    378394     \brief Compute singular values when m >> n.
    379395
    380      
    381396     \param  d = pointer to double array of dimension n (output = singular values of A)
    382397     \param  a = pointer to store of the m by n input matrix A (A is altered by the computation)
     
    389404    return sv2val(d, a[0], m, n);
    390405}
     406
     407
    391408/*
    392409     \brief Compute the singular value transformation S = U~*A*V.
    393 
    394410     
    395411     \param  d = pointer to double array of dimension n (output = singular values of A)
     
    406422}
    407423
     424
    408425/**
    409426     \brief Compute the singular value transformation when m >> n.
    410 
    411427     
    412428     \param  d = pointer to double array of dimension n (output = singular values of A)
     
    422438    return sv2uv(d, a[0], u[0], m, v[0], n);
    423439}
     440
     441
    424442/**
    425443
    426444     \brief Compute the singular value transformation with A overloaded by the partial U-matrix.
    427 
    428445     
    429446     \param  d = pointer to double array of dimension n
Note: See TracChangeset for help on using the changeset viewer.