25 #if defined (HAVE_CONFIG_H) 54 if (nr != nr_a || nc != nc_a || nz != nz_a)
95 if (rb.
rows () > 0 && rb.
cols () > 0)
151 dim = (nr == 1 && nc != 1) ? 1 : 0;
161 retval.change_capacity (new_nz);
163 std::fill_n (
retval.data (), new_nz,
true);
179 std::copy_n (
ridx (), nz,
tmp.fortran_vec ());
182 idx_vector (static_cast<octave_idx_type> (0)),
198 dim = (nr == 1 && nc != 1) ? 1 : 0;
207 retval.change_capacity (new_nz);
230 std::copy_n (
ridx (), nz,
tmp.fortran_vec ());
233 idx_vector (static_cast<octave_idx_type> (0)),
272 os <<
a.ridx (
i) + 1 <<
' ' << j + 1 <<
' ' <<
a.data (
i) <<
"\n";
283 return read_sparse_matrix<elt_type> (
is,
a, octave_read_value<bool>);
300 bool resize_ok)
const #define SPARSE_SMS_EQNE_OPS(M, MZ, CM, S, SZ, CS)
Sparse< T > permute(const Array< octave_idx_type > &vec, bool inv=false) const
SparseBoolMatrix reshape(const dim_vector &new_dims) const
const octave_base_value const Array< octave_idx_type > & ra_idx
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Sparse< T > index(const idx_vector &i, bool resize_ok=false) const
boolMatrix matrix_value(void) const
#define SPARSE_SMSM_EQNE_OPS(M1, Z1, C1, M2, Z2, C2)
octave_idx_type * cidx(void)
SparseBoolMatrix permute(const Array< octave_idx_type > &vec, bool inv=false) const
#define SPARSE_SMSM_BOOL_OPS(M1, M2, ZERO)
Sparse< T > diag(octave_idx_type k=0) const
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
SparseBoolMatrix ipermute(const Array< octave_idx_type > &vec) const
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
#define SPARSE_ALL_OP(DIM)
SparseBoolMatrix diag(octave_idx_type k=0) const
octave_idx_type nnz(void) const
Actual number of nonzero terms.
#define SPARSE_SSM_EQNE_OPS(S, SZ, SC, M, MZ, MC)
bool operator!=(const SparseBoolMatrix &a) const
SparseBoolMatrix concat(const SparseBoolMatrix &rb, const Array< octave_idx_type > &ra_idx)
SparseBoolMatrix & insert(const SparseBoolMatrix &a, octave_idx_type r, octave_idx_type c)
SparseBoolMatrix index(const idx_vector &i, bool resize_ok) const
bool operator==(const SparseBoolMatrix &a) const
octave_idx_type * ridx(void)
SparseBoolMatrix squeeze(void) const
SparseBoolMatrix all(int dim=-1) const
SparseMatrix sum(int dim=-1) const
octave_idx_type cols(void) const
SparseBoolMatrix any(int dim=-1) const
Sparse< T > squeeze(void) const
Sparse< T > & insert(const Sparse< T > &a, octave_idx_type r, octave_idx_type c)
SparseBoolMatrix operator!(void) const
Sparse< T > reshape(const dim_vector &new_dims) const
Sparse< T > ipermute(const Array< octave_idx_type > &vec) const
#define SPARSE_SMS_BOOL_OPS(M, S, ZERO)
#define SPARSE_SSM_BOOL_OPS(S, M, ZERO)
write the output to stdout if nargout is
Vector representing the dimensions (size) of an Array.
std::ostream & operator<<(std::ostream &os, const SparseBoolMatrix &a)
octave_idx_type rows(void) const