GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
dSparse.cc File Reference
#include <iostream>
#include "quit.h"
#include "lo-ieee.h"
#include "lo-lapack-proto.h"
#include "lo-mappers.h"
#include "dRowVector.h"
#include "oct-locbuf.h"
#include "dDiagMatrix.h"
#include "CSparse.h"
#include "boolSparse.h"
#include "dSparse.h"
#include "functor.h"
#include "oct-spparms.h"
#include "sparse-lu.h"
#include "MatrixType.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 dSparse.cc:

Go to the source code of this file.

Macros

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

Functions

SparseMatrix imag (const SparseComplexMatrix &a)
 
SparseMatrix max (double d, const SparseMatrix &m)
 
SparseMatrix max (const SparseMatrix &m, double d)
 
SparseMatrix max (const SparseMatrix &a, const SparseMatrix &b)
 
SparseMatrix min (double d, const SparseMatrix &m)
 
SparseMatrix min (const SparseMatrix &m, double d)
 
SparseMatrix min (const SparseMatrix &a, const SparseMatrix &b)
 
Matrix mul_trans (const Matrix &m, const SparseMatrix &a)
 
SparseBoolMatrix mx_el_and (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_and (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_and (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_eq (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_eq (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_eq (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_ge (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_ge (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_ge (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_gt (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_gt (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_gt (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_le (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_le (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_le (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_lt (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_lt (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_lt (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_ne (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_ne (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_ne (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseBoolMatrix mx_el_or (const SparseMatrix &m, const double &s)
 
SparseBoolMatrix mx_el_or (const double &s, const SparseMatrix &m)
 
SparseBoolMatrix mx_el_or (const SparseMatrix &m1, const SparseMatrix &m2)
 
SparseMatrix operator* (const SparseMatrix &m, const SparseMatrix &a)
 
Matrix operator* (const Matrix &m, const SparseMatrix &a)
 
Matrix operator* (const SparseMatrix &m, const Matrix &a)
 
SparseMatrix operator* (const DiagMatrix &d, const SparseMatrix &a)
 
SparseMatrix operator* (const SparseMatrix &a, const DiagMatrix &d)
 
SparseMatrix operator* (const PermMatrix &p, const SparseMatrix &a)
 
SparseMatrix operator* (const SparseMatrix &a, const PermMatrix &p)
 
SparseMatrix operator+ (const DiagMatrix &d, const SparseMatrix &a)
 
SparseMatrix operator+ (const SparseMatrix &a, const DiagMatrix &d)
 
SparseMatrix operator- (const DiagMatrix &d, const SparseMatrix &a)
 
SparseMatrix operator- (const SparseMatrix &a, const DiagMatrix &d)
 
std::ostream & operator<< (std::ostream &os, const SparseMatrix &a)
 
std::istream & operator>> (std::istream &is, SparseMatrix &a)
 
SparseMatrix real (const SparseComplexMatrix &a)
 
Matrix trans_mul (const SparseMatrix &m, const Matrix &a)
 

Macro Definition Documentation

◆ COL_EXPR

#define COL_EXPR
Value:
double d = data (i); \
tmp[j] += d * d
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
for i
Definition: data.cc:5264

Referenced by SparseMatrix::sumsq().

◆ EMPTY_RETURN_CHECK

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

Definition at line 7622 of file dSparse.cc.

Referenced by max(), and min().

◆ ROW_EXPR

#define ROW_EXPR
Value:
double d = data (i); \
tmp[ridx (i)] += d * d
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
for i
Definition: data.cc:5264

Referenced by SparseMatrix::sumsq().

Function Documentation

◆ imag()

SparseMatrix imag ( const SparseComplexMatrix a)

Definition at line 574 of file dSparse.cc.

References a, Sparse< T >::cidx(), Sparse< T >::data(), i, imag(), Sparse< T >::maybe_compress(), and Sparse< T >::ridx().

Referenced by imag().

◆ max() [1/3]

◆ max() [2/3]

SparseMatrix max ( const SparseMatrix m,
double  d 
)

Definition at line 7834 of file dSparse.cc.

References d, and max().

◆ max() [3/3]

◆ min() [1/3]

◆ min() [2/3]

SparseMatrix min ( const SparseMatrix m,
double  d 
)

Definition at line 7684 of file dSparse.cc.

References d, and min().

◆ min() [3/3]

◆ mul_trans()

Matrix mul_trans ( const Matrix m,
const SparseMatrix a 
)

Definition at line 7551 of file dSparse.cc.

References FULL_SPARSE_MUL_TRANS.

◆ mx_el_and() [1/3]

SparseBoolMatrix mx_el_and ( const SparseMatrix m,
const double s 
)

Definition at line 7927 of file dSparse.cc.

◆ mx_el_and() [2/3]

SparseBoolMatrix mx_el_and ( const double s,
const SparseMatrix m 
)

Definition at line 7930 of file dSparse.cc.

◆ mx_el_and() [3/3]

SparseBoolMatrix mx_el_and ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7933 of file dSparse.cc.

◆ mx_el_eq() [1/3]

SparseBoolMatrix mx_el_eq ( const SparseMatrix m,
const double s 
)

Definition at line 7926 of file dSparse.cc.

◆ mx_el_eq() [2/3]

SparseBoolMatrix mx_el_eq ( const double s,
const SparseMatrix m 
)

Definition at line 7929 of file dSparse.cc.

◆ mx_el_eq() [3/3]

SparseBoolMatrix mx_el_eq ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7932 of file dSparse.cc.

◆ mx_el_ge() [1/3]

SparseBoolMatrix mx_el_ge ( const SparseMatrix m,
const double s 
)

Definition at line 7926 of file dSparse.cc.

◆ mx_el_ge() [2/3]

SparseBoolMatrix mx_el_ge ( const double s,
const SparseMatrix m 
)

Definition at line 7929 of file dSparse.cc.

◆ mx_el_ge() [3/3]

SparseBoolMatrix mx_el_ge ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7932 of file dSparse.cc.

◆ mx_el_gt() [1/3]

SparseBoolMatrix mx_el_gt ( const SparseMatrix m,
const double s 
)

Definition at line 7926 of file dSparse.cc.

◆ mx_el_gt() [2/3]

SparseBoolMatrix mx_el_gt ( const double s,
const SparseMatrix m 
)

Definition at line 7929 of file dSparse.cc.

◆ mx_el_gt() [3/3]

SparseBoolMatrix mx_el_gt ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7932 of file dSparse.cc.

◆ mx_el_le() [1/3]

SparseBoolMatrix mx_el_le ( const SparseMatrix m,
const double s 
)

Definition at line 7926 of file dSparse.cc.

◆ mx_el_le() [2/3]

SparseBoolMatrix mx_el_le ( const double s,
const SparseMatrix m 
)

Definition at line 7929 of file dSparse.cc.

◆ mx_el_le() [3/3]

SparseBoolMatrix mx_el_le ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7932 of file dSparse.cc.

◆ mx_el_lt() [1/3]

SparseBoolMatrix mx_el_lt ( const SparseMatrix m,
const double s 
)

Definition at line 7926 of file dSparse.cc.

◆ mx_el_lt() [2/3]

SparseBoolMatrix mx_el_lt ( const double s,
const SparseMatrix m 
)

Definition at line 7929 of file dSparse.cc.

◆ mx_el_lt() [3/3]

SparseBoolMatrix mx_el_lt ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7932 of file dSparse.cc.

◆ mx_el_ne() [1/3]

SparseBoolMatrix mx_el_ne ( const SparseMatrix m,
const double s 
)

Definition at line 7926 of file dSparse.cc.

◆ mx_el_ne() [2/3]

SparseBoolMatrix mx_el_ne ( const double s,
const SparseMatrix m 
)

Definition at line 7929 of file dSparse.cc.

◆ mx_el_ne() [3/3]

SparseBoolMatrix mx_el_ne ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7932 of file dSparse.cc.

◆ mx_el_or() [1/3]

SparseBoolMatrix mx_el_or ( const SparseMatrix m,
const double s 
)

Definition at line 7927 of file dSparse.cc.

◆ mx_el_or() [2/3]

SparseBoolMatrix mx_el_or ( const double s,
const SparseMatrix m 
)

Definition at line 7930 of file dSparse.cc.

◆ mx_el_or() [3/3]

SparseBoolMatrix mx_el_or ( const SparseMatrix m1,
const SparseMatrix m2 
)

Definition at line 7933 of file dSparse.cc.

◆ operator*() [1/7]

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

Definition at line 7539 of file dSparse.cc.

References SPARSE_SPARSE_MUL.

◆ operator*() [2/7]

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

Definition at line 7545 of file dSparse.cc.

References FULL_SPARSE_MUL.

◆ operator*() [3/7]

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

Definition at line 7557 of file dSparse.cc.

References SPARSE_FULL_MUL.

◆ operator*() [4/7]

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

Definition at line 7571 of file dSparse.cc.

References a, and d.

◆ operator*() [5/7]

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

Definition at line 7577 of file dSparse.cc.

References a, and d.

◆ operator*() [6/7]

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

Definition at line 7609 of file dSparse.cc.

References a, octinternal_do_mul_pm_sm(), and p.

◆ operator*() [7/7]

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

Definition at line 7615 of file dSparse.cc.

References a, octinternal_do_mul_sm_pm(), and p.

◆ operator+() [1/2]

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

Definition at line 7583 of file dSparse.cc.

References a, and d.

◆ operator+() [2/2]

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

Definition at line 7595 of file dSparse.cc.

References a, and d.

◆ operator-() [1/2]

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

Definition at line 7589 of file dSparse.cc.

References a, and d.

◆ operator-() [2/2]

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

Definition at line 7601 of file dSparse.cc.

References a, and d.

◆ operator<<()

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

Definition at line 7484 of file dSparse.cc.

References a, i, octave_write_double(), and os.

◆ operator>>()

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

Definition at line 7505 of file dSparse.cc.

References a, and is.

◆ real()

SparseMatrix real ( const SparseComplexMatrix a)

Definition at line 553 of file dSparse.cc.

References a, Sparse< T >::cidx(), Sparse< T >::data(), i, Sparse< T >::maybe_compress(), real(), and Sparse< T >::ridx().

Referenced by real().

◆ trans_mul()

Matrix trans_mul ( const SparseMatrix m,
const Matrix a 
)

Definition at line 7563 of file dSparse.cc.

References SPARSE_FULL_TRANS_MUL.