GNU Octave  6.2.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"
Include dependency graph for CSparse.cc:

Go to the source code of this file.

Macros

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

Functions

static const Complex Complex_NaN_result (octave::numeric_limits< double >::NaN(), octave::numeric_limits< double >::NaN())
 
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 7696 of file CSparse.cc.

◆ ROW_EXPR

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

Function Documentation

◆ Complex_NaN_result()

static const Complex Complex_NaN_result ( octave::numeric_limits< double >  ::NaN(),
octave::numeric_limits< double >  ::NaN() 
)
static

◆ 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 7579 of file CSparse.cc.

References conj(), and SPARSE_FULL_TRANS_MUL.

Referenced by install_cm_cm_ops(), install_fcm_fcm_ops(), and install_scm_cm_ops().

◆ max() [1/3]

SparseComplexMatrix max ( const Complex c,
const SparseComplexMatrix m 
)

Definition at line 7818 of file CSparse.cc.

References EMPTY_RETURN_CHECK, m, octave::math::max(), and Sparse< T >::xdata().

Referenced by max().

◆ max() [2/3]

◆ max() [3/3]

SparseComplexMatrix max ( const SparseComplexMatrix m,
const Complex c 
)

Definition at line 7842 of file CSparse.cc.

References m, and max().

◆ min() [1/3]

SparseComplexMatrix min ( const Complex c,
const SparseComplexMatrix m 
)

Definition at line 7701 of file CSparse.cc.

References abs(), Sparse< T >::data(), EMPTY_RETURN_CHECK, m, and octave::math::min().

Referenced by min().

◆ min() [2/3]

◆ min() [3/3]

SparseComplexMatrix min ( const SparseComplexMatrix m,
const Complex c 
)

Definition at line 7725 of file CSparse.cc.

References m, and min().

◆ mul_herm()

ComplexMatrix mul_herm ( const ComplexMatrix m,
const SparseComplexMatrix a 
)

Definition at line 7549 of file CSparse.cc.

References conj(), and FULL_SPARSE_MUL_TRANS.

Referenced by install_cm_cm_ops(), install_cm_scm_ops(), and install_fcm_fcm_ops().

◆ mul_trans()

◆ mx_el_and() [1/5]

SparseBoolMatrix mx_el_and ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7938 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 7935 of file CSparse.cc.

◆ mx_el_and() [4/5]

SparseBoolMatrix mx_el_and ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7941 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 7937 of file CSparse.cc.

◆ mx_el_eq() [2/3]

SparseBoolMatrix mx_el_eq ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7934 of file CSparse.cc.

◆ mx_el_eq() [3/3]

SparseBoolMatrix mx_el_eq ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7940 of file CSparse.cc.

◆ mx_el_ge() [1/3]

SparseBoolMatrix mx_el_ge ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7937 of file CSparse.cc.

◆ mx_el_ge() [2/3]

SparseBoolMatrix mx_el_ge ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7934 of file CSparse.cc.

◆ mx_el_ge() [3/3]

SparseBoolMatrix mx_el_ge ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7940 of file CSparse.cc.

◆ mx_el_gt() [1/3]

SparseBoolMatrix mx_el_gt ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7937 of file CSparse.cc.

◆ mx_el_gt() [2/3]

SparseBoolMatrix mx_el_gt ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7934 of file CSparse.cc.

◆ mx_el_gt() [3/3]

SparseBoolMatrix mx_el_gt ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7940 of file CSparse.cc.

◆ mx_el_le() [1/3]

SparseBoolMatrix mx_el_le ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7937 of file CSparse.cc.

◆ mx_el_le() [2/3]

SparseBoolMatrix mx_el_le ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7934 of file CSparse.cc.

◆ mx_el_le() [3/3]

SparseBoolMatrix mx_el_le ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7940 of file CSparse.cc.

◆ mx_el_lt() [1/3]

SparseBoolMatrix mx_el_lt ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7937 of file CSparse.cc.

◆ mx_el_lt() [2/3]

SparseBoolMatrix mx_el_lt ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7934 of file CSparse.cc.

◆ mx_el_lt() [3/3]

SparseBoolMatrix mx_el_lt ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7940 of file CSparse.cc.

◆ mx_el_ne() [1/3]

SparseBoolMatrix mx_el_ne ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7937 of file CSparse.cc.

◆ mx_el_ne() [2/3]

SparseBoolMatrix mx_el_ne ( const SparseComplexMatrix m,
const Complex s 
)

Definition at line 7934 of file CSparse.cc.

◆ mx_el_ne() [3/3]

SparseBoolMatrix mx_el_ne ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7940 of file CSparse.cc.

◆ mx_el_or() [1/5]

SparseBoolMatrix mx_el_or ( const Complex s,
const SparseComplexMatrix m 
)

Definition at line 7938 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 7935 of file CSparse.cc.

◆ mx_el_or() [4/5]

SparseBoolMatrix mx_el_or ( const SparseComplexMatrix m1,
const SparseComplexMatrix m2 
)

Definition at line 7941 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 7608 of file CSparse.cc.

References d.

◆ operator*() [2/17]

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

Definition at line 7597 of file CSparse.cc.

References d.

◆ operator*() [3/17]

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

Definition at line 7537 of file CSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [4/17]

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

Definition at line 7525 of file CSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [5/17]

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

Definition at line 7586 of file CSparse.cc.

References d.

◆ operator*() [6/17]

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

Definition at line 7531 of file CSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [7/17]

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

Definition at line 7683 of file CSparse.cc.

References octinternal_do_mul_pm_sm().

◆ operator*() [8/17]

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

Definition at line 7613 of file CSparse.cc.

References d.

◆ operator*() [9/17]

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

Definition at line 7591 of file CSparse.cc.

References d.

◆ operator*() [10/17]

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

Definition at line 7689 of file CSparse.cc.

References octinternal_do_mul_sm_pm().

◆ operator*() [11/17]

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

Definition at line 7567 of file CSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [12/17]

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

Definition at line 7555 of file CSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [13/17]

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

Definition at line 7519 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator*() [14/17]

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

Definition at line 7507 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator*() [15/17]

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

Definition at line 7602 of file CSparse.cc.

References d.

◆ operator*() [16/17]

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

Definition at line 7561 of file CSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [17/17]

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

Definition at line 7513 of file CSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator+() [1/6]

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

Definition at line 7629 of file CSparse.cc.

References d.

◆ operator+() [2/6]

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

Definition at line 7619 of file CSparse.cc.

References d.

◆ operator+() [3/6]

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

Definition at line 7624 of file CSparse.cc.

References d.

◆ operator+() [4/6]

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

Definition at line 7644 of file CSparse.cc.

References d.

◆ operator+() [5/6]

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

Definition at line 7639 of file CSparse.cc.

References d.

◆ operator+() [6/6]

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

Definition at line 7634 of file CSparse.cc.

References d.

◆ operator-() [1/6]

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

Definition at line 7660 of file CSparse.cc.

References d.

◆ operator-() [2/6]

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

Definition at line 7650 of file CSparse.cc.

References d.

◆ operator-() [3/6]

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

Definition at line 7655 of file CSparse.cc.

References d.

◆ operator-() [4/6]

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

Definition at line 7675 of file CSparse.cc.

References d.

◆ operator-() [5/6]

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

Definition at line 7670 of file CSparse.cc.

References d.

◆ operator-() [6/6]

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

Definition at line 7665 of file CSparse.cc.

References d.

◆ operator<<()

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

Definition at line 7477 of file CSparse.cc.

◆ operator>>()

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

Definition at line 7499 of file CSparse.cc.

◆ trans_mul()