#include <climits>
#include <iostream>
#include <vector>
#include "lo-specfun.h"
#include "lo-mappers.h"
#include "oct-locbuf.h"
#include "ov-base.h"
#include "ov-scalar.h"
#include "ov-complex.h"
#include "gripes.h"
#include "ov-re-sparse.h"
#include "ov-cx-sparse.h"
#include "ov-base-sparse.h"
#include "ov-base-sparse.cc"
#include "ov-bool-sparse.h"
Defines | |
#define | SPARSE_MAPPER(MAP, AMAP, FCN) |
#define | DSPARSE_MAPPER(MAP, AMAP, FCN) |
#define | CD_SPARSE_MAPPER(MAP, RFCN, CFCN, L1, L2) |
Functions | |
DEFINE_OCTAVE_ALLOCATOR (octave_sparse_complex_matrix) | |
DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_complex_matrix,"sparse complex matrix","double") | |
Variables | |
template class OCTINTERP_API | octave_base_sparse< SparseComplexMatrix > |
#define CD_SPARSE_MAPPER | ( | MAP, | |||
RFCN, | |||||
CFCN, | |||||
L1, | |||||
L2 | ) |
Value:
octave_value \ octave_sparse_complex_matrix::MAP (void) const \ { \ static SparseComplexMatrix::dmapper idmap = ximag; \ SparseMatrix m = matrix.map (idmap); \ if (m.all_elements_are_zero ()) \ { \ static SparseComplexMatrix::dmapper rdmap = xreal; \ m = matrix.map (rdmap); \ static SparseMatrix::dmapper dmap = RFCN; \ static SparseMatrix::cmapper cmap = CFCN; \ return (any_element_less_than (m, L1) \ ? octave_value (m.map (cmap)) \ : (any_element_greater_than (m, L2) \ ? octave_value (m.map (cmap)) \ : octave_value (m.map (dmap)))); \ } \ else \ { \ error ("%s: not defined for complex arguments", #MAP); \ return octave_value (); \ } \ }
#define DSPARSE_MAPPER | ( | MAP, | |||
AMAP, | |||||
FCN | ) |
Value:
octave_value \ octave_sparse_complex_matrix::MAP (void) const \ { \ static SparseComplexMatrix::dmapper dmap = ximag; \ SparseMatrix m = matrix.map (dmap); \ if (m.all_elements_are_zero ()) \ { \ dmap = xreal; \ m = matrix.map (dmap); \ static AMAP cmap = FCN; \ return m.map (cmap); \ } \ else \ { \ error ("%s: not defined for complex arguments", #MAP); \ return octave_value (); \ } \ }
#define SPARSE_MAPPER | ( | MAP, | |||
AMAP, | |||||
FCN | ) |
Value:
octave_value \ octave_sparse_complex_matrix::MAP (void) const \ { \ static AMAP cmap = FCN; \ return matrix.map (cmap); \ }
DEFINE_OCTAVE_ALLOCATOR | ( | octave_sparse_complex_matrix | ) |
DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA | ( | octave_sparse_complex_matrix | , | |
"sparse complex matrix" | , | |||
"double" | ||||
) |
template class OCTINTERP_API octave_base_sparse< SparseComplexMatrix > |