GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
CSparse.cc File Reference
#include <complex>
#include <istream>
#include <ostream>
#include "quit.h"
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "f77-fcn.h"
#include "dRowVector.h"
#include "lo-lapack-proto.h"
#include "mx-m-cs.h"
#include "mx-cs-m.h"
#include "mx-cm-s.h"
#include "mx-fcm-fs.h"
#include "mx-s-cm.h"
#include "mx-fs-fcm.h"
#include "oct-locbuf.h"
#include "dDiagMatrix.h"
#include "CDiagMatrix.h"
#include "CSparse.h"
#include "boolSparse.h"
#include "dSparse.h"
#include "oct-spparms.h"
#include "sparse-lu.h"
#include "oct-sparse.h"
#include "sparse-util.h"
#include "sparse-chol.h"
#include "sparse-qr.h"
#include "Sparse-op-defs.h"
#include "Sparse-diag-op-defs.h"
#include "Sparse-perm-op-defs.h"
#include "sparse-dmsolve.h"

Go to the source code of this file.

Macros

#define COL_EXPR
 
#define EMPTY_RETURN_CHECK(T)
 
#define ROW_EXPR
 

Functions

SparseComplexMatrix conj (const SparseComplexMatrix &a)
 
ComplexMatrix herm_mul (const SparseComplexMatrix &m, const ComplexMatrix &a)
 
SparseComplexMatrix max (const Complex &c, const SparseComplexMatrix &m)
 
SparseComplexMatrix max (const SparseComplexMatrix &a, const SparseComplexMatrix &b)
 
SparseComplexMatrix max (const SparseComplexMatrix &m, const Complex &c)
 
SparseComplexMatrix min (const Complex &c, const SparseComplexMatrix &m)
 
SparseComplexMatrix min (const SparseComplexMatrix &a, const SparseComplexMatrix &b)
 
SparseComplexMatrix min (const SparseComplexMatrix &m, const Complex &c)
 
ComplexMatrix mul_herm (const ComplexMatrix &m, const SparseComplexMatrix &a)
 
ComplexMatrix mul_trans (const ComplexMatrix &m, const SparseComplexMatrix &a)
 
