GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
SparseBoolMatrix Class Reference

#include "boolSparse.h"

Inheritance diagram for SparseBoolMatrix:
Sparse< bool >

Public Types

typedef boolMatrix dense_matrix_type
 
- Public Types inherited from Sparse< bool >
typedef bool element_type
 

Public Member Functions

 SparseBoolMatrix ()
 
 SparseBoolMatrix (const Array< bool > &a, const octave::idx_vector &r, const octave::idx_vector &c, octave_idx_type nr=-1, octave_idx_type nc=-1, bool sum_terms=true, octave_idx_type nzm=-1)
 
 SparseBoolMatrix (const boolMatrix &a)
 
 SparseBoolMatrix (const boolNDArray &a)
 
 SparseBoolMatrix (const dim_vector &dv, octave_idx_type nz=0)
 
 SparseBoolMatrix (const PermMatrix &a)
 
 SparseBoolMatrix (const Sparse< bool > &a)
 
 SparseBoolMatrix (const SparseBoolMatrix &a)
 
 SparseBoolMatrix (const SparseBoolMatrix &a, const dim_vector &dv)
 
 SparseBoolMatrix (octave_idx_type r, octave_idx_type c)
 
 SparseBoolMatrix (octave_idx_type r, octave_idx_type c, bool val)
 
 SparseBoolMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
 
 ~SparseBoolMatrix ()=default
 
SparseBoolMatrix all (int dim=-1) const
 
SparseBoolMatrix any (int dim=-1) const
 
SparseBoolMatrix concat (const SparseBoolMatrix &rb, const Array< octave_idx_type > &ra_idx)
 
SparseBoolMatrix diag (octave_idx_type k=0) const
 
SparseBoolMatrix index (const octave::idx_vector &i, bool resize_ok) const
 
SparseBoolMatrix index (const octave::idx_vector &i, const octave::idx_vector &j, bool resize_ok) const
 
SparseBoolMatrixinsert (const SparseBoolMatrix &a, const Array< octave_idx_type > &indx)
 
SparseBoolMatrixinsert (const SparseBoolMatrix &a, octave_idx_type r, octave_idx_type c)
 
SparseBoolMatrix ipermute (const Array< octave_idx_type > &vec) const
 
boolMatrix matrix_value () const
 
SparseBoolMatrix operator! () const
 
bool operator!= (const SparseBoolMatrix &a) const
 
SparseBoolMatrixoperator= (const SparseBoolMatrix &a)
 
bool operator== (const SparseBoolMatrix &a) const
 
SparseBoolMatrix permute (const Array< octave_idx_type > &vec, bool inv=false) const
 
SparseBoolMatrix reshape (const dim_vector &new_dims) const
 
SparseBoolMatrix squeeze () const
 
SparseMatrix sum (int dim=-1) const
 
SparseBoolMatrix transpose () const
 
- Public Member Functions inherited from Sparse< bool >
 Sparse ()
 
 Sparse (const Array< bool > &a)
 
 Sparse (const Array< bool > &a, const octave::idx_vector &r, const octave::idx_vector &c, octave_idx_type nr=-1, octave_idx_type nc=-1, bool sum_terms=true, octave_idx_type nzm=-1)
 
 Sparse (const dim_vector &dv)
 
 Sparse (const dim_vector &dv, octave_idx_type nz)
 
 Sparse (const dim_vector &dv, octave_idx_type nz, bool *ptr, octave_idx_type *ridx, octave_idx_type *cidx, const Alloc &xallocator=Alloc())
 
 Sparse (const PermMatrix &a)
 
 Sparse (const Sparse< bool, Alloc > &a)
 
 Sparse (const Sparse< bool, Alloc > &a, const dim_vector &dv)
 
 Sparse (const Sparse< U > &a)
 
 Sparse (octave_idx_type n)
 
 Sparse (octave_idx_type nr, octave_idx_type nc)
 
 Sparse (octave_idx_type nr, octave_idx_type nc, bool val)
 
 Sparse (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz)
 
virtual ~Sparse ()
 
bool any_element_is_nan () const
 
Array< bool > array_value () const
 
void assign (const octave::idx_vector &i, const bool &rhs)
 
void assign (const octave::idx_vector &i, const octave::idx_vector &j, const bool &rhs)
 
void assign (const octave::idx_vector &i, const octave::idx_vector &j, const Sparse< bool, Alloc > &rhs)
 
void assign (const octave::idx_vector &i, const Sparse< bool, Alloc > &rhs)
 
std::size_t byte_size () const
 
void change_capacity (octave_idx_type nz)
 
bool & checkelem (const Array< octave_idx_type > &ra_idx)
 
bool checkelem (const Array< octave_idx_type > &ra_idx) const
 
bool & checkelem (octave_idx_type i, octave_idx_type j)
 
bool checkelem (octave_idx_type i, octave_idx_type j) const
 
bool & checkelem (octave_idx_type n)
 
bool checkelem (octave_idx_type n) const
 
octave_idx_typecidx ()
 
octave_idx_typecidx () const
 
octave_idx_typecidx (octave_idx_type i)
 
octave_idx_type cidx (octave_idx_type i) const
 
octave_idx_type cols () const
 
octave_idx_type columns () const
 
octave_idx_type compute_index (const Array< octave_idx_type > &ra_idx) const
 
bool * data ()
 
bool * data () const
 
bool & data (octave_idx_type i)
 
bool data (octave_idx_type i) const
 
void delete_elements (const octave::idx_vector &i)
 
void delete_elements (const octave::idx_vector &i, const octave::idx_vector &j)
 
void delete_elements (int dim, const octave::idx_vector &i)
 
Sparse< bool, Allocdiag (octave_idx_type k=0) const
 
octave_idx_type dim1 () const
 
octave_idx_type dim2 () const
 
dim_vector dims () const
 
bool & elem (const Array< octave_idx_type > &ra_idx)
 
bool elem (const Array< octave_idx_type > &ra_idx) const
 
bool & elem (octave_idx_type i, octave_idx_type j)
 
bool elem (octave_idx_type i, octave_idx_type j) const
 
bool & elem (octave_idx_type n)
 
bool elem (octave_idx_type n) const
 
octave_idx_type get_col_index (octave_idx_type k)
 
octave_idx_type get_row_index (octave_idx_type k)
 
Sparse< bool, Allocindex (const octave::idx_vector &i, bool resize_ok=false) const
 
Sparse< bool, Allocindex (const octave::idx_vector &i, const octave::idx_vector &j, bool resize_ok=false) const
 
bool indices_ok () const
 
Sparse< bool, Alloc > & insert (const Sparse< bool, Alloc > &a, const Array< octave_idx_type > &idx)
 
Sparse< bool, Alloc > & insert (const Sparse< bool, Alloc > &a, octave_idx_type r, octave_idx_type c)
 
Sparse< bool, Allocipermute (const Array< octave_idx_type > &vec) const
 
bool isempty () const
 
bool issquare () const
 
Sparse< U > map (F fcn) const
 
Sparse< U > map (U(&fcn)(bool)) const
 
Sparse< U > map (U(&fcn)(const bool &)) const
 
Sparse< bool, Allocmaybe_compress (bool remove_zeros=false)
 
octave_idx_type ndims () const
 
octave_idx_type nnz () const
 Actual number of nonzero terms. More...
 
octave_idx_type numel () const
 
octave_idx_type nzmax () const
 Amount of storage for nonzero elements. More...
 
bool & operator() (const Array< octave_idx_type > &ra_idx)
 
bool operator() (const Array< octave_idx_type > &ra_idx) const
 
bool & operator() (octave_idx_type i, octave_idx_type j)
 
bool operator() (octave_idx_type i, octave_idx_type j) const
 
bool & operator() (octave_idx_type n)
 
bool operator() (octave_idx_type n) const
 
Sparse< bool, Alloc > & operator= (const Sparse< bool, Alloc > &a)
 
Sparse< bool, Allocpermute (const Array< octave_idx_type > &vec, bool inv=false) const
 
void print_info (std::ostream &os, const std::string &prefix) const
 
OCTAVE_NORETURN bool & range_error (const char *fcn, const Array< octave_idx_type > &ra_idx)
 
OCTAVE_NORETURN bool range_error (const char *fcn, const Array< octave_idx_type > &ra_idx) const
 
OCTAVE_NORETURN bool & range_error (const char *fcn, octave_idx_type i, octave_idx_type j)
 
OCTAVE_NORETURN bool range_error (const char *fcn, octave_idx_type i, octave_idx_type j) const
 
OCTAVE_NORETURN bool & range_error (const char *fcn, octave_idx_type n)
 
OCTAVE_NORETURN bool range_error (const char *fcn, octave_idx_type n) const
 
Sparse< bool, Allocreshape (const dim_vector &new_dims) const
 
void resize (const dim_vector &dv)
 
void resize (octave_idx_type r, octave_idx_type c)
 
void resize1 (octave_idx_type n)
 
octave_idx_typeridx ()
 
octave_idx_typeridx () const
 
