CSparse.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 2004-2012 David Bateman
00004 Copyright (C) 1998-2004 Andy Adler
00005 
00006 This file is part of Octave.
00007 
00008 Octave is free software; you can redistribute it and/or modify it
00009 under the terms of the GNU General Public License as published by the
00010 Free Software Foundation; either version 3 of the License, or (at your
00011 option) any later version.
00012 
00013 Octave is distributed in the hope that it will be useful, but WITHOUT
00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00015 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00016 for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with Octave; see the file COPYING.  If not, see
00020 <http://www.gnu.org/licenses/>.
00021 
00022 */
00023 
00024 #if !defined (octave_CSparse_h)
00025 #define octave_CSparse_h 1
00026 
00027 #include "dMatrix.h"
00028 #include "dNDArray.h"
00029 #include "CNDArray.h"
00030 #include "dColVector.h"
00031 #include "CColVector.h"
00032 #include "oct-cmplx.h"
00033 
00034 #include "DET.h"
00035 #include "MSparse.h"
00036 #include "MSparse-defs.h"
00037 #include "Sparse-op-defs.h"
00038 #include "MatrixType.h"
00039 
00040 class PermMatrix;
00041 class DiagMatrix;
00042 class ComplexDiagMatrix;
00043 class SparseMatrix;
00044 class SparseBoolMatrix;
00045 
00046 class
00047 OCTAVE_API
00048 SparseComplexMatrix : public MSparse<Complex>
00049 {
00050 public:
00051 
00052   typedef void (*solve_singularity_handler) (double rcond);
00053 
00054   SparseComplexMatrix (void) : MSparse<Complex> () { }
00055 
00056   SparseComplexMatrix (octave_idx_type r, octave_idx_type c) : MSparse<Complex> (r, c) { }
00057 
00058   SparseComplexMatrix (const dim_vector& dv, octave_idx_type nz = 0) :
00059     MSparse<Complex> (dv, nz) { }
00060 
00061   explicit SparseComplexMatrix (octave_idx_type r, octave_idx_type c, Complex val)
00062     : MSparse<Complex> (r, c, val) { }
00063 
00064   SparseComplexMatrix (octave_idx_type r, octave_idx_type c, double val)
00065     : MSparse<Complex> (r, c, Complex (val)) { }
00066 
00067   SparseComplexMatrix (const SparseComplexMatrix& a)
00068     : MSparse<Complex> (a) { }
00069 
00070   SparseComplexMatrix (const SparseComplexMatrix& a, const dim_vector& dv)
00071     : MSparse<Complex> (a, dv) { }
00072 
00073   SparseComplexMatrix (const MSparse<Complex>& a) : MSparse<Complex> (a) { }
00074 
00075   SparseComplexMatrix (const Sparse<Complex>& a) : MSparse<Complex> (a) { }
00076 
00077   explicit SparseComplexMatrix (const ComplexMatrix& a)
00078     : MSparse<Complex> (a) { }
00079 
00080   explicit SparseComplexMatrix (const ComplexNDArray& a)
00081     : MSparse<Complex> (a) { }
00082 
00083   SparseComplexMatrix (const Array<Complex>& a, const idx_vector& r,
00084                        const idx_vector& c, octave_idx_type nr = -1,
00085                        octave_idx_type nc = -1, bool sum_terms = true,
00086                        octave_idx_type nzm = -1)
00087     : MSparse<Complex> (a, r, c, nr, nc, sum_terms, nzm) { }
00088 
00089   explicit SparseComplexMatrix (const SparseMatrix& a);
00090 
00091   explicit SparseComplexMatrix (const SparseBoolMatrix& a);
00092 
00093   explicit SparseComplexMatrix (const ComplexDiagMatrix& a);
00094 
00095   SparseComplexMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
00096     : MSparse<Complex> (r, c, num_nz) { }
00097 
00098   SparseComplexMatrix& operator = (const SparseComplexMatrix& a)
00099     {
00100       MSparse<Complex>::operator = (a);
00101       return *this;
00102     }
00103 
00104   bool operator == (const SparseComplexMatrix& a) const;
00105   bool operator != (const SparseComplexMatrix& a) const;
00106 
00107   bool is_hermitian (void) const;
00108 
00109   SparseComplexMatrix max (int dim = -1) const;
00110   SparseComplexMatrix max (Array<octave_idx_type>& index, int dim = -1) const;
00111   SparseComplexMatrix min (int dim = -1) const;
00112   SparseComplexMatrix min (Array<octave_idx_type>& index, int dim = -1) const;
00113 
00114   SparseComplexMatrix& insert (const SparseComplexMatrix& a, octave_idx_type r, octave_idx_type c);
00115   SparseComplexMatrix& insert (const SparseMatrix& a, octave_idx_type r, octave_idx_type c);
00116   SparseComplexMatrix& insert (const SparseComplexMatrix& a, const Array<octave_idx_type>& indx);
00117   SparseComplexMatrix& insert (const SparseMatrix& a, const Array<octave_idx_type>& indx);
00118 
00119   SparseComplexMatrix concat (const SparseComplexMatrix& rb,
00120                               const Array<octave_idx_type>& ra_idx);
00121   SparseComplexMatrix concat (const SparseMatrix& rb,
00122                               const Array<octave_idx_type>& ra_idx);
00123 
00124   ComplexMatrix matrix_value (void) const;
00125 
00126   SparseComplexMatrix hermitian (void) const;  // complex conjugate transpose
00127   SparseComplexMatrix transpose (void) const
00128     { return MSparse<Complex>::transpose (); }
00129 
00130   friend SparseComplexMatrix conj (const SparseComplexMatrix& a);
00131 
00132   // extract row or column i.
00133 
00134   ComplexRowVector row (octave_idx_type i) const;
00135 
00136   ComplexColumnVector column (octave_idx_type i) const;
00137 
00138 private:
00139   SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info,
00140                                 double& rcond, const bool force = false,
00141                                 const bool calccond = true) const;
00142 
00143   SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info,
00144                                 double& rcond, const bool force = false,
00145                                 const bool calccond = true) const;
00146 
00147 public:
00148   SparseComplexMatrix inverse (void) const;
00149   SparseComplexMatrix inverse (MatrixType& mattype) const;
00150   SparseComplexMatrix inverse (MatrixType& mattype,
00151                                octave_idx_type& info) const;
00152   SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info,
00153                                double& rcond, int force = 0,
00154                                int calc_cond = 1) const;
00155 
00156   ComplexDET determinant (void) const;
00157   ComplexDET determinant (octave_idx_type& info) const;
00158   ComplexDET determinant (octave_idx_type& info, double& rcond,
00159                                 int calc_cond = 1) const;
00160 
00161 private:
00162   // Diagonal matrix solvers
00163   ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
00164                 double& rcond, solve_singularity_handler sing_handler,
00165                 bool calc_cond = false) const;
00166 
00167   ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b,
00168                 octave_idx_type& info, double& rcond,
00169                 solve_singularity_handler sing_handler,
00170                 bool calc_cond = false) const;
00171 
00172   SparseComplexMatrix dsolve (MatrixType &typ, const SparseMatrix& b,
00173                 octave_idx_type& info, double& rcond,
00174                 solve_singularity_handler sing_handler,
00175                 bool calc_cond = false) const;
00176 
00177   SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b,
00178                 octave_idx_type& info, double& rcond,
00179                 solve_singularity_handler sing_handler,
00180                 bool calc_cond = false) const;
00181 
00182   // Upper triangular matrix solvers
00183   ComplexMatrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
00184                 double& rcond, solve_singularity_handler sing_handler,
00185                 bool calc_cond = false) const;
00186 
00187   ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b,
00188                 octave_idx_type& info, double& rcond,
00189                 solve_singularity_handler sing_handler,
00190                 bool calc_cond = false) const;
00191 
00192   SparseComplexMatrix utsolve (MatrixType &typ, const SparseMatrix& b,
00193                 octave_idx_type& info, double& rcond,
00194                 solve_singularity_handler sing_handler,
00195                 bool calc_cond = false) const;
00196 
00197   SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b,
00198                 octave_idx_type& info, double& rcond,
00199                 solve_singularity_handler sing_handler,
00200                 bool calc_cond = false) const;
00201 
00202   // Lower triangular matrix solvers
00203   ComplexMatrix ltsolve (MatrixType &typ, const Matrix& b,
00204                 octave_idx_type& info, double& rcond,
00205                 solve_singularity_handler sing_handler,
00206                 bool calc_cond = false) const;
00207 
00208   ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b,
00209                 octave_idx_type& info, double& rcond,
00210                 solve_singularity_handler sing_handler,
00211                 bool calc_cond = false) const;
00212 
00213   SparseComplexMatrix ltsolve (MatrixType &typ, const SparseMatrix& b,
00214                 octave_idx_type& info, double& rcond,
00215                 solve_singularity_handler sing_handler,
00216                 bool calc_cond = false) const;
00217 
00218   SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b,
00219                 octave_idx_type& info, double& rcond,
00220                 solve_singularity_handler sing_handler,
00221                 bool calc_cond = false) const;
00222 
00223   // Tridiagonal matrix solvers
00224   ComplexMatrix trisolve (MatrixType &typ, const Matrix& b,
00225                 octave_idx_type& info, double& rcond,
00226                 solve_singularity_handler sing_handler,
00227                 bool calc_cond = false) const;
00228 
00229   ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b,
00230                 octave_idx_type& info, double& rcond,
00231                 solve_singularity_handler sing_handler,
00232                 bool calc_cond = false) const;
00233 
00234   SparseComplexMatrix trisolve (MatrixType &typ, const SparseMatrix& b,
00235                 octave_idx_type& info, double& rcond,
00236                 solve_singularity_handler sing_handler,
00237                 bool calc_cond = false) const;
00238 
00239   SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b,
00240                 octave_idx_type& info, double& rcond,
00241                 solve_singularity_handler sing_handler,
00242                 bool calc_cond = false) const;
00243 
00244   // Banded matrix solvers (umfpack/cholesky)
00245   ComplexMatrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
00246                 double& rcond, solve_singularity_handler sing_handler,
00247                 bool calc_cond = false) const;
00248 
00249   ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b,
00250                 octave_idx_type& info, double& rcond,
00251                 solve_singularity_handler sing_handler,
00252                 bool calc_cond = false) const;
00253 
00254   SparseComplexMatrix bsolve (MatrixType &typ, const SparseMatrix& b,
00255                 octave_idx_type& info, double& rcond,
00256                 solve_singularity_handler sing_handler,
00257                 bool calc_cond = false) const;
00258 
00259   SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b,
00260                 octave_idx_type& info, double& rcond,
00261                 solve_singularity_handler sing_handler,
00262                 bool calc_cond = false) const;
00263 
00264   // Full matrix solvers (umfpack/cholesky)
00265   void * factorize (octave_idx_type& err, double &rcond, Matrix &Control,
00266                 Matrix &Info, solve_singularity_handler sing_handler,
00267                 bool calc_cond) const;
00268 
00269   ComplexMatrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
00270                 double& rcond, solve_singularity_handler sing_handler,
00271                 bool calc_cond = false) const;
00272 
00273   ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b,
00274                 octave_idx_type& info, double& rcond,
00275                 solve_singularity_handler sing_handler,
00276                 bool calc_cond = false) const;
00277 
00278   SparseComplexMatrix fsolve (MatrixType &typ, const SparseMatrix& b,
00279                 octave_idx_type& info, double& rcond,
00280                 solve_singularity_handler sing_handler,
00281                 bool calc_cond = false) const;
00282 
00283   SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b,
00284                 octave_idx_type& info, double& rcond,
00285                 solve_singularity_handler sing_handler,
00286                 bool calc_cond = false) const;
00287 
00288 public:
00289   // Generic interface to solver with no probing of type
00290   ComplexMatrix solve (MatrixType &typ, const Matrix& b) const;
00291   ComplexMatrix solve (MatrixType &typ, const Matrix& b,
00292                        octave_idx_type& info) const;
00293   ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
00294                        double& rcond) const;
00295   ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info,
00296                        double& rcond, solve_singularity_handler sing_handler,
00297                        bool singular_fallback = true) const;
00298 
00299   ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const;
00300   ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
00301                        octave_idx_type& info) const;
00302   ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
00303                        octave_idx_type& info, double& rcond) const;
00304   ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b,
00305                        octave_idx_type& info, double& rcond,
00306                        solve_singularity_handler sing_handler,
00307                        bool singular_fallback = true) const;
00308 
00309   SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const;
00310   SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
00311                              octave_idx_type& info) const;
00312   SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
00313                              octave_idx_type& info, double& rcond) const;
00314   SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b,
00315                              octave_idx_type& info, double& rcond,
00316                              solve_singularity_handler sing_handler,
00317                              bool singular_fallback = true) const;
00318 
00319   SparseComplexMatrix solve (MatrixType &typ,
00320                              const SparseComplexMatrix& b) const;
00321   SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
00322                              octave_idx_type& info) const;
00323   SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
00324                              octave_idx_type& info, double& rcond) const;
00325   SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b,
00326                              octave_idx_type& info, double& rcond,
00327                              solve_singularity_handler sing_handler,
00328                              bool singular_fallback = true) const;
00329 
00330   ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const;
00331   ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
00332                              octave_idx_type& info) const;
00333   ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
00334                              octave_idx_type& info, double& rcond) const;
00335   ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b,
00336                              octave_idx_type& info, double& rcond,
00337                              solve_singularity_handler sing_handler) const;
00338 
00339   ComplexColumnVector solve (MatrixType &typ,
00340                              const ComplexColumnVector& b) const;
00341   ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
00342                              octave_idx_type& info) const;
00343   ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
00344                              octave_idx_type& info, double& rcond) const;
00345   ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b,
00346                              octave_idx_type& info, double& rcond,
00347                              solve_singularity_handler sing_handler) const;
00348 
00349   // Generic interface to solver with probing of type
00350   ComplexMatrix solve (const Matrix& b) const;
00351   ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const;
00352   ComplexMatrix solve (const Matrix& b, octave_idx_type& info,
00353                        double& rcond) const;
00354   ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond,
00355                        solve_singularity_handler sing_handler) const;
00356 
00357   ComplexMatrix solve (const ComplexMatrix& b) const;
00358   ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const;
00359   ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
00360                        double& rcond) const;
00361   ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info,
00362                        double& rcond, solve_singularity_handler sing_handler) const;
00363 
00364   SparseComplexMatrix solve (const SparseMatrix& b) const;
00365   SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const;
00366   SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
00367                              double& rcond) const;
00368   SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info,
00369                              double& rcond,
00370                              solve_singularity_handler sing_handler) const;
00371 
00372   SparseComplexMatrix solve (const SparseComplexMatrix& b) const;
00373   SparseComplexMatrix solve (const SparseComplexMatrix& b,
00374                              octave_idx_type& info) const;
00375   SparseComplexMatrix solve (const SparseComplexMatrix& b,
00376                              octave_idx_type& info, double& rcond) const;
00377   SparseComplexMatrix solve (const SparseComplexMatrix& b,
00378                              octave_idx_type& info, double& rcond,
00379                              solve_singularity_handler sing_handler) const;
00380 
00381   ComplexColumnVector solve (const ColumnVector& b) const;
00382   ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const;
00383   ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
00384                              double& rcond) const;
00385   ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info,
00386                              double& rcond,
00387                              solve_singularity_handler sing_handler) const;
00388 
00389   ComplexColumnVector solve (const ComplexColumnVector& b) const;
00390   ComplexColumnVector solve (const ComplexColumnVector& b,
00391                              octave_idx_type& info) const;
00392   ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
00393                              double& rcond) const;
00394   ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
00395                              double& rcond,
00396                              solve_singularity_handler sing_handler) const;
00397 
00398   SparseComplexMatrix squeeze (void) const;
00399 
00400   SparseComplexMatrix reshape (const dim_vector& new_dims) const;
00401 
00402   SparseComplexMatrix permute (const Array<octave_idx_type>& vec,
00403                                bool inv = false) const;
00404 
00405   SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const;
00406 
00407   bool any_element_is_nan (void) const;
00408   bool any_element_is_inf_or_nan (void) const;
00409   bool all_elements_are_real (void) const;
00410   bool all_integers (double& max_val, double& min_val) const;
00411   bool too_large_for_float (void) const;
00412 
00413   SparseBoolMatrix operator ! (void) const;
00414 
00415   SparseBoolMatrix all (int dim = -1) const;
00416   SparseBoolMatrix any (int dim = -1) const;
00417 
00418   SparseComplexMatrix cumprod (int dim = -1) const;
00419   SparseComplexMatrix cumsum (int dim = -1) const;
00420   SparseComplexMatrix prod (int dim = -1) const;
00421   SparseComplexMatrix sum (int dim = -1) const;
00422   SparseComplexMatrix sumsq (int dim = -1) const;
00423   SparseMatrix abs (void) const;
00424 
00425   SparseComplexMatrix diag (octave_idx_type k = 0) const;
00426 
00427   // i/o
00428   friend OCTAVE_API std::ostream& operator << (std::ostream& os,
00429                                     const SparseComplexMatrix& a);
00430   friend OCTAVE_API std::istream& operator >> (std::istream& is,
00431                                     SparseComplexMatrix& a);
00432 };
00433 
00434 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
00435                                        const SparseComplexMatrix&);
00436 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
00437                                        const SparseMatrix&);
00438 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
00439                                        const SparseComplexMatrix&);
00440 
00441 extern OCTAVE_API ComplexMatrix operator * (const Matrix&,
00442                                        const SparseComplexMatrix&);
00443 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
00444                                        const SparseMatrix&);
00445 extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&,
00446                                        const SparseComplexMatrix&);
00447 extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&,
00448                                        const SparseComplexMatrix&);
00449 extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&,
00450                                        const SparseComplexMatrix&);
00451 
00452 extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&,
00453                                        const ComplexMatrix&);
00454 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
00455                                        const Matrix&);
00456 extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&,
00457                                        const ComplexMatrix&);
00458 extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&,
00459                                        const ComplexMatrix&);
00460 extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&,
00461                                        const ComplexMatrix&);
00462 
00463 extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&, const SparseComplexMatrix&);
00464 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const DiagMatrix&);
00465 
00466 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&, const SparseMatrix&);
00467 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&, const ComplexDiagMatrix&);
00468 
00469 extern OCTAVE_API SparseComplexMatrix operator * (const ComplexDiagMatrix&, const SparseComplexMatrix&);
00470 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const ComplexDiagMatrix&);
00471 
00472 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&, const SparseMatrix&);
00473 extern OCTAVE_API SparseComplexMatrix operator + (const DiagMatrix&, const SparseComplexMatrix&);
00474 extern OCTAVE_API SparseComplexMatrix operator + (const ComplexDiagMatrix&, const SparseComplexMatrix&);
00475 extern OCTAVE_API SparseComplexMatrix operator + (const SparseMatrix&, const ComplexDiagMatrix&);
00476 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&, const DiagMatrix&);
00477 extern OCTAVE_API SparseComplexMatrix operator + (const SparseComplexMatrix&, const ComplexDiagMatrix&);
00478 
00479 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&, const SparseMatrix&);
00480 extern OCTAVE_API SparseComplexMatrix operator - (const DiagMatrix&, const SparseComplexMatrix&);
00481 extern OCTAVE_API SparseComplexMatrix operator - (const ComplexDiagMatrix&, const SparseComplexMatrix&);
00482 extern OCTAVE_API SparseComplexMatrix operator - (const SparseMatrix&, const ComplexDiagMatrix&);
00483 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const DiagMatrix&);
00484 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const ComplexDiagMatrix&);
00485 
00486 extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&,
00487                                                   const SparseComplexMatrix&);
00488 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
00489                                                   const PermMatrix&);
00490 
00491 extern OCTAVE_API SparseComplexMatrix min (const Complex& c,
00492                                 const SparseComplexMatrix& m);
00493 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m,
00494                                 const Complex& c);
00495 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a,
00496                                 const SparseComplexMatrix& b);
00497 
00498 extern OCTAVE_API SparseComplexMatrix max (const Complex& c,
00499                                 const SparseComplexMatrix& m);
00500 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m,
00501                                 const Complex& c);
00502 extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a,
00503                                 const SparseComplexMatrix& b);
00504 
00505 SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
00506 SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
00507 
00508 SPARSE_SSM_CMP_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API)
00509 SPARSE_SSM_BOOL_OP_DECLS (Complex, SparseComplexMatrix, OCTAVE_API)
00510 
00511 SPARSE_SMSM_CMP_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API)
00512 SPARSE_SMSM_BOOL_OP_DECLS (SparseComplexMatrix, SparseComplexMatrix, OCTAVE_API)
00513 
00514 SPARSE_FORWARD_DEFS (MSparse, SparseComplexMatrix, ComplexMatrix, Complex)
00515 
00516 #ifdef IDX_TYPE_LONG
00517 #define UMFPACK_ZNAME(name) umfpack_zl_ ## name
00518 #else
00519 #define UMFPACK_ZNAME(name) umfpack_zi_ ## name
00520 #endif
00521 
00522 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines