#ifndef FILE_SPARSECHOLESKY #define FILE_SPARSECHOLESKY /* *************************************************************************/ /* File: sparsecholesky.hpp */ /* Author: Joachim Schoeberl */ /* Date: 18. Jun. 97 */ /* *************************************************************************/ /* sparse cholesky factorization */ /** A sparse cholesky factorization. The unknowns are reordered by the minimum degree ordering algorithm */ template class SparseCholesky : public BaseMatrix { int height, nze; // int *order, *lastinrow, *rowindex; MoveableMem order, lastinrow, rowindex; MoveableMem rowindexblock, rowindexbs, lastinrowblock; /// // TM *lfact; MoveableMem lfact; MoveableMem diag; /// BitArray * inner; ARRAY * cluster; /// MinimumDegreeOrdering * mdo; public: typedef typename mat_traits::TV_COL TV; typedef typename mat_traits::TV_ROW TVX; /// SparseCholesky (const SparseMatrix & a, BitArray * ainner = NULL, ARRAY * acluster = NULL); /// SparseCholesky (const ARRAY & aorder, const ARRAY & cliques, const ARRAY & vertices); /// ~SparseCholesky (); /// int VHeight() const { return height; } /// int VWidth() const { return height; } /// void Allocate (const ARRAY & aorder, const ARRAY & cliques, const ARRAY & vertices); /// void Factor (const int * blocknr); /// void FactorNew (const SparseMatrix & a); /// virtual void Mult (const BaseVector & x, BaseVector & y) const; /// virtual ostream & Print (ostream & ost) const; virtual void MemoryUsage (ARRAY & mu) const { mu.Append (new MemoryUsageStruct ("SparseChol", nze*sizeof(TM), 1)); } /// void Set (int i, int j, const TM & val); /// const TM & Get (int i, int j) const; /// void SetOrig (int i, int j, const TM & val) { Set (order[i], order[j], val); } virtual BaseVector * CreateVector () const { return new VVector (height); } }; #endif