octave_idx_typeridx (octave_idx_type i)
 
octave_idx_type ridx (octave_idx_type i) const
 
octave_idx_type rows () const
 
Sparse< bool, Allocsort (Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
 
Sparse< bool, Allocsort (octave_idx_type dim=0, sortmode mode=ASCENDING) const
 
Sparse< bool, Allocsqueeze () const
 
bool test (F fcn) const
 
bool test_all (bool(&fcn)(bool)) const
 
bool test_all (bool(&fcn)(const bool &)) const
 
bool test_all (F fcn) const
 
bool test_any (bool(&fcn)(bool)) const
 
bool test_any (bool(&fcn)(const bool &)) const
 
bool test_any (F fcn) const
 
Sparse< bool, Alloctranspose () const
 
octave_idx_typexcidx ()
 
octave_idx_typexcidx (octave_idx_type i)
 
bool * xdata ()
 
bool & xdata (octave_idx_type i)
 
bool & xelem (const Array< octave_idx_type > &ra_idx)
 
bool xelem (const Array< octave_idx_type > &ra_idx) const
 
bool & xelem (octave_idx_type i, octave_idx_type j)
 
bool xelem (octave_idx_type i, octave_idx_type j) const
 
bool & xelem (octave_idx_type n)
 
bool xelem (octave_idx_type n) const
 
octave_idx_typexridx ()
 
octave_idx_typexridx (octave_idx_type i)
 

Friends

std::ostream & operator<< (std::ostream &os, const SparseBoolMatrix &a)
 
std::istream & operator>> (std::istream &is, SparseBoolMatrix &a)
 

Additional Inherited Members

- Static Public Member Functions inherited from Sparse< bool >
static Sparse< bool, Alloccat (int dim, octave_idx_type n, const Sparse< bool, Alloc > *sparse_list)
 
- Protected Member Functions inherited from Sparse< bool >
void make_unique ()
 
- Protected Attributes inherited from Sparse< bool >
dim_vector m_dimensions
 
Sparse< bool, Alloc >::SparseRep * m_rep
 

Detailed Description

Definition at line 38 of file boolSparse.h.

Member Typedef Documentation

◆ dense_matrix_type

Definition at line 45 of file boolSparse.h.

Constructor & Destructor Documentation

◆ SparseBoolMatrix() [1/12]

SparseBoolMatrix::SparseBoolMatrix ( )
inline

Definition at line 47 of file boolSparse.h.

◆ SparseBoolMatrix() [2/12]

SparseBoolMatrix::SparseBoolMatrix ( octave_idx_type  r,
octave_idx_type  c 
)
inline

Definition at line 49 of file boolSparse.h.

◆ SparseBoolMatrix() [3/12]

SparseBoolMatrix::SparseBoolMatrix ( octave_idx_type  r,
octave_idx_type  c,
bool  val 
)
inlineexplicit

Definition at line 52 of file boolSparse.h.

◆ SparseBoolMatrix() [4/12]

SparseBoolMatrix::SparseBoolMatrix ( const dim_vector dv,
octave_idx_type  nz = 0 
)
inline

Definition at line 55 of file boolSparse.h.

◆ SparseBoolMatrix() [5/12]

SparseBoolMatrix::SparseBoolMatrix ( const Sparse< bool > &  a)
inline

Definition at line 58 of file boolSparse.h.

◆ SparseBoolMatrix() [6/12]

SparseBoolMatrix::SparseBoolMatrix ( const SparseBoolMatrix a)
inline

Definition at line 60 of file boolSparse.h.

◆ SparseBoolMatrix() [7/12]

SparseBoolMatrix::SparseBoolMatrix ( const SparseBoolMatrix a,
const dim_vector dv 
)
inline

Definition at line 62 of file boolSparse.h.

◆ SparseBoolMatrix() [8/12]

SparseBoolMatrix::SparseBoolMatrix ( const boolMatrix a)
inlineexplicit

Definition at line 65 of file boolSparse.h.

◆ SparseBoolMatrix() [9/12]

SparseBoolMatrix::SparseBoolMatrix ( const boolNDArray a)
inlineexplicit

Definition at line 67 of file boolSparse.h.

◆ SparseBoolMatrix() [10/12]

SparseBoolMatrix::SparseBoolMatrix ( const PermMatrix a)
inlineexplicit

Definition at line 69 of file boolSparse.h.

◆ SparseBoolMatrix() [11/12]

SparseBoolMatrix::SparseBoolMatrix ( const Array< bool > &  a,
const octave::idx_vector r,
const octave::idx_vector c,
octave_idx_type  nr = -1,
octave_idx_type  nc = -1,
bool  sum_terms = true,
octave_idx_type  nzm = -1 
)
inline

Definition at line 71 of file boolSparse.h.

◆ SparseBoolMatrix() [12/12]

SparseBoolMatrix::SparseBoolMatrix ( octave_idx_type  r,
octave_idx_type  c,
octave_idx_type  num_nz 
)
inline

Definition at line 77 of file boolSparse.h.

◆ ~SparseBoolMatrix()

SparseBoolMatrix::~SparseBoolMatrix ( )
default

Member Function Documentation

◆ all()

SparseBoolMatrix SparseBoolMatrix::all ( int  dim = -1) const

Definition at line 140 of file boolSparse.cc.

References SPARSE_ALL_OP.

Referenced by octave_base_sparse< T >::all(), and Fprod().

◆ any()

◆ concat()

SparseBoolMatrix SparseBoolMatrix::concat ( const SparseBoolMatrix rb,
const Array< octave_idx_type > &  ra_idx 
)

Definition at line 93 of file boolSparse.cc.

References Sparse< T, Alloc >::cols(), insert(), ra_idx, and Sparse< T, Alloc >::rows().

◆ diag()

SparseBoolMatrix SparseBoolMatrix::diag ( octave_idx_type  k = 0) const

Definition at line 242 of file boolSparse.cc.

References Sparse< T, Alloc >::diag().

Referenced by octave_base_sparse< T >::diag().

◆ index() [1/2]

SparseBoolMatrix SparseBoolMatrix::index ( const octave::idx_vector i,
bool  resize_ok 
) const

Definition at line 293 of file boolSparse.cc.

References Sparse< T, Alloc >::index().

◆ index() [2/2]

SparseBoolMatrix SparseBoolMatrix::index ( const octave::idx_vector i,
const octave::idx_vector j,
bool  resize_ok 
) const

Definition at line 299 of file boolSparse.cc.

References Sparse< T, Alloc >::index().

◆ insert() [1/2]

SparseBoolMatrix & SparseBoolMatrix::insert ( const SparseBoolMatrix a,
const Array< octave_idx_type > &  indx 
)

Definition at line 85 of file boolSparse.cc.

References Sparse< T, Alloc >::insert().

◆ insert() [2/2]

SparseBoolMatrix & SparseBoolMatrix::insert ( const SparseBoolMatrix a,
octave_idx_type  r,
octave_idx_type  c 
)

Definition at line 77 of file boolSparse.cc.

References Sparse< T, Alloc >::insert(), and r.

Referenced by concat().

◆ ipermute()

SparseBoolMatrix SparseBoolMatrix::ipermute ( const Array< octave_idx_type > &  vec) const

Definition at line 318 of file boolSparse.cc.

References Sparse< T, Alloc >::ipermute().

◆ matrix_value()

◆ operator!()

SparseBoolMatrix SparseBoolMatrix::operator! ( ) const

◆ operator!=()

bool SparseBoolMatrix::operator!= ( const SparseBoolMatrix a) const

Definition at line 71 of file boolSparse.cc.

◆ operator=()

SparseBoolMatrix& SparseBoolMatrix::operator= ( const SparseBoolMatrix a)
inline

Definition at line 80 of file boolSparse.h.

References Sparse< T, Alloc >::operator=().

◆ operator==()

◆ permute()

SparseBoolMatrix SparseBoolMatrix::permute ( const Array< octave_idx_type > &  vec,
bool  inv = false 
) const

Definition at line 312 of file boolSparse.cc.

References Sparse< T, Alloc >::permute().

Referenced by octave_base_sparse< T >::permute().

◆ reshape()

SparseBoolMatrix SparseBoolMatrix::reshape ( const dim_vector new_dims) const

Definition at line 306 of file boolSparse.cc.

References Sparse< T, Alloc >::reshape().

Referenced by octave_base_sparse< T >::reshape().

◆ squeeze()

SparseBoolMatrix SparseBoolMatrix::squeeze ( ) const

Definition at line 287 of file boolSparse.cc.

References Sparse< T, Alloc >::squeeze().

Referenced by octave_base_sparse< T >::squeeze().

◆ sum()

◆ transpose()

SparseBoolMatrix SparseBoolMatrix::transpose ( ) const
inline

Definition at line 91 of file boolSparse.h.

References Sparse< T, Alloc >::transpose().

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 261 of file boolSparse.cc.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
SparseBoolMatrix a 
)
friend

Definition at line 279 of file boolSparse.cc.


The documentation for this class was generated from the following files: