GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Sparse-op-defs.h File Reference
#include "octave-config.h"
#include "Array-util.h"
#include "lo-array-errwarn.h"
#include "mx-inlines.cc"
#include "oct-locbuf.h"

Go to the source code of this file.

Macros

#define FULL_SPARSE_MUL(RET_TYPE, EL_TYPE)
 
#define FULL_SPARSE_MUL_TRANS(RET_TYPE, EL_TYPE, CONJ_OP)
 
#define SPARSE_ALL_OP(DIM)
 
#define SPARSE_ANY_ALL_OP(DIM, INIT_VAL, MT_RESULT, TEST_OP, TEST_TRUE_VAL)
 
#define SPARSE_ANY_ALL_OP_COL_CODE(TEST_OP, TEST_TRUE_VAL)
 
#define SPARSE_ANY_ALL_OP_ROW_CODE(TEST_OP, TEST_TRUE_VAL)
 
#define SPARSE_ANY_OP(DIM)   SPARSE_ANY_ALL_OP (DIM, false, false, !=, true)
 
#define SPARSE_BASE_REDUCTION_OP(RET_TYPE, EL_TYPE, ROW_EXPR, COL_EXPR, INIT_VAL, MT_RESULT)
 
#define SPARSE_CUMPROD(RET_TYPE, ELT_TYPE, FCN)
 
#define SPARSE_CUMSUM(RET_TYPE, ELT_TYPE, FCN)
 
#define SPARSE_FULL_MUL(RET_TYPE, EL_TYPE)
 
#define SPARSE_FULL_TRANS_MUL(RET_TYPE, EL_TYPE, CONJ_OP)
 
#define SPARSE_MSM_BIN_OP_1(R, F, OP, M1, M2)
 
#define SPARSE_MSM_BIN_OP_2(R, F, OP, M1, M2)
 
#define SPARSE_MSM_BIN_OPS(R1, R2, M1, M2)
 
#define SPARSE_MSM_BOOL_OP(F, OP, M1, M2)
 
#define SPARSE_MSM_BOOL_OPS(M1, M2)
 
#define SPARSE_MSM_CMP_OP(F, OP, M1, M2)
 
#define SPARSE_MSM_CMP_OPS(M1, M2)
 
#define SPARSE_MSM_EQNE_OPS(M1, M2)
 
#define SPARSE_REDUCTION_OP(RET_TYPE, EL_TYPE, OP, INIT_VAL, MT_RESULT)
 
#define SPARSE_REDUCTION_OP_COL_EXPR(OP)    tmp[j] OP data (i)
 
#define SPARSE_REDUCTION_OP_ROW_EXPR(OP)    tmp[ridx (i)] OP data (i)
 
#define SPARSE_SMM_BIN_OP_1(R, F, OP, M1, M2)
 
#define SPARSE_SMM_BIN_OP_2(R, F, OP, M1, M2)
 
#define SPARSE_SMM_BIN_OP_2_CHECK_product(ET)    do_mx_check (m2, mx_inline_all_finite<ET>)
 
#define SPARSE_SMM_BIN_OP_2_CHECK_quotient(ET)    ! do_mx_check (m2, mx_inline_any_nan<ET>) && m2.nnz () == m2.numel ()
 
#define SPARSE_SMM_BIN_OPS(R1, R2, M1, M2)
 
#define SPARSE_SMM_BOOL_OP(F, OP, M1, M2)
 
#define SPARSE_SMM_BOOL_OPS(M1, M2)
 
#define SPARSE_SMM_CMP_OP(F, OP, M1, M2)
 
#define SPARSE_SMM_CMP_OPS(M1, M2)
 
#define SPARSE_SMM_EQNE_OPS(M1, M2)
 
#define SPARSE_SMS_BIN_OP_1(R, F, OP, M, S)
 
#define SPARSE_SMS_BIN_OP_2(R, F, OP, M, S)
 
#define SPARSE_SMS_BIN_OPS(R1, R2, M, S)
 
#define SPARSE_SMS_BOOL_AND_OP(M, S)
 
#define SPARSE_SMS_BOOL_OPS(M, S)
 
#define SPARSE_SMS_BOOL_OR_OP(M, S)
 
#define SPARSE_SMS_CMP_OP(F, OP, M, S)
 
#define SPARSE_SMS_CMP_OPS(M, S)
 
#define SPARSE_SMS_EQNE_OPS(M, S)
 
#define SPARSE_SMSM_BIN_OP_1(R, F, OP, M1, M2)
 
#define SPARSE_SMSM_BIN_OP_2(R, F, OP, M1, M2)
 
#define SPARSE_SMSM_BIN_OP_3(R, F, OP, M1, M2)
 
#define SPARSE_SMSM_BIN_OPS(R1, R2, M1, M2)
 
#define SPARSE_SMSM_BOOL_AND_OP(M1, M2)
 
#define SPARSE_SMSM_BOOL_OPS(M1, M2)
 
#define SPARSE_SMSM_BOOL_OR_OP(M1, M2)
 
#define SPARSE_SMSM_CMP_OP(F, OP, M1, M2)
 
#define SPARSE_SMSM_CMP_OPS(M1, M2)
 
#define SPARSE_SMSM_EQNE_OPS(M1, M2)
 
#define SPARSE_SPARSE_MUL(RET_TYPE, RET_EL_TYPE, EL_TYPE)
 
#define SPARSE_SSM_BIN_OP_1(R, F, OP, S, M)
 
#define SPARSE_SSM_BIN_OP_2(R, F, OP, S, M)
 
#define SPARSE_SSM_BIN_OPS(R1, R2, S, M)
 
#define SPARSE_SSM_BOOL_AND_OP(S, M)
 
#define SPARSE_SSM_BOOL_OPS(S, M)
 
#define SPARSE_SSM_BOOL_OR_OP(S, M)
 
#define SPARSE_SSM_CMP_OP(F, OP, S, M)
 
#define SPARSE_SSM_CMP_OPS(S, M)
 
#define SPARSE_SSM_EQNE_OPS(S, M)
 

Macro Definition Documentation

◆ FULL_SPARSE_MUL

#define FULL_SPARSE_MUL (   RET_TYPE,
  EL_TYPE 
)

Definition at line 1996 of file Sparse-op-defs.h.

◆ FULL_SPARSE_MUL_TRANS

#define FULL_SPARSE_MUL_TRANS (   RET_TYPE,
  EL_TYPE,
  CONJ_OP 
)

Definition at line 2031 of file Sparse-op-defs.h.

◆ SPARSE_ALL_OP

#define SPARSE_ALL_OP (   DIM)
Value:
if ((rows () == 1 && dim == -1) || dim == 1) \
return transpose (). all (0). transpose (); \
else \
{ \
SPARSE_ANY_ALL_OP (DIM, (cidx (j+1) - cidx (j) < nr ? false : true), \
true, ==, false); \
}

Definition at line 1752 of file Sparse-op-defs.h.

◆ SPARSE_ANY_ALL_OP

#define SPARSE_ANY_ALL_OP (   DIM,
  INIT_VAL,
  MT_RESULT,
  TEST_OP,
  TEST_TRUE_VAL 
)
Value:
SPARSE_ANY_ALL_OP_ROW_CODE (TEST_OP, TEST_TRUE_VAL), \
SPARSE_ANY_ALL_OP_COL_CODE (TEST_OP, TEST_TRUE_VAL), \
INIT_VAL, MT_RESULT)
#define SPARSE_BASE_REDUCTION_OP(RET_TYPE, EL_TYPE, ROW_EXPR, COL_EXPR, INIT_VAL, MT_RESULT)
#define SPARSE_ANY_ALL_OP_COL_CODE(TEST_OP, TEST_TRUE_VAL)
#define SPARSE_ANY_ALL_OP_ROW_CODE(TEST_OP, TEST_TRUE_VAL)

Definition at line 1746 of file Sparse-op-defs.h.

◆ SPARSE_ANY_ALL_OP_COL_CODE

#define SPARSE_ANY_ALL_OP_COL_CODE (   TEST_OP,
  TEST_TRUE_VAL 
)
Value:
if (data (i) TEST_OP 0.0) \
{ \
tmp[j] = TEST_TRUE_VAL; \
break; \
}

Definition at line 1739 of file Sparse-op-defs.h.

◆ SPARSE_ANY_ALL_OP_ROW_CODE

#define SPARSE_ANY_ALL_OP_ROW_CODE (   TEST_OP,
  TEST_TRUE_VAL 
)
Value:
if (data (i) TEST_OP 0.0) \
tmp[ridx (i)] = TEST_TRUE_VAL;

Definition at line 1735 of file Sparse-op-defs.h.

◆ SPARSE_ANY_OP

#define SPARSE_ANY_OP (   DIM)    SPARSE_ANY_ALL_OP (DIM, false, false, !=, true)

Definition at line 1761 of file Sparse-op-defs.h.

◆ SPARSE_BASE_REDUCTION_OP

#define SPARSE_BASE_REDUCTION_OP (   RET_TYPE,
  EL_TYPE,
  ROW_EXPR,
  COL_EXPR,
  INIT_VAL,
  MT_RESULT 
)

Definition at line 1595 of file Sparse-op-defs.h.

◆ SPARSE_CUMPROD

#define SPARSE_CUMPROD (   RET_TYPE,
  ELT_TYPE,
  FCN 
)

Definition at line 1539 of file Sparse-op-defs.h.

◆ SPARSE_CUMSUM

#define SPARSE_CUMSUM (   RET_TYPE,
  ELT_TYPE,
  FCN 
)

Definition at line 1471 of file Sparse-op-defs.h.

◆ SPARSE_FULL_MUL

#define SPARSE_FULL_MUL (   RET_TYPE,
  EL_TYPE 
)

Definition at line 1929 of file Sparse-op-defs.h.

◆ SPARSE_FULL_TRANS_MUL

#define SPARSE_FULL_TRANS_MUL (   RET_TYPE,
  EL_TYPE,
  CONJ_OP 
)

Definition at line 1963 of file Sparse-op-defs.h.

◆ SPARSE_MSM_BIN_OP_1

#define SPARSE_MSM_BIN_OP_1 (   R,
  F,
  OP,
  M1,
  M2 
)
Value:
R \
F (const M1& m1, const M2& m2) \
{ \
R r; \
\
octave_idx_type m1_nr = m1.rows (); \
octave_idx_type m1_nc = m1.cols (); \
\
octave_idx_type m2_nr = m2.rows (); \
octave_idx_type m2_nc = m2.cols (); \
\
if (m2_nr == 1 && m2_nc == 1) \
r = R (m1 OP m2.elem (0,0)); \
else if (m1_nr != m2_nr || m1_nc != m2_nc) \
octave::err_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \
else \
{ \
r = R (F (m1, m2.matrix_value ())); \
} \
return r; \
}
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
T * r
Definition: mx-inlines.cc:781

Definition at line 1053 of file Sparse-op-defs.h.

◆ SPARSE_MSM_BIN_OP_2

#define SPARSE_MSM_BIN_OP_2 (   R,
  F,
  OP,
  M1,
  M2 
)

Definition at line 1076 of file Sparse-op-defs.h.

◆ SPARSE_MSM_BIN_OPS

#define SPARSE_MSM_BIN_OPS (   R1,
  R2,
  M1,
  M2 
)
Value:
SPARSE_MSM_BIN_OP_1 (R1, operator +, +, M1, M2) \
SPARSE_MSM_BIN_OP_1 (R1, operator -, -, M1, M2) \
SPARSE_MSM_BIN_OP_2 (R2, product, *, M1, M2) \
SPARSE_MSM_BIN_OP_1 (R2, quotient, /, M1, M2)
ComplexColumnVector quotient(const ComplexColumnVector &x, const ComplexColumnVector &y)
Definition: CColVector.h:158
ComplexColumnVector product(const ComplexColumnVector &x, const ComplexColumnVector &y)
Definition: CColVector.h:158
#define SPARSE_MSM_BIN_OP_1(R, F, OP, M1, M2)

Definition at line 1125 of file Sparse-op-defs.h.

◆ SPARSE_MSM_BOOL_OP

#define SPARSE_MSM_BOOL_OP (   F,
  OP,
  M1,
  M2 
)

Definition at line 1195 of file Sparse-op-defs.h.

◆ SPARSE_MSM_BOOL_OPS

#define SPARSE_MSM_BOOL_OPS (   M1,
  M2 
)
Value:
SPARSE_MSM_BOOL_OP (mx_el_and, &&, M1, M2) \
SPARSE_MSM_BOOL_OP (mx_el_or, ||, M1, M2)
#define SPARSE_MSM_BOOL_OP(F, OP, M1, M2)
boolMatrix mx_el_or(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:88
boolMatrix mx_el_and(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:88

Definition at line 1252 of file Sparse-op-defs.h.

◆ SPARSE_MSM_CMP_OP

#define SPARSE_MSM_CMP_OP (   F,
  OP,
  M1,
  M2 
)

Definition at line 1131 of file Sparse-op-defs.h.

◆ SPARSE_MSM_CMP_OPS

#define SPARSE_MSM_CMP_OPS (   M1,
  M2 
)
Value:
SPARSE_MSM_CMP_OP (mx_el_lt, <, M1, M2) \
SPARSE_MSM_CMP_OP (mx_el_le, <=, M1, M2) \
SPARSE_MSM_CMP_OP (mx_el_ge, >=, M1, M2) \
SPARSE_MSM_CMP_OP (mx_el_gt, >, M1, M2) \
SPARSE_MSM_CMP_OP (mx_el_eq, ==, M1, M2) \
SPARSE_MSM_CMP_OP (mx_el_ne, !=, M1, M2)
#define SPARSE_MSM_CMP_OP(F, OP, M1, M2)
boolMatrix mx_el_le(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:91
boolMatrix mx_el_ne(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:91
boolMatrix mx_el_gt(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:91
boolMatrix mx_el_eq(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:91
boolMatrix mx_el_lt(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:91
boolMatrix mx_el_ge(const boolMatrix &m1, const boolMatrix &m2)
Definition: boolMatrix.cc:91

Definition at line 1183 of file Sparse-op-defs.h.

◆ SPARSE_MSM_EQNE_OPS

#define SPARSE_MSM_EQNE_OPS (   M1,
  M2 
)
Value:
SPARSE_MSM_CMP_OP (mx_el_eq, ==, M1, M2) \
SPARSE_MSM_CMP_OP (mx_el_ne, !=, M1, M2)

Definition at line 1191 of file Sparse-op-defs.h.

◆ SPARSE_REDUCTION_OP

#define SPARSE_REDUCTION_OP (   RET_TYPE,
  EL_TYPE,
  OP,
  INIT_VAL,
  MT_RESULT 
)
Value:
SPARSE_BASE_REDUCTION_OP (RET_TYPE, EL_TYPE, \
INIT_VAL, MT_RESULT)
#define SPARSE_REDUCTION_OP_COL_EXPR(OP)
#define SPARSE_REDUCTION_OP_ROW_EXPR(OP)

Definition at line 1727 of file Sparse-op-defs.h.

◆ SPARSE_REDUCTION_OP_COL_EXPR

#define SPARSE_REDUCTION_OP_COL_EXPR (   OP)     tmp[j] OP data (i)

Definition at line 1724 of file Sparse-op-defs.h.

◆ SPARSE_REDUCTION_OP_ROW_EXPR

#define SPARSE_REDUCTION_OP_ROW_EXPR (   OP)     tmp[ridx (i)] OP data (i)

Definition at line 1721 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BIN_OP_1

#define SPARSE_SMM_BIN_OP_1 (   R,
  F,
  OP,
  M1,
  M2 
)
Value:
R \
F (const M1& m1, const M2& m2) \
{ \
R r; \
\
octave_idx_type m1_nr = m1.rows (); \
octave_idx_type m1_nc = m1.cols (); \
\
octave_idx_type m2_nr = m2.rows (); \
octave_idx_type m2_nc = m2.cols (); \
\
if (m1_nr == 1 && m1_nc == 1) \
r = R (m1.elem (0,0) OP m2); \
else if (m1_nr != m2_nr || m1_nc != m2_nc) \
octave::err_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \
else \
{ \
r = R (m1.matrix_value () OP m2); \
} \
return r; \
}

Definition at line 1258 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BIN_OP_2

#define SPARSE_SMM_BIN_OP_2 (   R,
  F,
  OP,
  M1,
  M2 
)

Definition at line 1289 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BIN_OP_2_CHECK_product

#define SPARSE_SMM_BIN_OP_2_CHECK_product (   ET)     do_mx_check (m2, mx_inline_all_finite<ET>)

Definition at line 1282 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BIN_OP_2_CHECK_quotient

#define SPARSE_SMM_BIN_OP_2_CHECK_quotient (   ET)     ! do_mx_check (m2, mx_inline_any_nan<ET>) && m2.nnz () == m2.numel ()

Definition at line 1286 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BIN_OPS

#define SPARSE_SMM_BIN_OPS (   R1,
  R2,
  M1,
  M2 
)
Value:
SPARSE_SMM_BIN_OP_1 (R1, operator +, +, M1, M2) \
SPARSE_SMM_BIN_OP_1 (R1, operator -, -, M1, M2) \
SPARSE_SMM_BIN_OP_2 (R2, product, *, M1, M2) \
SPARSE_SMM_BIN_OP_2 (R2, quotient, /, M1, M2)
#define SPARSE_SMM_BIN_OP_1(R, F, OP, M1, M2)

Definition at line 1338 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BOOL_OP

#define SPARSE_SMM_BOOL_OP (   F,
  OP,
  M1,
  M2 
)

Definition at line 1408 of file Sparse-op-defs.h.

◆ SPARSE_SMM_BOOL_OPS

#define SPARSE_SMM_BOOL_OPS (   M1,
  M2 
)
Value:
SPARSE_SMM_BOOL_OP (mx_el_and, &&, M1, M2) \
SPARSE_SMM_BOOL_OP (mx_el_or, ||, M1, M2)
#define SPARSE_SMM_BOOL_OP(F, OP, M1, M2)

Definition at line 1465 of file Sparse-op-defs.h.

◆ SPARSE_SMM_CMP_OP

#define SPARSE_SMM_CMP_OP (   F,
  OP,
  M1,
  M2 
)

Definition at line 1344 of file Sparse-op-defs.h.

◆ SPARSE_SMM_CMP_OPS

#define SPARSE_SMM_CMP_OPS (   M1,
  M2 
)
Value:
SPARSE_SMM_CMP_OP (mx_el_lt, <, M1, M2) \
SPARSE_SMM_CMP_OP (mx_el_le, <=, M1, M2) \
SPARSE_SMM_CMP_OP (mx_el_ge, >=, M1, M2) \
SPARSE_SMM_CMP_OP (mx_el_gt, >, M1, M2) \
SPARSE_SMM_CMP_OP (mx_el_eq, ==, M1, M2) \
SPARSE_SMM_CMP_OP (mx_el_ne, !=, M1, M2)
#define SPARSE_SMM_CMP_OP(F, OP, M1, M2)

Definition at line 1396 of file Sparse-op-defs.h.

◆ SPARSE_SMM_EQNE_OPS

#define SPARSE_SMM_EQNE_OPS (   M1,
  M2 
)
Value:
SPARSE_SMM_CMP_OP (mx_el_eq, ==, M1, M2) \
SPARSE_SMM_CMP_OP (mx_el_ne, !=, M1, M2)

Definition at line 1404 of file Sparse-op-defs.h.

◆ SPARSE_SMS_BIN_OP_1

#define SPARSE_SMS_BIN_OP_1 (   R,
  F,
  OP,
  M,
 
)
Value:
R \
F (const M& m, const S& s) \
{ \
octave_idx_type nr = m.rows (); \
octave_idx_type nc = m.cols (); \
\
R r (nr, nc, (0.0 OP s)); \
for (octave_idx_type j = 0; j < nc; j++) \
for (octave_idx_type i = m.cidx (j); i < m.cidx (j+1); i++) \
r.xelem (m.ridx (i), j) = m.data (i) OP s; \
return r; \
}
F77_RET_T const F77_INT const F77_INT const F77_INT const F77_DBLE const F77_DBLE F77_INT & M
T octave_idx_type m
Definition: mx-inlines.cc:781
for(octave_idx_type i=0;i< n;i++) ac+
Definition: mx-inlines.cc:764

Definition at line 38 of file Sparse-op-defs.h.

◆ SPARSE_SMS_BIN_OP_2

#define SPARSE_SMS_BIN_OP_2 (   R,
  F,
  OP,
  M,
 
)
Value:
R \
F (const M& m, const S& s) \
{ \
octave_idx_type nr = m.rows (); \
octave_idx_type nc = m.cols (); \
octave_idx_type nz = m.nnz (); \
\
R r (nr, nc, nz); \
for (octave_idx_type i = 0; i < nz; i++) \
{ \
r.xdata (i) = m.data (i) OP s; \
r.xridx (i) = m.ridx (i); \
} \
for (octave_idx_type i = 0; i < nc + 1; i++) \
r.xcidx (i) = m.cidx (i); \
\
r.maybe_compress (true); \
return r; \
}

Definition at line 53 of file Sparse-op-defs.h.

◆ SPARSE_SMS_BIN_OPS

#define SPARSE_SMS_BIN_OPS (   R1,
  R2,
  M,
 
)
Value:
SPARSE_SMS_BIN_OP_1 (R1, operator +, +, M, S) \
SPARSE_SMS_BIN_OP_1 (R1, operator -, -, M, S) \
SPARSE_SMS_BIN_OP_2 (R2, operator *, *, M, S) \
SPARSE_SMS_BIN_OP_2 (R2, operator /, /, M, S)
#define SPARSE_SMS_BIN_OP_1(R, F, OP, M, S)

Definition at line 75 of file Sparse-op-defs.h.

◆ SPARSE_SMS_BOOL_AND_OP

#define SPARSE_SMS_BOOL_AND_OP (   M,
 
)

Definition at line 168 of file Sparse-op-defs.h.

◆ SPARSE_SMS_BOOL_OPS

#define SPARSE_SMS_BOOL_OPS (   M,
 
)
Value:
SPARSE_SMS_BOOL_OR_OP (M, S)
#define SPARSE_SMS_BOOL_AND_OP(M, S)

Definition at line 204 of file Sparse-op-defs.h.

◆ SPARSE_SMS_BOOL_OR_OP

#define SPARSE_SMS_BOOL_OR_OP (   M,
 
)

Definition at line 132 of file Sparse-op-defs.h.

◆ SPARSE_SMS_CMP_OP

#define SPARSE_SMS_CMP_OP (   F,
  OP,
  M,
 
)

Definition at line 81 of file Sparse-op-defs.h.

◆ SPARSE_SMS_CMP_OPS

#define SPARSE_SMS_CMP_OPS (   M,
 
)
Value:
SPARSE_SMS_CMP_OP (mx_el_le, <=, M, S) \
SPARSE_SMS_CMP_OP (mx_el_ge, >=, M, S) \
SPARSE_SMS_CMP_OP (mx_el_gt, >, M, S) \
SPARSE_SMS_CMP_OP (mx_el_eq, ==, M, S) \
SPARSE_SMS_CMP_OP (mx_el_ne, !=, M, S)
#define SPARSE_SMS_CMP_OP(F, OP, M, S)

Definition at line 120 of file Sparse-op-defs.h.

◆ SPARSE_SMS_EQNE_OPS

#define SPARSE_SMS_EQNE_OPS (   M,
 
)
Value:
SPARSE_SMS_CMP_OP (mx_el_ne, !=, M, S)

Definition at line 128 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BIN_OP_1

#define SPARSE_SMSM_BIN_OP_1 (   R,
  F,
  OP,
  M1,
  M2 
)

Definition at line 383 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BIN_OP_2

#define SPARSE_SMSM_BIN_OP_2 (   R,
  F,
  OP,
  M1,
  M2 
)

Definition at line 499 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BIN_OP_3

#define SPARSE_SMSM_BIN_OP_3 (   R,
  F,
  OP,
  M1,
  M2 
)

Definition at line 597 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BIN_OPS

#define SPARSE_SMSM_BIN_OPS (   R1,
  R2,
  M1,
  M2 
)
Value:
SPARSE_SMSM_BIN_OP_1 (R1, operator +, +, M1, M2) \
SPARSE_SMSM_BIN_OP_1 (R1, operator -, -, M1, M2) \
SPARSE_SMSM_BIN_OP_2 (R2, product, *, M1, M2) \
SPARSE_SMSM_BIN_OP_3 (R2, quotient, /, M1, M2)
#define SPARSE_SMSM_BIN_OP_1(R, F, OP, M1, M2)

Definition at line 717 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BOOL_AND_OP

#define SPARSE_SMSM_BOOL_AND_OP (   M1,
  M2 
)

Definition at line 905 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BOOL_OPS

#define SPARSE_SMSM_BOOL_OPS (   M1,
  M2 
)
Value:
SPARSE_SMSM_BOOL_OR_OP (M1, M2)
#define SPARSE_SMSM_BOOL_AND_OP(M1, M2)

Definition at line 1047 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_BOOL_OR_OP

#define SPARSE_SMSM_BOOL_OR_OP (   M1,
  M2 
)

Definition at line 969 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_CMP_OP

#define SPARSE_SMSM_CMP_OP (   F,
  OP,
  M1,
  M2 
)

Definition at line 726 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_CMP_OPS

#define SPARSE_SMSM_CMP_OPS (   M1,
  M2 
)
Value:
SPARSE_SMSM_CMP_OP (mx_el_le, <=, M1, M2) \
SPARSE_SMSM_CMP_OP (mx_el_ge, >=, M1, M2) \
SPARSE_SMSM_CMP_OP (mx_el_gt, >, M1, M2) \
SPARSE_SMSM_CMP_OP (mx_el_eq, ==, M1, M2) \
SPARSE_SMSM_CMP_OP (mx_el_ne, !=, M1, M2)
#define SPARSE_SMSM_CMP_OP(F, OP, M1, M2)

Definition at line 893 of file Sparse-op-defs.h.

◆ SPARSE_SMSM_EQNE_OPS

#define SPARSE_SMSM_EQNE_OPS (   M1,
  M2 
)
Value:
SPARSE_SMSM_CMP_OP (mx_el_eq, ==, M1, M2) \
SPARSE_SMSM_CMP_OP (mx_el_ne, !=, M1, M2)

Definition at line 901 of file Sparse-op-defs.h.

◆ SPARSE_SPARSE_MUL

#define SPARSE_SPARSE_MUL (   RET_TYPE,
  RET_EL_TYPE,
  EL_TYPE 
)

Definition at line 1763 of file Sparse-op-defs.h.

◆ SPARSE_SSM_BIN_OP_1

#define SPARSE_SSM_BIN_OP_1 (   R,
  F,
  OP,
  S,
  M 
)
Value:
R \
F (const S& s, const M& m) \
{ \
octave_idx_type nr = m.rows (); \
octave_idx_type nc = m.cols (); \
\
R r (nr, nc, (s OP 0.0)); \
for (octave_idx_type j = 0; j < nc; j++) \
for (octave_idx_type i = m.cidx (j); i < m.cidx (j+1); i++) \
r.xelem (m.ridx (i), j) = s OP m.data (i); \
\
return r; \
}

Definition at line 210 of file Sparse-op-defs.h.

◆ SPARSE_SSM_BIN_OP_2

#define SPARSE_SSM_BIN_OP_2 (   R,
  F,
  OP,
  S,
  M 
)
Value:
R \
F (const S& s, const M& m) \
{ \
octave_idx_type nr = m.rows (); \
octave_idx_type nc = m.cols (); \
octave_idx_type nz = m.nnz (); \
\
R r (nr, nc, nz); \
for (octave_idx_type i = 0; i < nz; i++) \
{ \
r.xdata (i) = s OP m.data (i); \
r.xridx (i) = m.ridx (i); \
} \
for (octave_idx_type i = 0; i < nc + 1; i++) \
r.xcidx (i) = m.cidx (i); \
\
r.maybe_compress(true); \
return r; \
}

Definition at line 226 of file Sparse-op-defs.h.

◆ SPARSE_SSM_BIN_OPS

#define SPARSE_SSM_BIN_OPS (   R1,
  R2,
  S,
  M 
)
Value:
SPARSE_SSM_BIN_OP_1 (R1, operator +, +, S, M) \
SPARSE_SSM_BIN_OP_1 (R1, operator -, -, S, M) \
SPARSE_SSM_BIN_OP_2 (R2, operator *, *, S, M) \
SPARSE_SSM_BIN_OP_2 (R2, operator /, /, S, M)
#define SPARSE_SSM_BIN_OP_1(R, F, OP, S, M)

Definition at line 248 of file Sparse-op-defs.h.

◆ SPARSE_SSM_BOOL_AND_OP

#define SPARSE_SSM_BOOL_AND_OP (   S,
  M 
)

Definition at line 341 of file Sparse-op-defs.h.

◆ SPARSE_SSM_BOOL_OPS

#define SPARSE_SSM_BOOL_OPS (   S,
  M 
)
Value:
SPARSE_SSM_BOOL_OR_OP (S, M)
#define SPARSE_SSM_BOOL_AND_OP(S, M)

Definition at line 377 of file Sparse-op-defs.h.

◆ SPARSE_SSM_BOOL_OR_OP

#define SPARSE_SSM_BOOL_OR_OP (   S,
  M 
)

Definition at line 305 of file Sparse-op-defs.h.

◆ SPARSE_SSM_CMP_OP

#define SPARSE_SSM_CMP_OP (   F,
  OP,
  S,
  M 
)

Definition at line 254 of file Sparse-op-defs.h.

◆ SPARSE_SSM_CMP_OPS

#define SPARSE_SSM_CMP_OPS (   S,
  M 
)
Value:
SPARSE_SSM_CMP_OP (mx_el_le, <=, S, M) \
SPARSE_SSM_CMP_OP (mx_el_ge, >=, S, M) \
SPARSE_SSM_CMP_OP (mx_el_gt, >, S, M) \
SPARSE_SSM_CMP_OP (mx_el_eq, ==, S, M) \
SPARSE_SSM_CMP_OP (mx_el_ne, !=, S, M)
#define SPARSE_SSM_CMP_OP(F, OP, S, M)

Definition at line 293 of file Sparse-op-defs.h.

◆ SPARSE_SSM_EQNE_OPS

#define SPARSE_SSM_EQNE_OPS (   S,
  M 
)
Value:
SPARSE_SSM_CMP_OP (mx_el_ne, !=, S, M)

Definition at line 301 of file Sparse-op-defs.h.