~ubuntu-branches/ubuntu/lucid/python-scipy/lucid

« back to all changes in this revision

Viewing changes to Lib/sandbox/pysparse/umfpack/umfpack_free_numeric.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ========================================================================== */
 
2
/* === UMFPACK_free_numeric ================================================= */
 
3
/* ========================================================================== */
 
4
 
 
5
/* -------------------------------------------------------------------------- */
 
6
/* UMFPACK Version 4.1 (Apr. 30, 2003), Copyright (c) 2003 by Timothy A.      */
 
7
/* Davis.  All Rights Reserved.  See ../README for License.                   */
 
8
/* email: davis@cise.ufl.edu    CISE Department, Univ. of Florida.            */
 
9
/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */
 
10
/* -------------------------------------------------------------------------- */
 
11
 
 
12
/*  User-callable.  Free the entire Numeric object (consists of 11 to 13
 
13
 *  malloc'd objects.  See UMFPACK_free_numeric.h for details.
 
14
 */
 
15
 
 
16
#include "umf_internal.h"
 
17
#include "umf_free.h"
 
18
 
 
19
GLOBAL void UMFPACK_free_numeric
 
20
(
 
21
    void **NumericHandle
 
22
)
 
23
{
 
24
 
 
25
    NumericType *Numeric ;
 
26
    if (!NumericHandle)
 
27
    {
 
28
        return ;
 
29
    }
 
30
    Numeric = *((NumericType **) NumericHandle) ;
 
31
    if (!Numeric)
 
32
    {
 
33
        return ;
 
34
    }
 
35
 
 
36
    /* these 9 objects always exist */
 
37
    (void) UMF_free ((void *) Numeric->D) ;
 
38
    (void) UMF_free ((void *) Numeric->Rperm) ;
 
39
    (void) UMF_free ((void *) Numeric->Cperm) ;
 
40
    (void) UMF_free ((void *) Numeric->Lpos) ;
 
41
    (void) UMF_free ((void *) Numeric->Lilen) ;
 
42
    (void) UMF_free ((void *) Numeric->Lip) ;
 
43
    (void) UMF_free ((void *) Numeric->Upos) ;
 
44
    (void) UMF_free ((void *) Numeric->Uilen) ;
 
45
    (void) UMF_free ((void *) Numeric->Uip) ;
 
46
 
 
47
    /* Rs does not exist if scaling was not performed */
 
48
    (void) UMF_free ((void *) Numeric->Rs) ;
 
49
 
 
50
    /* Upattern can only exist for singular or rectangular matrices */
 
51
    (void) UMF_free ((void *) Numeric->Upattern) ;
 
52
 
 
53
    /* these 2 objects always exist */
 
54
    (void) UMF_free ((void *) Numeric->Memory) ;
 
55
    (void) UMF_free ((void *) Numeric) ;
 
56
 
 
57
    *NumericHandle = (void *) NULL ;
 
58
}