SparseBoolMatrix mx_el_and (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_and (const SparseComplexMatrix &, const SparseComplexMatrix ::element_type &)
 
SparseBoolMatrix mx_el_and (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_and (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_and (const SparseComplexMatrix ::element_type &, const SparseComplexMatrix &)
 
SparseBoolMatrix mx_el_eq (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_eq (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_eq (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_ge (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_ge (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_ge (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_gt (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_gt (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_gt (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_le (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_le (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_le (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_lt (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_lt (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_lt (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_ne (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_ne (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_ne (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_or (const Complex &s, const SparseComplexMatrix &m)
 
SparseBoolMatrix mx_el_or (const SparseComplexMatrix &, const SparseComplexMatrix ::element_type &)
 
SparseBoolMatrix mx_el_or (const SparseComplexMatrix &m, const Complex &s)
 
SparseBoolMatrix mx_el_or (const SparseComplexMatrix &m1, const SparseComplexMatrix &m2)
 
SparseBoolMatrix mx_el_or (const SparseComplexMatrix ::element_type &, const SparseComplexMatrix &)
 
SparseComplexMatrix operator* (const ComplexDiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const ComplexDiagMatrix &d, const SparseMatrix &a)
 
ComplexMatrix operator* (const ComplexMatrix &m, const SparseComplexMatrix &a)
 
ComplexMatrix operator* (const ComplexMatrix &m, const SparseMatrix &a)
 
SparseComplexMatrix operator* (const DiagMatrix &d, const SparseComplexMatrix &a)
 
ComplexMatrix operator* (const Matrix &m, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const PermMatrix &p, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &a, const DiagMatrix &d)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &a, const PermMatrix &p)
 
ComplexMatrix operator* (const SparseComplexMatrix &m, const ComplexMatrix &a)
 
ComplexMatrix operator* (const SparseComplexMatrix &m, const Matrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &m, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseComplexMatrix &m, const SparseMatrix &a)
 
SparseComplexMatrix operator* (const SparseMatrix &a, const ComplexDiagMatrix &d)
 
ComplexMatrix operator* (const SparseMatrix &m, const ComplexMatrix &a)
 
SparseComplexMatrix operator* (const SparseMatrix &m, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator+ (const ComplexDiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator+ (const ComplexDiagMatrix &d, const SparseMatrix &a)
 
SparseComplexMatrix operator+ (const DiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator+ (const SparseComplexMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator+ (const SparseComplexMatrix &a, const DiagMatrix &d)
 
SparseComplexMatrix operator+ (const SparseMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator- (const ComplexDiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator- (const ComplexDiagMatrix &d, const SparseMatrix &a)
 
SparseComplexMatrix operator- (const DiagMatrix &d, const SparseComplexMatrix &a)
 
SparseComplexMatrix operator- (const SparseComplexMatrix &a, const ComplexDiagMatrix &d)
 
SparseComplexMatrix operator- (const SparseComplexMatrix &a, const DiagMatrix &d)
 
SparseComplexMatrix operator- (const SparseMatrix &a, const ComplexDiagMatrix &d)
 
std::ostream & operator<< (std::ostream &os, const SparseComplexMatrix &a)
 
std::istream & operator>> (std::istream &is, SparseComplexMatrix &a)
 
ComplexMatrix trans_mul (const SparseComplexMatrix &m, const ComplexMatrix &a)
 

Macro Definition Documentation

◆ COL_EXPR

#define COL_EXPR
Value:
Complex d = data (i); \
tmp[j] += d * conj (d)
SparseComplexMatrix conj(const SparseComplexMatrix &a)
Definition: CSparse.cc:640
F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
std::complex< double > Complex
Definition: oct-cmplx.h:33

◆ EMPTY_RETURN_CHECK

#define EMPTY_RETURN_CHECK (   T)
Value:
if (nr == 0 || nc == 0) \
return T (nr, nc);

Definition at line 7669 of file CSparse.cc.

◆ ROW_EXPR

#define ROW_EXPR
Value:
Complex d = data (i); \
tmp[ridx (i)] += d * conj (d)

Function Documentation

◆ conj()

Definition at line 640 of file CSparse.cc.

Referenced by herm_mul(), and mul_herm().

◆ herm_mul()

ComplexMatrix herm_mul ( const SparseComplexMatrix m,
const ComplexMatrix a 
)

Definition at line 7552 of file CSparse.cc.

References conj(), and SPARSE_FULL_TRANS_MUL.

Referenced by install_scm_cm_ops().

◆ max() [1/3]

SparseComplexMatrix max ( const Complex c,
const SparseComplexMatrix m 
)

Definition at line 7791 of file CSparse.cc.

References EMPTY_RETURN_CHECK, m, and Sparse< T, Alloc >::xdata().

Referenced by max().

◆ max() [2/3]

◆ max() [3/3]

SparseComplexMatrix max ( const SparseComplexMatrix m,
const Complex c 
)

Definition at line 7815 of file CSparse.cc.

References m, and max().

◆ min() [1/3]

SparseComplexMatrix min ( const Complex c,
const SparseComplexMatrix m 
)

Definition at line 7674 of file CSparse.cc.

References EMPTY_RETURN_CHECK, and m.

Referenced by min().

◆ min() [2/3]

◆ min() [3/3]

SparseComplexMatrix min ( const SparseComplexMatrix m,
const Complex c 
)

Definition at line 7698 of file CSparse.cc.

References m, and min().

◆ mul_herm()

ComplexMatrix mul_herm ( const ComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7522 of file CSparse.cc.

References conj(), and FULL_SPARSE_MUL_TRANS.

Referenced by install_cm_scm_ops().

◆ mul_trans()

ComplexMatrix mul_trans ( const ComplexMatrix m,
const SparseComplexMatrix a 
)

◆ mx_el_and() [1/5]

SparseBoolMatrix mx_el_and ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7911 of file CSparse.cc.

◆ mx_el_and() [2/5]

SparseBoolMatrix mx_el_and ( const SparseComplexMatrix ,
const SparseComplexMatrix ::element_type &   
)

◆ mx_el_and() [3/5]

SparseBoolMatrix mx_el_and ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7908 of file CSparse.cc.

◆ mx_el_and() [4/5]

SparseBoolMatrix mx_el_and ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7914 of file CSparse.cc.

◆ mx_el_and() [5/5]

SparseBoolMatrix mx_el_and ( const SparseComplexMatrix ::element_type &  ,
const SparseComplexMatrix  
)

◆ mx_el_eq() [1/3]

SparseBoolMatrix mx_el_eq ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7910 of file CSparse.cc.

◆ mx_el_eq() [2/3]

SparseBoolMatrix mx_el_eq ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7907 of file CSparse.cc.

◆ mx_el_eq() [3/3]

SparseBoolMatrix mx_el_eq ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7913 of file CSparse.cc.

◆ mx_el_ge() [1/3]

SparseBoolMatrix mx_el_ge ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7910 of file CSparse.cc.

◆ mx_el_ge() [2/3]

SparseBoolMatrix mx_el_ge ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7907 of file CSparse.cc.

◆ mx_el_ge() [3/3]

SparseBoolMatrix mx_el_ge ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7913 of file CSparse.cc.

◆ mx_el_gt() [1/3]

SparseBoolMatrix mx_el_gt ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7910 of file CSparse.cc.

◆ mx_el_gt() [2/3]

SparseBoolMatrix mx_el_gt ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7907 of file CSparse.cc.

◆ mx_el_gt() [3/3]

SparseBoolMatrix mx_el_gt ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7913 of file CSparse.cc.

◆ mx_el_le() [1/3]

SparseBoolMatrix mx_el_le ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7910 of file CSparse.cc.

◆ mx_el_le() [2/3]

SparseBoolMatrix mx_el_le ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7907 of file CSparse.cc.

◆ mx_el_le() [3/3]

SparseBoolMatrix mx_el_le ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7913 of file CSparse.cc.

◆ mx_el_lt() [1/3]

SparseBoolMatrix mx_el_lt ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7910 of file CSparse.cc.

◆ mx_el_lt() [2/3]

SparseBoolMatrix mx_el_lt ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7907 of file CSparse.cc.

◆ mx_el_lt() [3/3]

SparseBoolMatrix mx_el_lt ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7913 of file CSparse.cc.

◆ mx_el_ne() [1/3]

SparseBoolMatrix mx_el_ne ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7910 of file CSparse.cc.

◆ mx_el_ne() [2/3]

SparseBoolMatrix mx_el_ne ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7907 of file CSparse.cc.

◆ mx_el_ne() [3/3]

SparseBoolMatrix mx_el_ne ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7913 of file CSparse.cc.

◆ mx_el_or() [1/5]

SparseBoolMatrix mx_el_or ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7911 of file CSparse.cc.

◆ mx_el_or() [2/5]

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix ,
const SparseComplexMatrix ::element_type &   
)

◆ mx_el_or() [3/5]

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7908 of file CSparse.cc.

◆ mx_el_or() [4/5]

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7914 of file CSparse.cc.

◆ mx_el_or() [5/5]

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix ::element_type &  ,
const SparseComplexMatrix  
)

◆ operator*() [1/17]

SparseComplexMatrix operator* ( const ComplexDiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7581 of file CSparse.cc.

References d.

◆ operator*() [2/17]

SparseComplexMatrix operator* ( const ComplexDiagMatrix d,
const SparseMatrix a 
)

Definition at line 7570 of file CSparse.cc.

References d.

◆ operator*() [3/17]

ComplexMatrix operator* ( const ComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7510 of file CSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [4/17]

ComplexMatrix operator* ( const ComplexMatrix m,
const SparseMatrix a 
)

Definition at line 7498 of file CSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [5/17]

SparseComplexMatrix operator* ( const DiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7559 of file CSparse.cc.

References d.

◆ operator*() [6/17]

ComplexMatrix operator* ( const Matrix m,
const SparseComplexMatrix a 
)

Definition at line 7504 of file CSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [7/17]

SparseComplexMatrix operator* ( const PermMatrix p,
const SparseComplexMatrix a 
)

Definition at line 7656 of file CSparse.cc.

References octinternal_do_mul_pm_sm().

◆ operator*() [8/17]

SparseComplexMatrix operator* ( const SparseComplexMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7586 of file CSparse.cc.

References d.

◆ operator*() [9/17]

SparseComplexMatrix operator* ( const SparseComplexMatrix a,
const DiagMatrix d 
)

Definition at line 7564 of file CSparse.cc.

References d.

◆ operator*() [10/17]

SparseComplexMatrix operator* ( const SparseComplexMatrix a,
const PermMatrix p 
)

Definition at line 7662 of file CSparse.cc.

References octinternal_do_mul_sm_pm().

◆ operator*() [11/17]

ComplexMatrix operator* ( const SparseComplexMatrix m,
const ComplexMatrix a 
)

Definition at line 7540 of file CSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [12/17]

ComplexMatrix operator* ( const SparseComplexMatrix m,
const Matrix a 
)

Definition at line 7528 of file CSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [13/17]

SparseComplexMatrix operator* ( const SparseComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7492 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator*() [14/17]

SparseComplexMatrix operator* ( const SparseComplexMatrix m,
const SparseMatrix a 
)

Definition at line 7480 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator*() [15/17]

SparseComplexMatrix operator* ( const SparseMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7575 of file CSparse.cc.

References d.

◆ operator*() [16/17]

ComplexMatrix operator* ( const SparseMatrix m,
const ComplexMatrix a 
)

Definition at line 7534 of file CSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [17/17]

SparseComplexMatrix operator* ( const SparseMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7486 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator+() [1/6]

SparseComplexMatrix operator+ ( const ComplexDiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7602 of file CSparse.cc.

References d.

◆ operator+() [2/6]

SparseComplexMatrix operator+ ( const ComplexDiagMatrix d,
const SparseMatrix a 
)

Definition at line 7592 of file CSparse.cc.

References d.

◆ operator+() [3/6]

SparseComplexMatrix operator+ ( const DiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7597 of file CSparse.cc.

References d.

◆ operator+() [4/6]

SparseComplexMatrix operator+ ( const SparseComplexMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7617 of file CSparse.cc.

References d.

◆ operator+() [5/6]

SparseComplexMatrix operator+ ( const SparseComplexMatrix a,
const DiagMatrix d 
)

Definition at line 7612 of file CSparse.cc.

References d.

◆ operator+() [6/6]

SparseComplexMatrix operator+ ( const SparseMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7607 of file CSparse.cc.

References d.

◆ operator-() [1/6]

SparseComplexMatrix operator- ( const ComplexDiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7633 of file CSparse.cc.

References d.

◆ operator-() [2/6]

SparseComplexMatrix operator- ( const ComplexDiagMatrix d,
const SparseMatrix a 
)

Definition at line 7623 of file CSparse.cc.

References d.

◆ operator-() [3/6]

SparseComplexMatrix operator- ( const DiagMatrix d,
const SparseComplexMatrix a 
)

Definition at line 7628 of file CSparse.cc.

References d.

◆ operator-() [4/6]

SparseComplexMatrix operator- ( const SparseComplexMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7648 of file CSparse.cc.

References d.

◆ operator-() [5/6]

SparseComplexMatrix operator- ( const SparseComplexMatrix a,
const DiagMatrix d 
)

Definition at line 7643 of file CSparse.cc.

References d.

◆ operator-() [6/6]

SparseComplexMatrix operator- ( const SparseMatrix a,
const ComplexDiagMatrix d 
)

Definition at line 7638 of file CSparse.cc.

References d.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const SparseComplexMatrix a 
)

Definition at line 7450 of file CSparse.cc.

◆ operator>>()

std::istream& operator>> ( std::istream &  is,
SparseComplexMatrix a 
)

Definition at line 7472 of file CSparse.cc.

◆ trans_mul()

ComplexMatrix trans_mul ( const SparseComplexMatrix m,
const ComplexMatrix a 
)