SuperLU_DIST  4.0
superlu_dist on CPU and GPU clusters
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
etree.c File Reference

Elimination tree computation and layout routines. More...

#include <stdio.h>
#include <stdlib.h>
#include "superlu_ddefs.h"

Functions

int sp_symetree_dist (int_t *acolst, int_t *acolend, int_t *arow, int_t n, int_t *parent)
 Symmetric elimination tree. More...
 
int sp_coletree_dist (int_t *acolst, int_t *acolend, int_t *arow, int_t nr, int_t nc, int_t *parent)
 Nonsymmetric elimination tree. More...
 
int_tTreePostorder_dist (int_t n, int_t *parent)
 

Detailed Description

Elimination tree computation and layout routines.

 Implementation of disjoint set union routines.
 Elements are integers in 0..n-1, and the 
 names of the sets themselves are of type int.
 Calls are:
 initialize_disjoint_sets (n) initial call.
 s = make_set (i)             returns a set containing only i.
 s = link (t, u)         returns s = t union u, destroying t and u.
 s = find (i)        return name of set containing i.
 finalize_disjoint_sets      final call.
 This implementation uses path compression but not weighted union.
 See Tarjan's book for details.
 John Gilbert, CMI, 1987.
 Implemented path-halving by XL 7/5/95.

Function Documentation

int sp_coletree_dist ( int_t acolst,
int_t acolend,
int_t arow,
int_t  nr,
int_t  nc,
int_t parent 
)

Nonsymmetric elimination tree.

     Find the elimination tree for A'*A.
     This uses something similar to Liu's algorithm. 
     It runs in time O(nz(A)*log n) and does not form A'*A.
     Input:
       Sparse matrix A.  Numeric values are ignored, so any
       explicit zeros are treated as nonzero.
     Output:
       Integer array of parents representing the elimination
       tree of the symbolic product A'*A.  Each vertex is a
       column of A, and nc means a root of the elimination forest.
     John R. Gilbert, Xerox, 10 Dec 1990
     Based on code by JRG dated 1987, 1988, and 1990.
int sp_symetree_dist ( int_t acolst,
int_t acolend,
int_t arow,
int_t  n,
int_t parent 
)

Symmetric elimination tree.

     p = spsymetree (A);
     Find the elimination tree for symmetric matrix A.
     This uses Liu's algorithm, and runs in time O(nz*log n).
     Input:
       Square sparse matrix A.  No check is made for symmetry;
       elements below and on the diagonal are ignored.
       Numeric values are ignored, so any explicit zeros are 
       treated as nonzero.
     Output:
       Integer array of parents representing the etree, with n
       meaning a root of the elimination forest.
     Note:  
       This routine uses only the upper triangle, while sparse
       Cholesky (as in spchol.c) uses only the lower.  Matlab's
       dense Cholesky uses only the upper.  This routine could
       be modified to use the lower triangle either by transposing
       the matrix or by traversing it by rows with auxiliary
       pointer and link arrays.
     John R. Gilbert, Xerox, 10 Dec 1990
     Based on code by JRG dated 1987, 1988, and 1990.
     Modified by X.S. Li, November 1999.
int_t* TreePostorder_dist ( int_t  n,
int_t parent 
)