/* 

$Id: zsuperlu_type.h,v 1.3 2003/12/15 16:52:22 pletzer Exp $ 

*/
#ifndef _ZSUPERLU_TYPE
#define _ZSUPERLU_TYPE

#include "zsp_defs.h"

typedef struct {

  SuperMatrix A, AC;
  SuperMatrix *L, *U;
  int *perm_r; /* row permutations from partial pivoting */
  int *perm_c; /* column permutation vector */
  int *etree; /* column elimination tree */
  superlu_options_t options;
  SuperLUStat_t stat;
  int colperm_is_computed;
  int LUfactorized;

} zsuperlu_sparse_type;

void zsuperlu_new_(zsuperlu_sparse_type **self,
		   doublecomplex *vals,
		   int *row_ind, int *col_ptr,
		   int *nnz, int *n, int *info);
void zsuperlu_del_(zsuperlu_sparse_type **self, int *info);

void zsuperlu_vector_dot_matrix_(zsuperlu_sparse_type **self, 
				doublecomplex *vector, doublecomplex *res,
				 int *info);
void zsuperlu_conj_vector_dot_matrix_(zsuperlu_sparse_type **self, 
				doublecomplex *vector, doublecomplex *res,
				      int *info);
void zsuperlu_matrix_dot_vector_(zsuperlu_sparse_type **self,
				doublecomplex *vector, doublecomplex *res,
				 int *info);
void zsuperlu_vector_dot_matrix_dot_vector_(zsuperlu_sparse_type **self, 
				doublecomplex *vector1, doublecomplex *vector2,
					    doublecomplex *res, int *info);
void zsuperlu_conj_vector_dot_matrix_dot_vector_(zsuperlu_sparse_type **self,
				doublecomplex *vector1, doublecomplex *vector2,
						 doublecomplex *res, int *info);


void zsuperlu_colperm_(zsuperlu_sparse_type **self, 
		       int *permc_spec, int *info);
void zsuperlu_lu_(zsuperlu_sparse_type **self, int *info);
void zsuperlu_determinant_(zsuperlu_sparse_type **self,
			   doublecomplex *res, int *info);
void zsuperlu_solve_(zsuperlu_sparse_type **self, 
		     doublecomplex *b, int *info);



#endif /* _ZSUPERLU_TYPE */
