SuperLU Distributed 8.2.1
Distributed memory sparse direct solver
etree.c File Reference

Elimination tree computation and layout routines. More...

#include <stdio.h>
#include <stdlib.h>
#include "superlu_ddefs.h"
Include dependency graph for etree.c:

Functions

static int_tmxCallocInt (int_t n)
 
static void initialize_disjoint_sets (int_t n, int_t **pp)
 
static int_t make_set (int_t i, int_t *pp)
 
static int_t link (int_t s, int_t t, int_t *pp)
 
static int_t find (int_t i, int_t *pp)
 
static void finalize_disjoint_sets (int_t *pp)
 
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...
 
static void etdfs (int_t v, int_t first_kid[], int_t next_kid[], int_t post[], int_t *postnum)
 
static void nr_etdfs (int_t n, int_t *parent, int_t *first_kid, int_t *next_kid, int_t *post, int_t postnum)
 
int_tTreePostorder_dist (int_t n, int_t *parent)
 

Variables

static int_tfirst_kid
 Depth-first search from vertext. More...
 
static int_tnext_kid
 
static int_tpost
 
static int_t postnum
 

Detailed Description

Elimination tree computation and layout routines.

Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy)

All rights reserved.

The source code is distributed under BSD license, see the file License.txt at the top-level directory.

 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

◆ etdfs()

static void etdfs ( int_t  v,
int_t  first_kid[],
int_t  next_kid[],
int_t  post[],
int_t postnum 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalize_disjoint_sets()

static void finalize_disjoint_sets ( int_t pp)
static
Here is the caller graph for this function:

◆ find()

static int_t find ( int_t  i,
int_t pp 
)
static
Here is the caller graph for this function:

◆ initialize_disjoint_sets()

static void initialize_disjoint_sets ( int_t  n,
int_t **  pp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ link()

static int_t link ( int_t  s,
int_t  t,
int_t pp 
)
static
Here is the caller graph for this function:

◆ make_set()

static int_t make_set ( int_t  i,
int_t pp 
)
static
Here is the caller graph for this function:

◆ mxCallocInt()

static int_t * mxCallocInt ( int_t  n)
static
Here is the caller graph for this function:

◆ nr_etdfs()

static void nr_etdfs ( int_t  n,
int_t parent,
int_t first_kid,
int_t next_kid,
int_t post,
int_t  postnum 
)
static
Here is the caller graph for this function:

◆ sp_coletree_dist()

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.
Here is the call graph for this function:

◆ sp_symetree_dist()

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.
Here is the call graph for this function:

◆ TreePostorder_dist()

int_t * TreePostorder_dist ( int_t  n,
int_t parent 
)
Here is the call graph for this function:

Variable Documentation

◆ first_kid

int_t* first_kid
static

Depth-first search from vertext.

 q = TreePostorder_dist (n, p);

 Postorder a tree.
 Input:
   p is a vector of parent pointers for a forest whose
       vertices are the integers 0 to n-1; p[root]==n.
 Output:
   q is a vector indexed by 0..n-1 such that q[i] is the
   i-th vertex in a postorder numbering of the tree.

       ( 2/7/95 modified by X.Li:
         q is a vector indexed by 0:n-1 such that vertex i is the
         q[i]-th vertex in a postorder numbering of the tree.
         That is, this is the inverse of the previous q. )

 In the child structure, lower-numbered children are represented
 first, so that a tree which is already numbered in postorder
 will not have its order changed.

 Written by John Gilbert, Xerox, 10 Dec 1990.
 Based on code written by John Gilbert at CMI in 1987.

◆ next_kid

int_t * next_kid
static

◆ post

int_t* post
static

◆ postnum

int_t postnum
static