Mercurial > hg > octave-terminal
changeset 10312:cbc402e64d83
untabify liboctave header files
line wrap: on
line diff
--- a/liboctave/Array-util.h +++ b/liboctave/Array-util.h @@ -31,11 +31,11 @@ #include "lo-error.h" extern OCTAVE_API bool index_in_bounds (const Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); extern OCTAVE_API void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); extern OCTAVE_API octave_idx_type get_scalar_idx (Array<octave_idx_type>& idx, dim_vector& dims); @@ -54,7 +54,7 @@ extern OCTAVE_API Array<idx_vector> conv_to_array (const idx_vector *tmp, const octave_idx_type len); extern OCTAVE_API dim_vector freeze (Array<idx_vector>& ra_idx, - const dim_vector& dimensions, int resize_ok); + const dim_vector& dimensions, int resize_ok); extern OCTAVE_API bool vector_equivalent (const dim_vector& dv); @@ -63,12 +63,12 @@ extern OCTAVE_API bool any_orig_empty (const Array<idx_vector>& ra_idx); extern OCTAVE_API bool all_colon_equiv (const Array<idx_vector>& ra_idx, - const dim_vector& frozen_lengths); + const dim_vector& frozen_lengths); extern OCTAVE_API bool all_ones (const Array<octave_idx_type>& arr); extern OCTAVE_API Array<octave_idx_type> get_elt_idx (const Array<idx_vector>& ra_idx, - const Array<octave_idx_type>& result_idx); + const Array<octave_idx_type>& result_idx); extern OCTAVE_API Array<octave_idx_type> get_ra_idx (octave_idx_type idx, const dim_vector& dims); @@ -96,10 +96,10 @@ extern void OCTAVE_API gripe_nonconformant (const char *op, int op1_len, int op2_len); extern void OCTAVE_API gripe_nonconformant (const char *op, int op1_nr, int op1_nc, - int op2_nr, int op2_nc); + int op2_nr, int op2_nc); extern void OCTAVE_API gripe_nonconformant (const char *op, dim_vector& op1_dims, - dim_vector& op2_dims); + dim_vector& op2_dims); #endif
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -114,7 +114,7 @@ typedef typename ref_param<T>::type crefT; typedef bool (*compare_fcn_type) (typename ref_param<T>::type, - typename ref_param<T>::type); + typename ref_param<T>::type); protected: @@ -164,7 +164,7 @@ typename Array<T>::ArrayRep *nil_rep (void) const { static typename Array<T>::ArrayRep *nr - = new typename Array<T>::ArrayRep (); + = new typename Array<T>::ArrayRep (); return nr; } @@ -340,28 +340,28 @@ T& checkelem (octave_idx_type n) { if (n < 0 || n >= slice_len) - return range_error ("T& Array<T>::checkelem", n); + return range_error ("T& Array<T>::checkelem", n); else - { - make_unique (); - return xelem (n); - } + { + make_unique (); + return xelem (n); + } } T& checkelem (octave_idx_type i, octave_idx_type j) { if (i < 0 || j < 0 || i >= dim1 () || j >= dim2 ()) - return range_error ("T& Array<T>::checkelem", i, j); + return range_error ("T& Array<T>::checkelem", i, j); else - return elem (dim1()*j+i); + return elem (dim1()*j+i); } T& checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) { if (i < 0 || j < 0 || k < 0 || i >= dim1 () || j >= dim2 () || k >= dim3 ()) - return range_error ("T& Array<T>::checkelem", i, j, k); + return range_error ("T& Array<T>::checkelem", i, j, k); else - return elem (i, dim2()*k+j); + return elem (i, dim2()*k+j); } T& checkelem (const Array<octave_idx_type>& ra_idx) @@ -369,9 +369,9 @@ octave_idx_type i = compute_index (ra_idx); if (i < 0) - return range_error ("T& Array<T>::checkelem", ra_idx); + return range_error ("T& Array<T>::checkelem", ra_idx); else - return elem (i); + return elem (i); } T& elem (octave_idx_type n) @@ -402,25 +402,25 @@ crefT checkelem (octave_idx_type n) const { if (n < 0 || n >= slice_len) - return range_error ("T Array<T>::checkelem", n); + return range_error ("T Array<T>::checkelem", n); else - return xelem (n); + return xelem (n); } crefT checkelem (octave_idx_type i, octave_idx_type j) const { if (i < 0 || j < 0 || i >= dim1 () || j >= dim2 ()) - return range_error ("T Array<T>::checkelem", i, j); + return range_error ("T Array<T>::checkelem", i, j); else - return elem (dim1()*j+i); + return elem (dim1()*j+i); } crefT checkelem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const { if (i < 0 || j < 0 || k < 0 || i >= dim1 () || j >= dim2 () || k >= dim3 ()) - return range_error ("T Array<T>::checkelem", i, j, k); + return range_error ("T Array<T>::checkelem", i, j, k); else - return Array<T>::elem (i, Array<T>::dim1()*k+j); + return Array<T>::elem (i, Array<T>::dim1()*k+j); } crefT checkelem (const Array<octave_idx_type>& ra_idx) const @@ -428,9 +428,9 @@ octave_idx_type i = compute_index (ra_idx); if (i < 0) - return range_error ("T Array<T>::checkelem", ra_idx); + return range_error ("T Array<T>::checkelem", ra_idx); else - return Array<T>::elem (i); + return Array<T>::elem (i); } crefT elem (octave_idx_type n) const { return xelem (n); } @@ -613,7 +613,7 @@ Array<T> sort (int dim = 0, sortmode mode = ASCENDING) const; Array<T> sort (Array<octave_idx_type> &sidx, int dim = 0, - sortmode mode = ASCENDING) const; + sortmode mode = ASCENDING) const; // Ordering is auto-detected or can be specified. sortmode is_sorted (sortmode mode = UNSORTED) const; @@ -659,7 +659,7 @@ octave_idx_type i; for (i = 0; i < len - 3; i += 4) { - octave_quit (); + octave_quit (); p[i] = fcn (m[i]); p[i+1] = fcn (m[i+1]);
--- a/liboctave/Array2.h +++ b/liboctave/Array2.h @@ -57,15 +57,15 @@ Array2 (const dim_vector& dv) : Array<T> (dv) { if (dv.length () != 2) - (*current_liboctave_error_handler) ("too many dimensions"); + (*current_liboctave_error_handler) ("too many dimensions"); } Array2 (const dim_vector& dv, const T& val) : Array<T> (dv) { if (dv.length () != 2) - (*current_liboctave_error_handler) ("too many dimensions"); + (*current_liboctave_error_handler) ("too many dimensions"); else - Array<T>::fill (val); + Array<T>::fill (val); } Array2 (const Array2<T>& a) : Array<T> (a, a.dims ()) { } @@ -85,7 +85,7 @@ Array2<T>& operator = (const Array2<T>& a) { if (this != &a) - Array<T>::operator = (a); + Array<T>::operator = (a); return *this; } @@ -115,14 +115,14 @@ } Array2<T> index (const idx_vector& i, bool resize_ok = false, - const T& rfv = Array<T>::resize_fill_value ()) const + const T& rfv = Array<T>::resize_fill_value ()) const { Array<T> tmp = Array<T>::index (i, resize_ok, rfv); return Array2<T> (tmp, tmp.rows (), tmp.columns ()); } Array2<T> index (const idx_vector& i, const idx_vector& j, bool resize_ok = false, - const T& rfv = Array<T>::resize_fill_value ()) const + const T& rfv = Array<T>::resize_fill_value ()) const { Array<T> tmp = Array<T>::index (i, j, resize_ok, rfv); return Array2<T> (tmp, tmp.rows (), tmp.columns ()); @@ -135,7 +135,7 @@ } Array2<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { Array<T> tmp = Array<T>::sort (sidx, dim, mode); return Array2<T> (tmp, tmp.rows (), tmp.columns ());
--- a/liboctave/Array3.h +++ b/liboctave/Array3.h @@ -63,7 +63,7 @@ Array3<T>& operator = (const Array3<T>& a) { if (this != &a) - Array<T>::operator = (a); + Array<T>::operator = (a); return *this; } @@ -81,7 +81,7 @@ } Array3<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const + sortmode mode = ASCENDING) const { Array<T> tmp = Array<T>::sort (sidx, dim, mode); return Array3<T> (tmp, tmp.rows (), tmp.columns (), tmp.pages ());
--- a/liboctave/CColVector.h +++ b/liboctave/CColVector.h @@ -93,26 +93,26 @@ // matrix by column vector -> column vector operations friend OCTAVE_API ComplexColumnVector operator * (const ComplexMatrix& a, - const ColumnVector& b); + const ColumnVector& b); friend OCTAVE_API ComplexColumnVector operator * (const ComplexMatrix& a, - const ComplexColumnVector& b); + const ComplexColumnVector& b); // matrix by column vector -> column vector operations friend OCTAVE_API ComplexColumnVector operator * (const Matrix& a, - const ComplexColumnVector& b); + const ComplexColumnVector& b); // diagonal matrix by column vector -> column vector operations friend OCTAVE_API ComplexColumnVector operator * (const DiagMatrix& a, - const ComplexColumnVector& b); + const ComplexColumnVector& b); friend OCTAVE_API ComplexColumnVector operator * (const ComplexDiagMatrix& a, - const ColumnVector& b); + const ColumnVector& b); friend OCTAVE_API ComplexColumnVector operator * (const ComplexDiagMatrix& a, - const ComplexColumnVector& b); + const ComplexColumnVector& b); // other operations
--- a/liboctave/CMatrix.h +++ b/liboctave/CMatrix.h @@ -156,22 +156,22 @@ private: ComplexMatrix tinverse (MatrixType &mattype, octave_idx_type& info, - double& rcon, int force, int calc_cond) const; + double& rcon, int force, int calc_cond) const; ComplexMatrix finverse (MatrixType &mattype, octave_idx_type& info, - double& rcon, int force, int calc_cond) const; + double& rcon, int force, int calc_cond) const; public: ComplexMatrix inverse (void) const; ComplexMatrix inverse (octave_idx_type& info) const; ComplexMatrix inverse (octave_idx_type& info, double& rcon, int force = 0, - int calc_cond = 1) const; + int calc_cond = 1) const; ComplexMatrix inverse (MatrixType &mattype) const; ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const; ComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info, - double& rcon, int force = 0, - int calc_cond = 1) const; + double& rcon, int force = 0, + int calc_cond = 1) const; ComplexMatrix pseudo_inverse (double tol = 0.0) const; @@ -193,65 +193,65 @@ private: // Upper triangular matrix solvers ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, - bool calc_cond = false, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Lower triangular matrix solvers ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Full matrix solvers (umfpack/cholesky) ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; public: // Generic interface to solver with no probing of type ComplexMatrix solve (MatrixType &typ, const Matrix& b) const; ComplexMatrix solve (MatrixType &typ, const Matrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexMatrix solve (MatrixType &typ, const Matrix& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, - bool singular_fallback = true, + double& rcon, solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, - bool singular_fallback = true, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexColumnVector solve (MatrixType &typ, - const ComplexColumnVector& b) const; + const ComplexColumnVector& b) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; // Generic interface to solver with probing of type @@ -259,63 +259,63 @@ ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcon) const; ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexMatrix solve (const ComplexMatrix& b) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcon) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexColumnVector solve (const ColumnVector& b) const; ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, - double& rcon) const; + double& rcon) const; ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexColumnVector solve (const ComplexColumnVector& b) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcon) const; + double& rcon) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, + double& rcon, solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexMatrix lssolve (const Matrix& b) const; ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info) const; ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; ComplexMatrix lssolve (const Matrix& b, octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& rank, double& rcon) const; ComplexMatrix lssolve (const ComplexMatrix& b) const; ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info) const; ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& rank, double& rcon) const; ComplexColumnVector lssolve (const ColumnVector& b) const; ComplexColumnVector lssolve (const ColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; ComplexColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& rank, double& rcon) const; ComplexColumnVector lssolve (const ComplexColumnVector& b) const; ComplexColumnVector lssolve (const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector lssolve (const ComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& info, + octave_idx_type& rank) const; ComplexColumnVector lssolve (const ComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& info, + octave_idx_type& rank, double& rcon) const; // matrix by diagonal matrix -> matrix operations
--- a/liboctave/CNDArray.h +++ b/liboctave/CNDArray.h @@ -124,11 +124,11 @@ ComplexNDArray squeeze (void) const { return MArrayN<Complex>::squeeze (); } static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); // i/o
--- a/liboctave/CRowVector.h +++ b/liboctave/CRowVector.h @@ -91,10 +91,10 @@ // row vector by matrix -> row vector friend ComplexRowVector operator * (const ComplexRowVector& a, - const ComplexMatrix& b); + const ComplexMatrix& b); friend ComplexRowVector operator * (const RowVector& a, - const ComplexMatrix& b); + const ComplexMatrix& b); // other operations
--- a/liboctave/CSparse.h +++ b/liboctave/CSparse.h @@ -79,14 +79,14 @@ : MSparse<Complex> (a) { } explicit SparseComplexMatrix (const Array<Complex> a, const Array<octave_idx_type>& r, - const Array<octave_idx_type>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<octave_idx_type>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : MSparse<Complex> (a, r, c, nr, nc, sum_terms) { } explicit SparseComplexMatrix (const Array<Complex> a, - const Array<double>& r, - const Array<double>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<double>& r, + const Array<double>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : MSparse<Complex> (a, r, c, nr, nc, sum_terms) { } explicit SparseComplexMatrix (const SparseMatrix& a); @@ -120,9 +120,9 @@ SparseComplexMatrix& insert (const SparseMatrix& a, const Array<octave_idx_type>& indx); SparseComplexMatrix concat (const SparseComplexMatrix& rb, - const Array<octave_idx_type>& ra_idx); + const Array<octave_idx_type>& ra_idx); SparseComplexMatrix concat (const SparseMatrix& rb, - const Array<octave_idx_type>& ra_idx); + const Array<octave_idx_type>& ra_idx); ComplexMatrix matrix_value (void) const; @@ -140,263 +140,263 @@ private: SparseComplexMatrix dinverse (MatrixType &mattyp, octave_idx_type& info, - double& rcond, const bool force = false, - const bool calccond = true) const; + double& rcond, const bool force = false, + const bool calccond = true) const; SparseComplexMatrix tinverse (MatrixType &mattyp, octave_idx_type& info, - double& rcond, const bool force = false, - const bool calccond = true) const; + double& rcond, const bool force = false, + const bool calccond = true) const; public: SparseComplexMatrix inverse (void) const; SparseComplexMatrix inverse (MatrixType& mattype) const; SparseComplexMatrix inverse (MatrixType& mattype, - octave_idx_type& info) const; + octave_idx_type& info) const; SparseComplexMatrix inverse (MatrixType& mattype, octave_idx_type& info, - double& rcond, int force = 0, - int calc_cond = 1) const; + double& rcond, int force = 0, + int calc_cond = 1) const; ComplexDET determinant (void) const; ComplexDET determinant (octave_idx_type& info) const; ComplexDET determinant (octave_idx_type& info, double& rcond, - int calc_cond = 1) const; + int calc_cond = 1) const; private: // Diagonal matrix solvers ComplexMatrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix dsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Upper triangular matrix solvers ComplexMatrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix utsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Lower triangular matrix solvers ComplexMatrix ltsolve (MatrixType &typ, const Matrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix ltsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Tridiagonal matrix solvers ComplexMatrix trisolve (MatrixType &typ, const Matrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix trisolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Banded matrix solvers (umfpack/cholesky) ComplexMatrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix bsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Full matrix solvers (umfpack/cholesky) void * factorize (octave_idx_type& err, double &rcond, Matrix &Control, - Matrix &Info, solve_singularity_handler sing_handler, - bool calc_cond) const; + Matrix &Info, solve_singularity_handler sing_handler, + bool calc_cond) const; ComplexMatrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix fsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; public: // Generic interface to solver with no probing of type ComplexMatrix solve (MatrixType &typ, const Matrix& b) const; ComplexMatrix solve (MatrixType &typ, const Matrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexMatrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + double& rcond, solve_singularity_handler sing_handler, + bool singular_fallback = true) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool singular_fallback = true) const; SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b) const; SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; SparseComplexMatrix solve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool singular_fallback = true) const; SparseComplexMatrix solve (MatrixType &typ, - const SparseComplexMatrix& b) const; + const SparseComplexMatrix& b) const; SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool singular_fallback = true) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; ComplexColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler) const; ComplexColumnVector solve (MatrixType &typ, - const ComplexColumnVector& b) const; + const ComplexColumnVector& b) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler) const; // Generic interface to solver with probing of type ComplexMatrix solve (const Matrix& b) const; ComplexMatrix solve (const Matrix& b, octave_idx_type& info) const; ComplexMatrix solve (const Matrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexMatrix solve (const Matrix& b, octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + solve_singularity_handler sing_handler) const; ComplexMatrix solve (const ComplexMatrix& b) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler) const; + double& rcond, solve_singularity_handler sing_handler) const; SparseComplexMatrix solve (const SparseMatrix& b) const; SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; SparseComplexMatrix solve (const SparseMatrix& b, octave_idx_type& info, - double& rcond, - solve_singularity_handler sing_handler) const; + double& rcond, + solve_singularity_handler sing_handler) const; SparseComplexMatrix solve (const SparseComplexMatrix& b) const; SparseComplexMatrix solve (const SparseComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; SparseComplexMatrix solve (const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; SparseComplexMatrix solve (const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler) const; ComplexColumnVector solve (const ColumnVector& b) const; ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexColumnVector solve (const ColumnVector& b, octave_idx_type& info, - double& rcond, - solve_singularity_handler sing_handler) const; + double& rcond, + solve_singularity_handler sing_handler) const; ComplexColumnVector solve (const ComplexColumnVector& b) const; ComplexColumnVector solve (const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcond, - solve_singularity_handler sing_handler) const; + double& rcond, + solve_singularity_handler sing_handler) const; SparseComplexMatrix squeeze (void) const; @@ -409,7 +409,7 @@ SparseComplexMatrix reshape (const dim_vector& new_dims) const; SparseComplexMatrix permute (const Array<octave_idx_type>& vec, - bool inv = false) const; + bool inv = false) const; SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const; @@ -435,39 +435,39 @@ // i/o friend OCTAVE_API std::ostream& operator << (std::ostream& os, - const SparseComplexMatrix& a); + const SparseComplexMatrix& a); friend OCTAVE_API std::istream& operator >> (std::istream& is, - SparseComplexMatrix& a); + SparseComplexMatrix& a); }; extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, - const SparseMatrix&); + const SparseMatrix&); extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API ComplexMatrix operator * (const Matrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, - const SparseMatrix&); + const SparseMatrix&); extern OCTAVE_API ComplexMatrix operator * (const ComplexMatrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API ComplexMatrix mul_trans (const ComplexMatrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API ComplexMatrix mul_herm (const ComplexMatrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API ComplexMatrix operator * (const SparseMatrix&, - const ComplexMatrix&); + const ComplexMatrix&); extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&, - const Matrix&); + const Matrix&); extern OCTAVE_API ComplexMatrix operator * (const SparseComplexMatrix&, - const ComplexMatrix&); + const ComplexMatrix&); extern OCTAVE_API ComplexMatrix trans_mul (const SparseComplexMatrix&, - const ComplexMatrix&); + const ComplexMatrix&); extern OCTAVE_API ComplexMatrix herm_mul (const SparseComplexMatrix&, - const ComplexMatrix&); + const ComplexMatrix&); extern OCTAVE_API SparseComplexMatrix operator * (const DiagMatrix&, const SparseComplexMatrix&); extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, const DiagMatrix&); @@ -493,23 +493,23 @@ extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const ComplexDiagMatrix&); extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&, - const SparseComplexMatrix&); + const SparseComplexMatrix&); extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, - const PermMatrix&); + const PermMatrix&); extern OCTAVE_API SparseComplexMatrix min (const Complex& c, - const SparseComplexMatrix& m); + const SparseComplexMatrix& m); extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m, - const Complex& c); + const Complex& c); extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& a, - const SparseComplexMatrix& b); + const SparseComplexMatrix& b); extern OCTAVE_API SparseComplexMatrix max (const Complex& c, - const SparseComplexMatrix& m); + const SparseComplexMatrix& m); extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& m, - const Complex& c); + const Complex& c); extern OCTAVE_API SparseComplexMatrix max (const SparseComplexMatrix& a, - const SparseComplexMatrix& b); + const SparseComplexMatrix& b); SPARSE_SMS_CMP_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API) SPARSE_SMS_BOOL_OP_DECLS (SparseComplexMatrix, Complex, OCTAVE_API)
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,31 @@ +2010-02-11 John W. Eaton <jwe@octave.org> + + * Array-util.h, Array.h, Array2.h, Array3.h, CColVector.h, + CMatrix.h, CNDArray.h, CRowVector.h, CSparse.h, CmplxCHOL.h, + CmplxGEPBAL.h, CmplxHESS.h, CmplxLU.h, CmplxQRP.h, CmplxSCHUR.h, + CmplxSVD.h, CollocWt.h, DAE.h, DAEFunc.h, DAERT.h, DAERTFunc.h, + DASPK.h, DASRT.h, DASSL.h, DiagArray2.h, EIG.h, MArrayN.h, + MDiagArray2.h, MSparse-defs.h, MSparse.h, MatrixType.h, ODE.h, + ODEFunc.h, ODES.h, ODESFunc.h, Quad.h, Range.h, + Sparse-diag-op-defs.h, Sparse-op-defs.h, Sparse-perm-op-defs.h, + Sparse.h, SparseCmplxCHOL.h, SparseCmplxLU.h, SparseCmplxQR.h, + SparseQR.h, SparsedbleCHOL.h, SparsedbleLU.h, base-dae.h, + base-de.h, base-lu.h, base-min.h, base-qr.h, boolNDArray.h, + boolSparse.h, chNDArray.h, cmd-hist.h, dMatrix.h, dNDArray.h, + dSparse.h, data-conv.h, dbleCHOL.h, dbleGEPBAL.h, dbleHESS.h, + dbleLU.h, dbleQRP.h, dbleSCHUR.h, dbleSVD.h, dir-ops.h, + fCColVector.h, fCMatrix.h, fCNDArray.h, fCRowVector.h, + fCmplxCHOL.h, fCmplxGEPBAL.h, fCmplxHESS.h, fCmplxLU.h, + fCmplxQRP.h, fCmplxSCHUR.h, fCmplxSVD.h, fEIG.h, fMatrix.h, + fNDArray.h, file-stat.h, floatCHOL.h, floatGEPBAL.h, + floatHESS.h, floatLU.h, floatQRP.h, floatSCHUR.h, floatSVD.h, + glob-match.h, idx-vector.h, intNDArray.h, lo-ieee.h, + lo-specfun.h, mx-op-decl.h, mx-op-defs.h, oct-env.h, oct-fftw.h, + oct-group.h, oct-inttypes.h, oct-mutex.h, oct-passwd.h, + oct-rand.h, oct-shlib.h, oct-sort.h, oct-spparms.h, oct-time.h, + oct-uname.h, pathsearch.h, sparse-base-chol.h, sparse-base-lu.h, + sparse-sort.h, sparse-util.h, statdefs.h, str-vec.h: Untabify. + 2010-02-10 John W. Eaton <jwe@octave.org> * dMatrix.h (template <class U> Matrix (const Array<U>&)):
--- a/liboctave/CmplxCHOL.h +++ b/liboctave/CmplxCHOL.h @@ -51,10 +51,10 @@ ComplexCHOL& operator = (const ComplexCHOL& a) { if (this != &a) - { - chol_mat = a.chol_mat; - xrcond = a.xrcond; - } + { + chol_mat = a.chol_mat; + xrcond = a.xrcond; + } return *this; }
--- a/liboctave/CmplxGEPBAL.h +++ b/liboctave/CmplxGEPBAL.h @@ -50,12 +50,12 @@ ComplexGEPBALANCE& operator = (const ComplexGEPBALANCE& a) { if (this != &a) - { - balanced_mat = a.balanced_mat; - balanced_mat2 = a.balanced_mat2; - balancing_mat = a.balancing_mat; - balancing_mat2 = a.balancing_mat2; - } + { + balanced_mat = a.balanced_mat; + balanced_mat2 = a.balanced_mat2; + balancing_mat = a.balancing_mat; + balancing_mat2 = a.balancing_mat2; + } return *this; } @@ -79,7 +79,7 @@ Matrix balancing_mat2; octave_idx_type init (const ComplexMatrix& a, const ComplexMatrix& b, - const std::string& balance_job); + const std::string& balance_job); }; #endif
--- a/liboctave/CmplxHESS.h +++ b/liboctave/CmplxHESS.h @@ -46,10 +46,10 @@ ComplexHESS& operator = (const ComplexHESS& a) { if (this != &a) - { - hess_mat = a.hess_mat; - unitary_hess_mat = a.unitary_hess_mat; - } + { + hess_mat = a.hess_mat; + unitary_hess_mat = a.unitary_hess_mat; + } return *this; }
--- a/liboctave/CmplxLU.h +++ b/liboctave/CmplxLU.h @@ -49,7 +49,7 @@ ComplexLU& operator = (const ComplexLU& a) { if (this != &a) - base_lu <ComplexMatrix> :: operator = (a); + base_lu <ComplexMatrix> :: operator = (a); return *this; }
--- a/liboctave/CmplxQRP.h +++ b/liboctave/CmplxQRP.h @@ -45,10 +45,10 @@ ComplexQRP& operator = (const ComplexQRP& a) { if (this != &a) - { - ComplexQR::operator = (a); - p = a.p; - } + { + ComplexQR::operator = (a); + p = a.p; + } return *this; }
--- a/liboctave/CmplxSCHUR.h +++ b/liboctave/CmplxSCHUR.h @@ -39,11 +39,11 @@ : schur_mat (), unitary_mat () { } ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, - bool calc_unitary = true) + bool calc_unitary = true) : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } ComplexSCHUR (const ComplexMatrix& a, const std::string& ord, octave_idx_type& info, - bool calc_unitary = true) + bool calc_unitary = true) : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } ComplexSCHUR (const ComplexSCHUR& a) @@ -52,10 +52,10 @@ ComplexSCHUR& operator = (const ComplexSCHUR& a) { if (this != &a) - { - schur_mat = a.schur_mat; - unitary_mat = a.unitary_mat; - } + { + schur_mat = a.schur_mat; + unitary_mat = a.unitary_mat; + } return *this; }
--- a/liboctave/CmplxSVD.h +++ b/liboctave/CmplxSVD.h @@ -44,7 +44,7 @@ } ComplexSVD (const ComplexMatrix& a, octave_idx_type& info, - SVD::type svd_type = SVD::std) + SVD::type svd_type = SVD::std) { info = init (a, svd_type); } @@ -56,12 +56,12 @@ ComplexSVD& operator = (const ComplexSVD& a) { if (this != &a) - { - type_computed = a.type_computed; - sigma = a.sigma; - left_sm = a.left_sm; - right_sm = a.right_sm; - } + { + type_computed = a.type_computed; + sigma = a.sigma; + left_sm = a.left_sm; + right_sm = a.right_sm; + } return *this; }
--- a/liboctave/CollocWt.h +++ b/liboctave/CollocWt.h @@ -52,7 +52,7 @@ Alpha (a), Beta (b), initialized (0) { } CollocWt (octave_idx_type nc, double a, double b, octave_idx_type il, octave_idx_type ir, - double ll, double rr) + double ll, double rr) : n (nc), inc_left (il), inc_right (ir), lb (ll), rb (rr), Alpha (a), Beta (b), r (), q (), A (), B (), initialized (0) { } @@ -65,18 +65,18 @@ CollocWt& operator = (const CollocWt& a) { if (this != &a) - { - n = a.n; - inc_left = a.inc_left; - inc_right = a.inc_right; - lb = a.lb; - rb = a.rb; - r = a.r; - q = a.q; - A = a.A; - B = a.B; - initialized = a.initialized; - } + { + n = a.n; + inc_left = a.inc_left; + inc_right = a.inc_right; + lb = a.lb; + rb = a.rb; + r = a.r; + q = a.q; + A = a.A; + B = a.B; + initialized = a.initialized; + } return *this; }
--- a/liboctave/DAE.h +++ b/liboctave/DAE.h @@ -49,10 +49,10 @@ DAE& operator = (const DAE& a) { if (this != &a) - { - base_diff_alg_eqn::operator = (a); - DAEFunc::operator = (a); - } + { + base_diff_alg_eqn::operator = (a); + DAEFunc::operator = (a); + } return *this; }
--- a/liboctave/DAEFunc.h +++ b/liboctave/DAEFunc.h @@ -33,16 +33,16 @@ public: typedef ColumnVector (*DAERHSFunc) (const ColumnVector& x, - const ColumnVector& xdot, - double t, octave_idx_type& ires); + const ColumnVector& xdot, + double t, octave_idx_type& ires); // This is really the form used by DASSL: // // PD = DG/DY + CJ * DG/DYPRIME typedef Matrix (*DAEJacFunc) (const ColumnVector& x, - const ColumnVector& xdot, - double t, double cj); + const ColumnVector& xdot, + double t, double cj); DAEFunc (void) : fun (0), jac (0), reset (true) { } @@ -59,11 +59,11 @@ DAEFunc& operator = (const DAEFunc& a) { if (this != &a) - { - fun = a.fun; - jac = a.jac; - reset = a.reset; - } + { + fun = a.fun; + jac = a.jac; + reset = a.reset; + } return *this; }
--- a/liboctave/DAERT.h +++ b/liboctave/DAERT.h @@ -39,7 +39,7 @@ : base_diff_alg_eqn (xx, tt), DAERTFunc (f) { } DAERT (const ColumnVector& xx, const ColumnVector& xxdot, double tt, - DAERTFunc& f) + DAERTFunc& f) : base_diff_alg_eqn (xx, xxdot, tt), DAERTFunc (f) { } DAERT (const DAERT& a) @@ -48,18 +48,18 @@ DAERT& operator = (const DAERT& a) { if (this != &a) - { - base_diff_alg_eqn::operator = (a); - DAERTFunc::operator = (a); + { + base_diff_alg_eqn::operator = (a); + DAERTFunc::operator = (a); - } + } return *this; } ~DAERT (void) { } void initialize (const ColumnVector& xx, const ColumnVector& xxdot, - double tt) + double tt) { base_diff_alg_eqn::initialize (xx, xxdot, tt); }
--- a/liboctave/DAERTFunc.h +++ b/liboctave/DAERTFunc.h @@ -53,11 +53,11 @@ DAERTFunc& operator = (const DAERTFunc& a) { if (this != &a) - { - DAEFunc::operator = (a); - constr = a.constr; - reset = a.reset; - } + { + DAEFunc::operator = (a); + constr = a.constr; + reset = a.reset; + } return *this; }
--- a/liboctave/DASPK.h +++ b/liboctave/DASPK.h @@ -41,7 +41,7 @@ : DAE (s, tm, f), DASPK_options (), initialized (false) { } DASPK (const ColumnVector& s, const ColumnVector& deriv, - double tm, DAEFunc& f) + double tm, DAEFunc& f) : DAE (s, deriv, tm, f), DASPK_options (), initialized (false) { } ~DASPK (void) { } @@ -55,7 +55,7 @@ Matrix integrate (const ColumnVector& tout, Matrix& xdot_out); Matrix integrate (const ColumnVector& tout, Matrix& xdot_out, - const ColumnVector& tcrit); + const ColumnVector& tcrit); std::string error_message (void) const;
--- a/liboctave/DASRT.h +++ b/liboctave/DASRT.h @@ -44,11 +44,11 @@ DASRT_result& operator = (const DASRT_result& r) { if (this != &r) - { - x = r.x; - xdot = r.xdot; + { + x = r.x; + xdot = r.xdot; t = r.t; - } + } return *this; } @@ -77,7 +77,7 @@ : DAERT (s, tm, f), DASRT_options (), initialized (false) { } DASRT (const ColumnVector& s, const ColumnVector& deriv, - double tm, DAERTFunc& f) + double tm, DAERTFunc& f) : DAERT (s, deriv, tm, f), DASRT_options (), initialized (false) { } ~DASRT (void) { } @@ -85,7 +85,7 @@ DASRT_result integrate (const ColumnVector& tout); DASRT_result integrate (const ColumnVector& tout, - const ColumnVector& tcrit); + const ColumnVector& tcrit); std::string error_message (void) const;
--- a/liboctave/DASSL.h +++ b/liboctave/DASSL.h @@ -41,7 +41,7 @@ : DAE (s, tm, f), DASSL_options (), initialized (false) { } DASSL (const ColumnVector& s, const ColumnVector& deriv, - double tm, DAEFunc& f) + double tm, DAEFunc& f) : DAE (s, deriv, tm, f), DASSL_options (), initialized (false) { } ~DASSL (void) { } @@ -55,7 +55,7 @@ Matrix integrate (const ColumnVector& tout, Matrix& xdot_out); Matrix integrate (const ColumnVector& tout, Matrix& xdot_out, - const ColumnVector& tcrit); + const ColumnVector& tcrit); std::string error_message (void) const;
--- a/liboctave/DiagArray2.h +++ b/liboctave/DiagArray2.h @@ -109,7 +109,7 @@ : Array<T> (std::min (dv(0), dv(1))), d1 (dv(0)), d2 (dv(0)) { if (dv.length () != 2) - (*current_liboctave_error_handler) ("too many dimensions"); + (*current_liboctave_error_handler) ("too many dimensions"); } DiagArray2 (const Array<T>& a)
--- a/liboctave/EIG.h +++ b/liboctave/EIG.h @@ -72,10 +72,10 @@ EIG& operator = (const EIG& a) { if (this != &a) - { - lambda = a.lambda; - v = a.v; - } + { + lambda = a.lambda; + v = a.v; + } return *this; }
--- a/liboctave/MArrayN.h +++ b/liboctave/MArrayN.h @@ -74,7 +74,7 @@ { return Array<T>::reshape (new_dims); } MArrayN<T> permute (const Array<octave_idx_type>& vec, - bool inv = false) const + bool inv = false) const { return Array<T>::permute (vec, inv); } MArrayN<T> ipermute (const Array<octave_idx_type>& vec) const
--- a/liboctave/MDiagArray2.h +++ b/liboctave/MDiagArray2.h @@ -86,10 +86,10 @@ octave_idx_type nel = this->length (); for (octave_idx_type i = 0; i < nel; i++) - { - if (d[i] != T ()) - retval++; - } + { + if (d[i] != T ()) + retval++; + } return retval; }
--- a/liboctave/MSparse-defs.h +++ b/liboctave/MSparse-defs.h @@ -106,7 +106,7 @@ // All the binary operators that we care about. We have two // sets of macros since the MArray OP MArray operations use functions // (product and quotient) instead of operators (*, /). -#define SPARSE_BINOP_DECLS(A_T, F_T, E_T, PFX, API, LTGT, X_T, Y_T) \ +#define SPARSE_BINOP_DECLS(A_T, F_T, E_T, PFX, API, LTGT, X_T, Y_T) \ SPARSE_BINOP_DECL (F_T, E_T, operator +, PFX, API, LTGT, X_T, Y_T); \ SPARSE_BINOP_DECL (F_T, E_T, operator -, PFX, API, LTGT, X_T, Y_T); \ SPARSE_BINOP_DECL (A_T, E_T, operator *, PFX, API, LTGT, X_T, Y_T); \ @@ -120,20 +120,20 @@ // Generate forward declarations for binary operators. #define SPARSE_BINOP_FWD_DECLS(A_T, F_T, API) \ - SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , A_T<T>, T) \ + SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , A_T<T>, T) \ SPARSE_BINOP_DECLS (A_T, F_T, T, template <typename T>, API, , T, A_T<T>) \ SPARSE_AA_BINOP_DECLS (A_T, T, template <typename T>, API, ) // Generate friend declarations for the binary operators. -#define SPARSE_BINOP_FRIENDS(A_T, F_T, API) \ - SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, A_T<T>, T) \ - SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, T, A_T<T>) \ +#define SPARSE_BINOP_FRIENDS(A_T, F_T, API) \ + SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, A_T<T>, T) \ + SPARSE_BINOP_DECLS (A_T, F_T, T, friend, API, <>, T, A_T<T>) \ SPARSE_AA_BINOP_DECLS (A_T, T, friend, API, <>) // Instantiate the binary operators. #define SPARSE_BINOP_DEFS(A_T, F_T, E_T, API) \ - SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , A_T<E_T>, E_T) \ - SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , E_T, A_T<E_T>) \ + SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , A_T<E_T>, E_T) \ + SPARSE_BINOP_DECLS (A_T, F_T, E_T, template, API, , E_T, A_T<E_T>) \ SPARSE_AA_BINOP_DECLS (A_T, E_T, template, API, ) // A function that can be used to forward binary operations from derived @@ -188,9 +188,9 @@ // Define all the MSparse forwarding functions for return type R and // MSparse element type T -#define SPARSE_FORWARD_DEFS(B, R, F, T) \ - /* SPARSE_OP_ASSIGN_FWD_DEFS */ \ - /* (R, T, dynamic_cast<B<T>&>, R, , T) */ \ +#define SPARSE_FORWARD_DEFS(B, R, F, T) \ + /* SPARSE_OP_ASSIGN_FWD_DEFS */ \ + /* (R, T, dynamic_cast<B<T>&>, R, , T) */ \ \ SPARSE_OP_ASSIGN_FWD_DEFS \ (R, T, \ @@ -203,7 +203,7 @@ (R, F, T, dynamic_cast<const B<T>&>, R, , T) \ \ SPARSE_BINOP_FWD_DEFS \ - (R, F, T, , T, dynamic_cast<const B<T>&>, R) \ + (R, F, T, , T, dynamic_cast<const B<T>&>, R) \ \ SPARSE_AA_BINOP_FWD_DEFS \ (R, T, dynamic_cast<const B<T>&>, R, dynamic_cast<const B<T>&>, R)
--- a/liboctave/MSparse.h +++ b/liboctave/MSparse.h @@ -56,13 +56,13 @@ MSparse (const Sparse<T>& a) : Sparse<T> (a) { } MSparse (const Array<T> a, const Array<octave_idx_type>& r, - const Array<octave_idx_type>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<octave_idx_type>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : Sparse<T> (a, r, c, nr, nc, sum_terms) { } MSparse (const Array<T> a, const Array<double>& r, - const Array<double>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<double>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : Sparse<T> (a, r, c, nr, nc, sum_terms) { } explicit MSparse (octave_idx_type r, octave_idx_type c, T val) : Sparse<T> (r, c, val) { }
--- a/liboctave/MatrixType.h +++ b/liboctave/MatrixType.h @@ -72,10 +72,10 @@ MatrixType (const matrix_type t, bool _full = false); MatrixType (const matrix_type t, const octave_idx_type np, - const octave_idx_type *p, bool _full = false); + const octave_idx_type *p, bool _full = false); MatrixType (const matrix_type t, const octave_idx_type ku, - const octave_idx_type kl, bool _full = false); + const octave_idx_type kl, bool _full = false); ~MatrixType (void); @@ -120,7 +120,7 @@ bool is_hermitian (void) const { return (typ == Banded_Hermitian || typ == Tridiagonal_Hermitian || - typ == Hermitian); } + typ == Hermitian); } bool is_rectangular (void) const { return (typ == Rectangular); }
--- a/liboctave/ODE.h +++ b/liboctave/ODE.h @@ -44,10 +44,10 @@ ODE& operator = (const ODE& a) { if (this != &a) - { - base_diff_eqn::operator = (a); - ODEFunc::operator = (a); - } + { + base_diff_eqn::operator = (a); + ODEFunc::operator = (a); + } return *this; } @@ -65,7 +65,7 @@ virtual Matrix do_integrate (const ColumnVector& tt) = 0; virtual Matrix do_integrate (const ColumnVector& tt, - const ColumnVector& ttcrit) = 0; + const ColumnVector& ttcrit) = 0; // Lots of ways to call the single function and optionally set and // get additional information. @@ -89,7 +89,7 @@ // Set new x0, t0 and integrate to return output at all points // specified by t. virtual Matrix integrate (const ColumnVector& x0, double t0, - const ColumnVector& tt) + const ColumnVector& tt) { initialize (x0, t0); return do_integrate (tt); @@ -98,14 +98,14 @@ // Integrate from current point and return output at all points // specified by t. virtual Matrix integrate (const ColumnVector& tt, - const ColumnVector& ttcrit) + const ColumnVector& ttcrit) { return do_integrate (tt, ttcrit); } // Set new x0, t0 and integrate to return output at all points // specified by t. virtual Matrix integrate (const ColumnVector& x0, double t0, - const ColumnVector& tt, - const ColumnVector& ttcrit) + const ColumnVector& tt, + const ColumnVector& ttcrit) { initialize (x0, t0); return do_integrate (tt, ttcrit);
--- a/liboctave/ODEFunc.h +++ b/liboctave/ODEFunc.h @@ -50,11 +50,11 @@ ODEFunc& operator = (const ODEFunc& a) { if (this != &a) - { - fun = a.fun; - jac = a.jac; - reset = a.reset; - } + { + fun = a.fun; + jac = a.jac; + reset = a.reset; + } return *this; }
--- a/liboctave/ODES.h +++ b/liboctave/ODES.h @@ -38,7 +38,7 @@ : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.length (), 0.0), theta () { } ODES (const ColumnVector& s, const ColumnVector& xtheta, double tm, - ODESFunc& f) + ODESFunc& f) : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.length (), 0.0), theta (xtheta) { } @@ -48,13 +48,13 @@ ODES& operator = (const ODES& a) { if (this != &a) - { - base_diff_eqn::operator = (a); - ODESFunc::operator = (a); + { + base_diff_eqn::operator = (a); + ODESFunc::operator = (a); - xdot = a.xdot; - theta = a.theta; - } + xdot = a.xdot; + theta = a.theta; + } return *this; } @@ -65,7 +65,7 @@ void initialize (const ColumnVector& x, double t); void initialize (const ColumnVector& x, double t, - const ColumnVector& theta); + const ColumnVector& theta); protected:
--- a/liboctave/ODESFunc.h +++ b/liboctave/ODESFunc.h @@ -37,13 +37,13 @@ }; typedef ColumnVector (*ODES_fsub) (const ColumnVector& x, double, - const ColumnVector& theta); + const ColumnVector& theta); typedef ColumnVector (*ODES_bsub) (const ColumnVector& x, double, - const ColumnVector& theta, int column); + const ColumnVector& theta, int column); typedef Matrix (*ODES_jsub) (const ColumnVector& x, double, - const ColumnVector& theta); + const ColumnVector& theta); ODESFunc (void) : fsub (0), bsub (0), jsub (0) { } @@ -63,11 +63,11 @@ ODESFunc& operator = (const ODESFunc& a) { if (this != &a) - { - fsub = a.fsub; - bsub = a.bsub; - jsub = a.jsub; - } + { + fsub = a.fsub; + bsub = a.bsub; + jsub = a.jsub; + } return *this; }
--- a/liboctave/Quad.h +++ b/liboctave/Quad.h @@ -133,7 +133,7 @@ : Quad (fcn), lower_limit (ll), upper_limit (ul), singularities () { } DefQuad (integrand_fcn fcn, double ll, double ul, - const ColumnVector& sing) + const ColumnVector& sing) : Quad (fcn), lower_limit (ll), upper_limit (ul), singularities (sing) { } @@ -195,7 +195,7 @@ : Quad (fcn), lower_limit (ll), upper_limit (ul), singularities () { } FloatDefQuad (float_integrand_fcn fcn, float ll, float ul, - const FloatColumnVector& sing) + const FloatColumnVector& sing) : Quad (fcn), lower_limit (ll), upper_limit (ul), singularities (sing) { }
--- a/liboctave/Range.h +++ b/liboctave/Range.h @@ -73,7 +73,7 @@ Range sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; Range sort (Array<octave_idx_type>& sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const; + sortmode mode = ASCENDING) const; sortmode is_sorted (sortmode mode = ASCENDING) const; @@ -96,8 +96,8 @@ { if (rng_base != b) { - rng_base = b; - clear_cache (); + rng_base = b; + clear_cache (); } } @@ -105,8 +105,8 @@ { if (rng_limit != l) { - rng_limit = l; - clear_cache (); + rng_limit = l; + clear_cache (); } } @@ -114,8 +114,8 @@ { if (rng_inc != i) { - rng_inc = i; - clear_cache (); + rng_inc = i; + clear_cache (); } }
--- a/liboctave/Sparse-diag-op-defs.h +++ b/liboctave/Sparse-diag-op-defs.h @@ -48,7 +48,7 @@ for (octave_idx_type j = 0; j < a_nc; j++) { r.xcidx (j) = l; - const octave_idx_type colend = a.cidx (j+1); + const octave_idx_type colend = a.cidx (j+1); for (octave_idx_type k = a.cidx (j); k < colend; k++) { const octave_idx_type i = a.ridx (k); @@ -88,14 +88,14 @@ for (octave_idx_type j = 0; j < mnc; ++j) { - const typename DM::element_type s = d.dgelem (j); - const octave_idx_type colend = a.cidx (j+1); - r.xcidx (j) = a.cidx (j); - for (octave_idx_type k = a.cidx (j); k < colend; ++k) - { - r.xdata (k) = s * a.data (k); - r.xridx (k) = a.ridx (k); - } + const typename DM::element_type s = d.dgelem (j); + const octave_idx_type colend = a.cidx (j+1); + r.xcidx (j) = a.cidx (j); + for (octave_idx_type k = a.cidx (j); k < colend; ++k) + { + r.xdata (k) = s * a.data (k); + r.xridx (k) = a.ridx (k); + } } for (octave_idx_type j = mnc; j <= nc; ++j) r.xcidx (j) = a.cidx (mnc); @@ -178,8 +178,8 @@ { // Extra function to ensure this is only emitted once. return inner_do_add_sm_dm<RT> (a, d, - identity_val<typename SM::element_type> (), - identity_val<typename DM::element_type> ()); + identity_val<typename SM::element_type> (), + identity_val<typename DM::element_type> ()); } template <typename RT, typename DM, typename SM> @@ -204,7 +204,7 @@ } else return inner_do_add_sm_dm<RT> (a, d, std::negate<typename SM::element_type> (), - identity_val<typename DM::element_type> ()); + identity_val<typename DM::element_type> ()); } template <typename RT, typename SM, typename DM> @@ -229,8 +229,8 @@ } else return inner_do_add_sm_dm<RT> (a, d, - identity_val<typename SM::element_type> (), - std::negate<typename DM::element_type> ()); + identity_val<typename SM::element_type> (), + std::negate<typename DM::element_type> ()); } #endif // octave_sparse_diag_op_defs_h
--- a/liboctave/Sparse-op-defs.h +++ b/liboctave/Sparse-op-defs.h @@ -46,7 +46,7 @@ SPARSE_BIN_OP_DECL (R2, operator *, M, S, API); \ SPARSE_BIN_OP_DECL (R2, operator /, M, S, API); -#define SPARSE_SMS_BIN_OP_1(R, F, OP, M, S) \ +#define SPARSE_SMS_BIN_OP_1(R, F, OP, M, S) \ R \ F (const M& m, const S& s) \ { \ @@ -61,7 +61,7 @@ return r; \ } -#define SPARSE_SMS_BIN_OP_2(R, F, OP, M, S) \ +#define SPARSE_SMS_BIN_OP_2(R, F, OP, M, S) \ R \ F (const M& m, const S& s) \ { \ @@ -73,8 +73,8 @@ \ for (octave_idx_type i = 0; i < nz; i++) \ { \ - r.data(i) = m.data(i) OP s; \ - r.ridx(i) = m.ridx(i); \ + r.data(i) = m.data(i) OP s; \ + r.ridx(i) = m.ridx(i); \ } \ for (octave_idx_type i = 0; i < nc + 1; i++) \ r.cidx(i) = m.cidx(i); \ @@ -101,7 +101,7 @@ SPARSE_CMP_OP_DECL (mx_el_eq, M, S, API); \ SPARSE_CMP_OP_DECL (mx_el_ne, M, S, API); -#define SPARSE_SMS_CMP_OP(F, OP, M, MZ, MC, S, SZ, SC) \ +#define SPARSE_SMS_CMP_OP(F, OP, M, MZ, MC, S, SZ, SC) \ SparseBoolMatrix \ F (const M& m, const S& s) \ { \ @@ -112,8 +112,8 @@ if (MC (MZ) OP SC (s)) \ { \ r = SparseBoolMatrix (nr, nc, true); \ - for (octave_idx_type j = 0; j < nc; j++) \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if (! (MC (m.data (i)) OP SC (s))) \ r.data (m.ridx (i) + j * nr) = false; \ r.maybe_compress (true); \ @@ -123,9 +123,9 @@ r = SparseBoolMatrix (nr, nc, m.nnz ()); \ r.cidx (0) = static_cast<octave_idx_type> (0); \ octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type j = 0; j < nc; j++) \ { \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if (MC (m.data (i)) OP SC (s)) \ { \ r.ridx (nel) = m.ridx (i); \ @@ -138,16 +138,16 @@ return r; \ } -#define SPARSE_SMS_CMP_OPS(M, MZ, CM, S, SZ, CS) \ - SPARSE_SMS_CMP_OP (mx_el_lt, <, M, MZ, , S, SZ, ) \ - SPARSE_SMS_CMP_OP (mx_el_le, <=, M, MZ, , S, SZ, ) \ - SPARSE_SMS_CMP_OP (mx_el_ge, >=, M, MZ, , S, SZ, ) \ - SPARSE_SMS_CMP_OP (mx_el_gt, >, M, MZ, , S, SZ, ) \ - SPARSE_SMS_CMP_OP (mx_el_eq, ==, M, MZ, , S, SZ, ) \ +#define SPARSE_SMS_CMP_OPS(M, MZ, CM, S, SZ, CS) \ + SPARSE_SMS_CMP_OP (mx_el_lt, <, M, MZ, , S, SZ, ) \ + SPARSE_SMS_CMP_OP (mx_el_le, <=, M, MZ, , S, SZ, ) \ + SPARSE_SMS_CMP_OP (mx_el_ge, >=, M, MZ, , S, SZ, ) \ + SPARSE_SMS_CMP_OP (mx_el_gt, >, M, MZ, , S, SZ, ) \ + SPARSE_SMS_CMP_OP (mx_el_eq, ==, M, MZ, , S, SZ, ) \ SPARSE_SMS_CMP_OP (mx_el_ne, !=, M, MZ, , S, SZ, ) -#define SPARSE_SMS_EQNE_OPS(M, MZ, CM, S, SZ, CS) \ - SPARSE_SMS_CMP_OP (mx_el_eq, ==, M, MZ, , S, SZ, ) \ +#define SPARSE_SMS_EQNE_OPS(M, MZ, CM, S, SZ, CS) \ + SPARSE_SMS_CMP_OP (mx_el_eq, ==, M, MZ, , S, SZ, ) \ SPARSE_SMS_CMP_OP (mx_el_ne, !=, M, MZ, , S, SZ, ) #define SPARSE_SMS_BOOL_OP_DECLS(M, S, API) \ @@ -164,23 +164,23 @@ \ if (nr > 0 && nc > 0) \ { \ - if (LHS_ZERO OP (s != RHS_ZERO)) \ - { \ + if (LHS_ZERO OP (s != RHS_ZERO)) \ + { \ r = SparseBoolMatrix (nr, nc, true); \ - for (octave_idx_type j = 0; j < nc; j++) \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if (! ((m.data(i) != LHS_ZERO) OP (s != RHS_ZERO))) \ r.data (m.ridx (i) + j * nr) = false; \ r.maybe_compress (true); \ } \ - else \ - { \ + else \ + { \ r = SparseBoolMatrix (nr, nc, m.nnz ()); \ r.cidx (0) = static_cast<octave_idx_type> (0); \ octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type j = 0; j < nc; j++) \ { \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if ((m.data(i) != LHS_ZERO) OP (s != RHS_ZERO)) \ { \ r.ridx (nel) = m.ridx (i); \ @@ -190,7 +190,7 @@ } \ r.maybe_compress (false); \ } \ - } \ + } \ return r; \ } @@ -202,7 +202,7 @@ SPARSE_SMS_BOOL_OPS2(M, S, ZERO, ZERO) #define SPARSE_SMS_OP_DECLS(R1, R2, M, S, API) \ - SPARSE_SMS_BIN_OP_DECLS (R1, R2, M, S, API) \ + SPARSE_SMS_BIN_OP_DECLS (R1, R2, M, S, API) \ SPARSE_SMS_CMP_OP_DECLS (M, S, API) \ SPARSE_SMS_BOOL_OP_DECLS (M, S, API) @@ -242,8 +242,8 @@ \ for (octave_idx_type i = 0; i < nz; i++) \ { \ - r.data(i) = s OP m.data(i); \ - r.ridx(i) = m.ridx(i); \ + r.data(i) = s OP m.data(i); \ + r.ridx(i) = m.ridx(i); \ } \ for (octave_idx_type i = 0; i < nc + 1; i++) \ r.cidx(i) = m.cidx(i); \ @@ -270,7 +270,7 @@ SPARSE_CMP_OP_DECL (mx_el_eq, S, M, API); \ SPARSE_CMP_OP_DECL (mx_el_ne, S, M, API); -#define SPARSE_SSM_CMP_OP(F, OP, S, SZ, SC, M, MZ, MC) \ +#define SPARSE_SSM_CMP_OP(F, OP, S, SZ, SC, M, MZ, MC) \ SparseBoolMatrix \ F (const S& s, const M& m) \ { \ @@ -281,8 +281,8 @@ if (SC (s) OP SC (MZ)) \ { \ r = SparseBoolMatrix (nr, nc, true); \ - for (octave_idx_type j = 0; j < nc; j++) \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if (! (SC (s) OP MC (m.data (i)))) \ r.data (m.ridx (i) + j * nr) = false; \ r.maybe_compress (true); \ @@ -292,9 +292,9 @@ r = SparseBoolMatrix (nr, nc, m.nnz ()); \ r.cidx (0) = static_cast<octave_idx_type> (0); \ octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type j = 0; j < nc; j++) \ { \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if (SC (s) OP MC (m.data (i))) \ { \ r.ridx (nel) = m.ridx (i); \ @@ -307,16 +307,16 @@ return r; \ } -#define SPARSE_SSM_CMP_OPS(S, SZ, SC, M, MZ, MC) \ - SPARSE_SSM_CMP_OP (mx_el_lt, <, S, SZ, , M, MZ, ) \ - SPARSE_SSM_CMP_OP (mx_el_le, <=, S, SZ, , M, MZ, ) \ - SPARSE_SSM_CMP_OP (mx_el_ge, >=, S, SZ, , M, MZ, ) \ - SPARSE_SSM_CMP_OP (mx_el_gt, >, S, SZ, , M, MZ, ) \ - SPARSE_SSM_CMP_OP (mx_el_eq, ==, S, SZ, , M, MZ, ) \ +#define SPARSE_SSM_CMP_OPS(S, SZ, SC, M, MZ, MC) \ + SPARSE_SSM_CMP_OP (mx_el_lt, <, S, SZ, , M, MZ, ) \ + SPARSE_SSM_CMP_OP (mx_el_le, <=, S, SZ, , M, MZ, ) \ + SPARSE_SSM_CMP_OP (mx_el_ge, >=, S, SZ, , M, MZ, ) \ + SPARSE_SSM_CMP_OP (mx_el_gt, >, S, SZ, , M, MZ, ) \ + SPARSE_SSM_CMP_OP (mx_el_eq, ==, S, SZ, , M, MZ, ) \ SPARSE_SSM_CMP_OP (mx_el_ne, !=, S, SZ, , M, MZ, ) -#define SPARSE_SSM_EQNE_OPS(S, SZ, SC, M, MZ, MC) \ - SPARSE_SSM_CMP_OP (mx_el_eq, ==, S, SZ, , M, MZ, ) \ +#define SPARSE_SSM_EQNE_OPS(S, SZ, SC, M, MZ, MC) \ + SPARSE_SSM_CMP_OP (mx_el_eq, ==, S, SZ, , M, MZ, ) \ SPARSE_SSM_CMP_OP (mx_el_ne, !=, S, SZ, , M, MZ, ) #define SPARSE_SSM_BOOL_OP_DECLS(S, M, API) \ @@ -333,23 +333,23 @@ \ if (nr > 0 && nc > 0) \ { \ - if ((s != LHS_ZERO) OP RHS_ZERO) \ - { \ + if ((s != LHS_ZERO) OP RHS_ZERO) \ + { \ r = SparseBoolMatrix (nr, nc, true); \ - for (octave_idx_type j = 0; j < nc; j++) \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if (! ((s != LHS_ZERO) OP (m.data(i) != RHS_ZERO))) \ r.data (m.ridx (i) + j * nr) = false; \ r.maybe_compress (true); \ } \ - else \ - { \ + else \ + { \ r = SparseBoolMatrix (nr, nc, m.nnz ()); \ r.cidx (0) = static_cast<octave_idx_type> (0); \ octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < nc; j++) \ + for (octave_idx_type j = 0; j < nc; j++) \ { \ - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ + for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) \ if ((s != LHS_ZERO) OP (m.data(i) != RHS_ZERO)) \ { \ r.ridx (nel) = m.ridx (i); \ @@ -359,7 +359,7 @@ } \ r.maybe_compress (false); \ } \ - } \ + } \ return r; \ } @@ -371,19 +371,19 @@ SPARSE_SSM_BOOL_OPS2(S, M, ZERO, ZERO) #define SPARSE_SSM_OP_DECLS(R1, R2, S, M, API) \ - SPARSE_SSM_BIN_OP_DECLS (R1, R2, S, M, API) \ + SPARSE_SSM_BIN_OP_DECLS (R1, R2, S, M, API) \ SPARSE_SSM_CMP_OP_DECLS (S, M, API) \ SPARSE_SSM_BOOL_OP_DECLS (S, M, API) \ // matrix by matrix operations. -#define SPARSE_SMSM_BIN_OP_DECLS(R1, R2, M1, M2, API) \ +#define SPARSE_SMSM_BIN_OP_DECLS(R1, R2, M1, M2, API) \ SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \ SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \ SPARSE_BIN_OP_DECL (R2, product, M1, M2, API); \ SPARSE_BIN_OP_DECL (R2, quotient, M1, M2, API); -#define SPARSE_SMSM_BIN_OP_1(R, F, OP, M1, M2) \ +#define SPARSE_SMSM_BIN_OP_1(R, F, OP, M1, M2) \ R \ F (const M1& m1, const M2& m2) \ { \ @@ -401,7 +401,7 @@ r = OP R (m2); \ else \ { \ - r = R (m2_nr, m2_nc, m1.data(0) OP 0.); \ + r = R (m2_nr, m2_nc, m1.data(0) OP 0.); \ \ for (octave_idx_type j = 0 ; j < m2_nc ; j++) \ { \ @@ -411,7 +411,7 @@ { \ octave_quit (); \ r.data(idxj + m2.ridx(i)) = m1.data(0) OP m2.data(i); \ - } \ + } \ } \ r.maybe_compress (); \ } \ @@ -422,7 +422,7 @@ r = R (m1); \ else \ { \ - r = R (m1_nr, m1_nc, 0. OP m2.data(0)); \ + r = R (m1_nr, m1_nc, 0. OP m2.data(0)); \ \ for (octave_idx_type j = 0 ; j < m1_nc ; j++) \ { \ @@ -432,7 +432,7 @@ { \ octave_quit (); \ r.data(idxj + m1.ridx(i)) = m1.data(i) OP m2.data(0); \ - } \ + } \ } \ r.maybe_compress (); \ } \ @@ -441,7 +441,7 @@ gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ else \ { \ - r = R (m1_nr, m1_nc, (m1.nnz () + m2.nnz ())); \ + r = R (m1_nr, m1_nc, (m1.nnz () + m2.nnz ())); \ \ octave_idx_type jx = 0; \ r.cidx (0) = 0; \ @@ -470,16 +470,16 @@ else if (( !ja_lt_max ) || \ (jb_lt_max && (m2.ridx(jb) < m1.ridx(ja)) ) ) \ { \ - r.ridx(jx) = m2.ridx(jb); \ - r.data(jx) = 0. OP m2.data(jb); \ - jx++; \ + r.ridx(jx) = m2.ridx(jb); \ + r.data(jx) = 0. OP m2.data(jb); \ + jx++; \ jb++; \ jb_lt_max= jb < jb_max; \ } \ else \ { \ - if ((m1.data(ja) OP m2.data(jb)) != 0.) \ - { \ + if ((m1.data(ja) OP m2.data(jb)) != 0.) \ + { \ r.data(jx) = m1.data(ja) OP m2.data(jb); \ r.ridx(jx) = m1.ridx(ja); \ jx++; \ @@ -493,13 +493,13 @@ r.cidx(i+1) = jx; \ } \ \ - r.maybe_compress (); \ + r.maybe_compress (); \ } \ \ return r; \ } -#define SPARSE_SMSM_BIN_OP_2(R, F, OP, M1, M2) \ +#define SPARSE_SMSM_BIN_OP_2(R, F, OP, M1, M2) \ R \ F (const M1& m1, const M2& m2) \ { \ @@ -517,7 +517,7 @@ r = R (m2_nr, m2_nc); \ else \ { \ - r = R (m2); \ + r = R (m2); \ octave_idx_type m2_nnz = m2.nnz(); \ \ for (octave_idx_type i = 0 ; i < m2_nnz ; i++) \ @@ -534,7 +534,7 @@ r = R (m1_nr, m1_nc); \ else \ { \ - r = R (m1); \ + r = R (m1); \ octave_idx_type m1_nnz = m1.nnz(); \ \ for (octave_idx_type i = 0 ; i < m1_nnz ; i++) \ @@ -552,7 +552,7 @@ r = R (m1_nr, m1_nc, (m1.nnz () > m2.nnz () ? m1.nnz () : m2.nnz ())); \ \ octave_idx_type jx = 0; \ - r.cidx (0) = 0; \ + r.cidx (0) = 0; \ for (octave_idx_type i = 0 ; i < m1_nc ; i++) \ { \ octave_idx_type ja = m1.cidx(i); \ @@ -578,8 +578,8 @@ } \ else \ { \ - if ((m1.data(ja) OP m2.data(jb)) != 0.) \ - { \ + if ((m1.data(ja) OP m2.data(jb)) != 0.) \ + { \ r.data(jx) = m1.data(ja) OP m2.data(jb); \ r.ridx(jx) = m1.ridx(ja); \ jx++; \ @@ -591,13 +591,13 @@ r.cidx(i+1) = jx; \ } \ \ - r.maybe_compress (); \ + r.maybe_compress (); \ } \ \ return r; \ } -#define SPARSE_SMSM_BIN_OP_3(R, F, OP, M1, M2) \ +#define SPARSE_SMSM_BIN_OP_3(R, F, OP, M1, M2) \ R \ F (const M1& m1, const M2& m2) \ { \ @@ -630,7 +630,7 @@ { \ octave_quit (); \ r.data(idxj + m2.ridx(i)) = m1.elem(0,0) OP m2.data(i); \ - } \ + } \ } \ r.maybe_compress (); \ } \ @@ -656,7 +656,7 @@ { \ octave_quit (); \ r.data(idxj + m1.ridx(i)) = m1.data(i) OP m2.elem(0,0); \ - } \ + } \ } \ r.maybe_compress (); \ } \ @@ -685,7 +685,7 @@ if ((! jb_lt_max) || \ (ja_lt_max && (m1.ridx(ja) < m2.ridx(jb)))) \ { \ - /* keep those kludges coming */ \ + /* keep those kludges coming */ \ r.elem(m1.ridx(ja),i) = m1.data(ja) OP Complex (); \ ja++; \ ja_lt_max= ja < ja_max; \ @@ -693,8 +693,8 @@ else if (( !ja_lt_max ) || \ (jb_lt_max && (m2.ridx(jb) < m1.ridx(ja)) ) ) \ { \ - /* keep those kludges coming */ \ - r.elem(m2.ridx(jb),i) = Complex () OP m2.data(jb); \ + /* keep those kludges coming */ \ + r.elem(m2.ridx(jb),i) = Complex () OP m2.data(jb); \ jb++; \ jb_lt_max= jb < jb_max; \ } \ @@ -708,7 +708,7 @@ } \ } \ } \ - r.maybe_compress (true); \ + r.maybe_compress (true); \ } \ \ return r; \ @@ -740,7 +740,7 @@ // functions defined in the SPARSE_SSM_CMP_OP and SPARSE_SMS_CMP_OP // macros. -#define SPARSE_SMSM_CMP_OP(F, OP, M1, Z1, C1, M2, Z2, C2) \ +#define SPARSE_SMSM_CMP_OP(F, OP, M1, Z1, C1, M2, Z2, C2) \ SparseBoolMatrix \ F (const M1& m1, const M2& m2) \ { \ @@ -755,69 +755,69 @@ if (m1_nr == 1 && m1_nc == 1) \ { \ if (C1 (m1.elem(0,0)) OP C2 (Z2)) \ - { \ - r = SparseBoolMatrix (m2_nr, m2_nc, true); \ - for (octave_idx_type j = 0; j < m2_nc; j++) \ - for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ - if (! (C1 (m1.elem (0,0)) OP C2 (m2.data(i)))) \ - r.data (m2.ridx (i) + j * m2_nr) = false; \ - r.maybe_compress (true); \ - } \ - else \ - { \ - r = SparseBoolMatrix (m2_nr, m2_nc, m2.nnz ()); \ - r.cidx (0) = static_cast<octave_idx_type> (0); \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m2_nc; j++) \ - { \ - for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ - if (C1 (m1.elem (0,0)) OP C2 (m2.data(i))) \ - { \ - r.ridx (nel) = m2.ridx (i); \ - r.data (nel++) = true; \ - } \ - r.cidx (j + 1) = nel; \ - } \ - r.maybe_compress (false); \ - } \ + { \ + r = SparseBoolMatrix (m2_nr, m2_nc, true); \ + for (octave_idx_type j = 0; j < m2_nc; j++) \ + for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ + if (! (C1 (m1.elem (0,0)) OP C2 (m2.data(i)))) \ + r.data (m2.ridx (i) + j * m2_nr) = false; \ + r.maybe_compress (true); \ + } \ + else \ + { \ + r = SparseBoolMatrix (m2_nr, m2_nc, m2.nnz ()); \ + r.cidx (0) = static_cast<octave_idx_type> (0); \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m2_nc; j++) \ + { \ + for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ + if (C1 (m1.elem (0,0)) OP C2 (m2.data(i))) \ + { \ + r.ridx (nel) = m2.ridx (i); \ + r.data (nel++) = true; \ + } \ + r.cidx (j + 1) = nel; \ + } \ + r.maybe_compress (false); \ + } \ } \ else if (m2_nr == 1 && m2_nc == 1) \ { \ - if (C1 (Z1) OP C2 (m2.elem (0,0))) \ - { \ - r = SparseBoolMatrix (m1_nr, m1_nc, true); \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ - if (! (C1 (m1.data (i)) OP C2 (m2.elem(0,0)))) \ - r.data (m1.ridx (i) + j * m1_nr) = false; \ - r.maybe_compress (true); \ - } \ - else \ - { \ - r = SparseBoolMatrix (m1_nr, m1_nc, m1.nnz ()); \ - r.cidx (0) = static_cast<octave_idx_type> (0); \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - { \ - for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ - if (C1 (m1.data (i)) OP C2 (m2.elem(0,0))) \ - { \ - r.ridx (nel) = m1.ridx (i); \ - r.data (nel++) = true; \ - } \ - r.cidx (j + 1) = nel; \ - } \ - r.maybe_compress (false); \ - } \ + if (C1 (Z1) OP C2 (m2.elem (0,0))) \ + { \ + r = SparseBoolMatrix (m1_nr, m1_nc, true); \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ + if (! (C1 (m1.data (i)) OP C2 (m2.elem(0,0)))) \ + r.data (m1.ridx (i) + j * m1_nr) = false; \ + r.maybe_compress (true); \ + } \ + else \ + { \ + r = SparseBoolMatrix (m1_nr, m1_nc, m1.nnz ()); \ + r.cidx (0) = static_cast<octave_idx_type> (0); \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + { \ + for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ + if (C1 (m1.data (i)) OP C2 (m2.elem(0,0))) \ + { \ + r.ridx (nel) = m1.ridx (i); \ + r.data (nel++) = true; \ + } \ + r.cidx (j + 1) = nel; \ + } \ + r.maybe_compress (false); \ + } \ } \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ - if (m1_nr != 0 || m1_nc != 0) \ - { \ + if (m1_nr != 0 || m1_nc != 0) \ + { \ if (C1 (Z1) OP C2 (Z2)) \ - { \ + { \ r = SparseBoolMatrix (m1_nr, m1_nc, true); \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ { \ octave_idx_type i1 = m1.cidx (j); \ octave_idx_type e1 = m1.cidx (j+1); \ @@ -853,7 +853,7 @@ r = SparseBoolMatrix (m1_nr, m1_nc, m1.nnz () + m2.nnz ()); \ r.cidx (0) = static_cast<octave_idx_type> (0); \ octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ { \ octave_idx_type i1 = m1.cidx (j); \ octave_idx_type e1 = m1.cidx (j+1); \ @@ -894,12 +894,12 @@ } \ r.maybe_compress (false); \ } \ - } \ - } \ + } \ + } \ else \ { \ - if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ - gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ + if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ + gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ } \ return r; \ } @@ -938,76 +938,76 @@ \ if (m1_nr == 1 && m1_nc == 1) \ { \ - if (m2_nr > 0 && m2_nc > 0) \ - { \ - if ((m1.elem(0,0) != LHS_ZERO) OP RHS_ZERO) \ - { \ - r = SparseBoolMatrix (m2_nr, m2_nc, true); \ - for (octave_idx_type j = 0; j < m2_nc; j++) \ - for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ - if (! ((m1.elem(0,0) != LHS_ZERO) OP (m2.data(i) != RHS_ZERO))) \ - r.data (m2.ridx (i) + j * m2_nr) = false; \ - r.maybe_compress (true); \ - } \ - else \ - { \ - r = SparseBoolMatrix (m2_nr, m2_nc, m2.nnz ()); \ - r.cidx (0) = static_cast<octave_idx_type> (0); \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m2_nc; j++) \ - { \ - for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ - if ((m1.elem(0,0) != LHS_ZERO) OP (m2.data(i) != RHS_ZERO)) \ - { \ - r.ridx (nel) = m2.ridx (i); \ - r.data (nel++) = true; \ - } \ - r.cidx (j + 1) = nel; \ - } \ - r.maybe_compress (false); \ - } \ - } \ + if (m2_nr > 0 && m2_nc > 0) \ + { \ + if ((m1.elem(0,0) != LHS_ZERO) OP RHS_ZERO) \ + { \ + r = SparseBoolMatrix (m2_nr, m2_nc, true); \ + for (octave_idx_type j = 0; j < m2_nc; j++) \ + for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ + if (! ((m1.elem(0,0) != LHS_ZERO) OP (m2.data(i) != RHS_ZERO))) \ + r.data (m2.ridx (i) + j * m2_nr) = false; \ + r.maybe_compress (true); \ + } \ + else \ + { \ + r = SparseBoolMatrix (m2_nr, m2_nc, m2.nnz ()); \ + r.cidx (0) = static_cast<octave_idx_type> (0); \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m2_nc; j++) \ + { \ + for (octave_idx_type i = m2.cidx(j); i < m2.cidx(j+1); i++) \ + if ((m1.elem(0,0) != LHS_ZERO) OP (m2.data(i) != RHS_ZERO)) \ + { \ + r.ridx (nel) = m2.ridx (i); \ + r.data (nel++) = true; \ + } \ + r.cidx (j + 1) = nel; \ + } \ + r.maybe_compress (false); \ + } \ + } \ } \ else if (m2_nr == 1 && m2_nc == 1) \ { \ - if (m1_nr > 0 && m1_nc > 0) \ - { \ - if (LHS_ZERO OP (m2.elem(0,0) != RHS_ZERO)) \ - { \ - r = SparseBoolMatrix (m1_nr, m1_nc, true); \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ - if (! ((m1.data(i) != LHS_ZERO) OP (m2.elem(0,0) != RHS_ZERO))) \ - r.data (m1.ridx (i) + j * m1_nr) = false; \ - r.maybe_compress (true); \ - } \ - else \ - { \ - r = SparseBoolMatrix (m1_nr, m1_nc, m1.nnz ()); \ - r.cidx (0) = static_cast<octave_idx_type> (0); \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - { \ - for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ - if ((m1.data(i) != LHS_ZERO) OP (m2.elem(0,0) != RHS_ZERO)) \ - { \ - r.ridx (nel) = m1.ridx (i); \ - r.data (nel++) = true; \ - } \ - r.cidx (j + 1) = nel; \ - } \ - r.maybe_compress (false); \ - } \ - } \ + if (m1_nr > 0 && m1_nc > 0) \ + { \ + if (LHS_ZERO OP (m2.elem(0,0) != RHS_ZERO)) \ + { \ + r = SparseBoolMatrix (m1_nr, m1_nc, true); \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ + if (! ((m1.data(i) != LHS_ZERO) OP (m2.elem(0,0) != RHS_ZERO))) \ + r.data (m1.ridx (i) + j * m1_nr) = false; \ + r.maybe_compress (true); \ + } \ + else \ + { \ + r = SparseBoolMatrix (m1_nr, m1_nc, m1.nnz ()); \ + r.cidx (0) = static_cast<octave_idx_type> (0); \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + { \ + for (octave_idx_type i = m1.cidx(j); i < m1.cidx(j+1); i++) \ + if ((m1.data(i) != LHS_ZERO) OP (m2.elem(0,0) != RHS_ZERO)) \ + { \ + r.ridx (nel) = m1.ridx (i); \ + r.data (nel++) = true; \ + } \ + r.cidx (j + 1) = nel; \ + } \ + r.maybe_compress (false); \ + } \ + } \ } \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ - if (m1_nr != 0 || m1_nc != 0) \ - { \ + if (m1_nr != 0 || m1_nc != 0) \ + { \ r = SparseBoolMatrix (m1_nr, m1_nc, m1.nnz () + m2.nnz ()); \ r.cidx (0) = static_cast<octave_idx_type> (0); \ octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ { \ octave_idx_type i1 = m1.cidx (j); \ octave_idx_type e1 = m1.cidx (j+1); \ @@ -1047,12 +1047,12 @@ r.cidx (j + 1) = nel; \ } \ r.maybe_compress (false); \ - } \ - } \ + } \ + } \ else \ { \ - if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ - gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ + if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ + gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ } \ return r; \ } @@ -1071,13 +1071,13 @@ // matrix by matrix operations. -#define SPARSE_MSM_BIN_OP_DECLS(R1, R2, M1, M2, API) \ +#define SPARSE_MSM_BIN_OP_DECLS(R1, R2, M1, M2, API) \ SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \ SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \ SPARSE_BIN_OP_DECL (R2, product, M1, M2, API); \ SPARSE_BIN_OP_DECL (R2, quotient, M1, M2, API); -#define SPARSE_MSM_BIN_OP_1(R, F, OP, M1, M2) \ +#define SPARSE_MSM_BIN_OP_1(R, F, OP, M1, M2) \ R \ F (const M1& m1, const M2& m2) \ { \ @@ -1098,8 +1098,8 @@ r = R (m1_nr, m1_nc); \ \ for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - r.elem (i, j) = m1.elem (i, j) OP m2.elem (i, j); \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + r.elem (i, j) = m1.elem (i, j) OP m2.elem (i, j); \ } \ return r; \ } @@ -1122,29 +1122,29 @@ gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ else \ { \ - /* Count num of non-zero elements */ \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ - nel++; \ - \ + /* Count num of non-zero elements */ \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ + nel++; \ + \ r = R (m1_nr, m1_nc, nel); \ \ - octave_idx_type ii = 0; \ - r.cidx (0) = 0; \ + octave_idx_type ii = 0; \ + r.cidx (0) = 0; \ for (octave_idx_type j = 0 ; j < m1_nc ; j++) \ { \ - for (octave_idx_type i = 0 ; i < m1_nr ; i++) \ - { \ - if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ - { \ - r.data (ii) = m1.elem(i, j) OP m2.elem(i,j); \ - r.ridx (ii++) = i; \ - } \ - } \ - r.cidx(j+1) = ii; \ - } \ + for (octave_idx_type i = 0 ; i < m1_nr ; i++) \ + { \ + if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ + { \ + r.data (ii) = m1.elem(i, j) OP m2.elem(i,j); \ + r.ridx (ii++) = i; \ + } \ + } \ + r.cidx(j+1) = ii; \ + } \ } \ \ return r; \ @@ -1169,7 +1169,7 @@ SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \ SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API); -#define SPARSE_MSM_CMP_OP(F, OP, M1, C1, M2, C2) \ +#define SPARSE_MSM_CMP_OP(F, OP, M1, C1, M2, C2) \ SparseBoolMatrix \ F (const M1& m1, const M2& m2) \ { \ @@ -1185,38 +1185,38 @@ r = SparseBoolMatrix (F (m1, m2.elem(0,0))); \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ - if (m1_nr != 0 || m1_nc != 0) \ - { \ - /* Count num of non-zero elements */ \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - if (C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j))) \ - nel++; \ + if (m1_nr != 0 || m1_nc != 0) \ + { \ + /* Count num of non-zero elements */ \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + if (C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j))) \ + nel++; \ \ r = SparseBoolMatrix (m1_nr, m1_nc, nel); \ \ - octave_idx_type ii = 0; \ - r.cidx (0) = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - { \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - { \ - bool el = C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j)); \ - if (el) \ - { \ - r.data(ii) = el; \ - r.ridx(ii++) = i; \ - } \ - } \ - r.cidx(j+1) = ii; \ - } \ - } \ - } \ + octave_idx_type ii = 0; \ + r.cidx (0) = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + { \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + { \ + bool el = C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j)); \ + if (el) \ + { \ + r.data(ii) = el; \ + r.ridx(ii++) = i; \ + } \ + } \ + r.cidx(j+1) = ii; \ + } \ + } \ + } \ else \ { \ - if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ - gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ + if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ + gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ } \ return r; \ } @@ -1253,40 +1253,40 @@ r = SparseBoolMatrix (F (m1, m2.elem(0,0))); \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ - if (m1_nr != 0 || m1_nc != 0) \ - { \ - /* Count num of non-zero elements */ \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - if ((m1.elem(i, j) != LHS_ZERO) \ - OP (m2.elem(i, j) != RHS_ZERO)) \ - nel++; \ + if (m1_nr != 0 || m1_nc != 0) \ + { \ + /* Count num of non-zero elements */ \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + if ((m1.elem(i, j) != LHS_ZERO) \ + OP (m2.elem(i, j) != RHS_ZERO)) \ + nel++; \ \ r = SparseBoolMatrix (m1_nr, m1_nc, nel); \ \ - octave_idx_type ii = 0; \ - r.cidx (0) = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - { \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - { \ - bool el = (m1.elem(i, j) != LHS_ZERO) \ - OP (m2.elem(i, j) != RHS_ZERO); \ - if (el) \ - { \ - r.data(ii) = el; \ - r.ridx(ii++) = i; \ - } \ - } \ - r.cidx(j+1) = ii; \ - } \ - } \ - } \ + octave_idx_type ii = 0; \ + r.cidx (0) = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + { \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + { \ + bool el = (m1.elem(i, j) != LHS_ZERO) \ + OP (m2.elem(i, j) != RHS_ZERO); \ + if (el) \ + { \ + r.data(ii) = el; \ + r.ridx(ii++) = i; \ + } \ + } \ + r.cidx(j+1) = ii; \ + } \ + } \ + } \ else \ { \ - if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ - gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ + if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ + gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ } \ return r; \ } @@ -1305,13 +1305,13 @@ // matrix by matrix operations. -#define SPARSE_SMM_BIN_OP_DECLS(R1, R2, M1, M2, API) \ +#define SPARSE_SMM_BIN_OP_DECLS(R1, R2, M1, M2, API) \ SPARSE_BIN_OP_DECL (R1, operator +, M1, M2, API); \ SPARSE_BIN_OP_DECL (R1, operator -, M1, M2, API); \ SPARSE_BIN_OP_DECL (R2, product, M1, M2, API); \ SPARSE_BIN_OP_DECL (R2, quotient, M1, M2, API); -#define SPARSE_SMM_BIN_OP_1(R, F, OP, M1, M2) \ +#define SPARSE_SMM_BIN_OP_1(R, F, OP, M1, M2) \ R \ F (const M1& m1, const M2& m2) \ { \ @@ -1332,8 +1332,8 @@ r = R (m1_nr, m1_nc); \ \ for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - r.elem (i, j) = m1.elem (i, j) OP m2.elem (i, j); \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + r.elem (i, j) = m1.elem (i, j) OP m2.elem (i, j); \ } \ return r; \ } @@ -1356,29 +1356,29 @@ gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ else \ { \ - /* Count num of non-zero elements */ \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ - nel++; \ - \ + /* Count num of non-zero elements */ \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ + nel++; \ + \ r = R (m1_nr, m1_nc, nel); \ \ - octave_idx_type ii = 0; \ - r.cidx (0) = 0; \ + octave_idx_type ii = 0; \ + r.cidx (0) = 0; \ for (octave_idx_type j = 0 ; j < m1_nc ; j++) \ { \ - for (octave_idx_type i = 0 ; i < m1_nr ; i++) \ - { \ - if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ - { \ - r.data (ii) = m1.elem(i, j) OP m2.elem(i,j); \ - r.ridx (ii++) = i; \ - } \ - } \ - r.cidx(j+1) = ii; \ - } \ + for (octave_idx_type i = 0 ; i < m1_nr ; i++) \ + { \ + if ((m1.elem(i, j) OP m2.elem(i, j)) != ZERO) \ + { \ + r.data (ii) = m1.elem(i, j) OP m2.elem(i,j); \ + r.ridx (ii++) = i; \ + } \ + } \ + r.cidx(j+1) = ii; \ + } \ } \ \ return r; \ @@ -1403,7 +1403,7 @@ SPARSE_CMP_OP_DECL (mx_el_eq, M1, M2, API); \ SPARSE_CMP_OP_DECL (mx_el_ne, M1, M2, API); -#define SPARSE_SMM_CMP_OP(F, OP, M1, C1, M2, C2) \ +#define SPARSE_SMM_CMP_OP(F, OP, M1, C1, M2, C2) \ SparseBoolMatrix \ F (const M1& m1, const M2& m2) \ { \ @@ -1419,38 +1419,38 @@ r = SparseBoolMatrix (F (m1.elem(0,0), m2)); \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ - if (m1_nr != 0 || m1_nc != 0) \ - { \ - /* Count num of non-zero elements */ \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - if (C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j))) \ - nel++; \ + if (m1_nr != 0 || m1_nc != 0) \ + { \ + /* Count num of non-zero elements */ \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + if (C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j))) \ + nel++; \ \ r = SparseBoolMatrix (m1_nr, m1_nc, nel); \ \ - octave_idx_type ii = 0; \ - r.cidx (0) = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - { \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - { \ - bool el = C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j)); \ - if (el) \ - { \ - r.data(ii) = el; \ - r.ridx(ii++) = i; \ - } \ - } \ - r.cidx(j+1) = ii; \ - } \ - } \ - } \ + octave_idx_type ii = 0; \ + r.cidx (0) = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + { \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + { \ + bool el = C1 (m1.elem(i, j)) OP C2 (m2.elem(i, j)); \ + if (el) \ + { \ + r.data(ii) = el; \ + r.ridx(ii++) = i; \ + } \ + } \ + r.cidx(j+1) = ii; \ + } \ + } \ + } \ else \ { \ - if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ - gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ + if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ + gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ } \ return r; \ } @@ -1487,40 +1487,40 @@ r = SparseBoolMatrix (F (m1.elem(0,0), m2)); \ else if (m1_nr == m2_nr && m1_nc == m2_nc) \ { \ - if (m1_nr != 0 || m1_nc != 0) \ - { \ - /* Count num of non-zero elements */ \ - octave_idx_type nel = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - if ((m1.elem(i, j) != LHS_ZERO) \ - OP (m2.elem(i, j) != RHS_ZERO)) \ - nel++; \ + if (m1_nr != 0 || m1_nc != 0) \ + { \ + /* Count num of non-zero elements */ \ + octave_idx_type nel = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + if ((m1.elem(i, j) != LHS_ZERO) \ + OP (m2.elem(i, j) != RHS_ZERO)) \ + nel++; \ \ r = SparseBoolMatrix (m1_nr, m1_nc, nel); \ \ - octave_idx_type ii = 0; \ - r.cidx (0) = 0; \ - for (octave_idx_type j = 0; j < m1_nc; j++) \ - { \ - for (octave_idx_type i = 0; i < m1_nr; i++) \ - { \ - bool el = (m1.elem(i, j) != LHS_ZERO) \ - OP (m2.elem(i, j) != RHS_ZERO); \ - if (el) \ - { \ - r.data(ii) = el; \ - r.ridx(ii++) = i; \ - } \ - } \ - r.cidx(j+1) = ii; \ - } \ - } \ - } \ + octave_idx_type ii = 0; \ + r.cidx (0) = 0; \ + for (octave_idx_type j = 0; j < m1_nc; j++) \ + { \ + for (octave_idx_type i = 0; i < m1_nr; i++) \ + { \ + bool el = (m1.elem(i, j) != LHS_ZERO) \ + OP (m2.elem(i, j) != RHS_ZERO); \ + if (el) \ + { \ + r.data(ii) = el; \ + r.ridx(ii++) = i; \ + } \ + } \ + r.cidx(j+1) = ii; \ + } \ + } \ + } \ else \ { \ - if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ - gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ + if ((m1_nr != 0 || m1_nc != 0) && (m2_nr != 0 || m2_nc != 0)) \ + gripe_nonconformant (#F, m1_nr, m1_nc, m2_nr, m2_nc); \ } \ return r; \ } @@ -1539,7 +1539,7 @@ // Avoid some code duplication. Maybe we should use templates. -#define SPARSE_CUMSUM(RET_TYPE, ELT_TYPE, FCN) \ +#define SPARSE_CUMSUM(RET_TYPE, ELT_TYPE, FCN) \ \ octave_idx_type nr = rows (); \ octave_idx_type nc = cols (); \ @@ -1549,33 +1549,33 @@ if (nr > 0 && nc > 0) \ { \ if ((nr == 1 && dim == -1) || dim == 1) \ - /* Ugly!! Is there a better way? */ \ + /* Ugly!! Is there a better way? */ \ retval = transpose (). FCN (0) .transpose (); \ else \ - { \ + { \ octave_idx_type nel = 0; \ - for (octave_idx_type i = 0; i < nc; i++) \ + for (octave_idx_type i = 0; i < nc; i++) \ { \ ELT_TYPE t = ELT_TYPE (); \ - for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ + for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ { \ t += data(j); \ if (t != ELT_TYPE ()) \ - { \ + { \ if (j == cidx(i+1) - 1) \ - nel += nr - ridx(j); \ - else \ - nel += ridx(j+1) - ridx(j); \ - } \ + nel += nr - ridx(j); \ + else \ + nel += ridx(j+1) - ridx(j); \ + } \ } \ - } \ - retval = RET_TYPE (nr, nc, nel); \ + } \ + retval = RET_TYPE (nr, nc, nel); \ retval.cidx(0) = 0; \ - octave_idx_type ii = 0; \ - for (octave_idx_type i = 0; i < nc; i++) \ + octave_idx_type ii = 0; \ + for (octave_idx_type i = 0; i < nc; i++) \ { \ ELT_TYPE t = ELT_TYPE (); \ - for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ + for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ { \ t += data(j); \ if (t != ELT_TYPE ()) \ @@ -1588,8 +1588,8 @@ retval.ridx (ii++) = k; \ } \ } \ - else \ - { \ + else \ + { \ for (octave_idx_type k = ridx(j); k < ridx(j+1); k++) \ { \ retval.data (ii) = t; \ @@ -1599,8 +1599,8 @@ } \ } \ retval.cidx(i+1) = ii; \ - } \ - } \ + } \ + } \ } \ else \ retval = RET_TYPE (nr,nc); \ @@ -1608,7 +1608,7 @@ return retval -#define SPARSE_CUMPROD(RET_TYPE, ELT_TYPE, FCN) \ +#define SPARSE_CUMPROD(RET_TYPE, ELT_TYPE, FCN) \ \ octave_idx_type nr = rows (); \ octave_idx_type nc = cols (); \ @@ -1618,17 +1618,17 @@ if (nr > 0 && nc > 0) \ { \ if ((nr == 1 && dim == -1) || dim == 1) \ - /* Ugly!! Is there a better way? */ \ + /* Ugly!! Is there a better way? */ \ retval = transpose (). FCN (0) .transpose (); \ else \ - { \ + { \ octave_idx_type nel = 0; \ - for (octave_idx_type i = 0; i < nc; i++) \ + for (octave_idx_type i = 0; i < nc; i++) \ { \ - octave_idx_type jj = 0; \ - for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ + octave_idx_type jj = 0; \ + for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ { \ - if (jj == ridx(j)) \ + if (jj == ridx(j)) \ { \ nel++; \ jj++; \ @@ -1636,17 +1636,17 @@ else \ break; \ } \ - } \ - retval = RET_TYPE (nr, nc, nel); \ + } \ + retval = RET_TYPE (nr, nc, nel); \ retval.cidx(0) = 0; \ - octave_idx_type ii = 0; \ - for (octave_idx_type i = 0; i < nc; i++) \ + octave_idx_type ii = 0; \ + for (octave_idx_type i = 0; i < nc; i++) \ { \ ELT_TYPE t = ELT_TYPE (1.); \ - octave_idx_type jj = 0; \ - for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ + octave_idx_type jj = 0; \ + for (octave_idx_type j = cidx (i); j < cidx (i+1); j++) \ { \ - if (jj == ridx(j)) \ + if (jj == ridx(j)) \ { \ t *= data(j); \ retval.data(ii) = t; \ @@ -1656,8 +1656,8 @@ break; \ } \ retval.cidx(i+1) = ii; \ - } \ - } \ + } \ + } \ } \ else \ retval = RET_TYPE (nr,nc); \ @@ -1665,7 +1665,7 @@ return retval #define SPARSE_BASE_REDUCTION_OP(RET_TYPE, EL_TYPE, ROW_EXPR, COL_EXPR, \ - INIT_VAL, MT_RESULT) \ + INIT_VAL, MT_RESULT) \ \ octave_idx_type nr = rows (); \ octave_idx_type nc = cols (); \ @@ -1675,64 +1675,64 @@ if (nr > 0 && nc > 0) \ { \ if ((nr == 1 && dim == -1) || dim == 1) \ - { \ + { \ /* Define j here to allow fancy definition for prod method */ \ octave_idx_type j = 0; \ - OCTAVE_LOCAL_BUFFER (EL_TYPE, tmp, nr); \ + OCTAVE_LOCAL_BUFFER (EL_TYPE, tmp, nr); \ \ - for (octave_idx_type i = 0; i < nr; i++) \ - tmp[i] = INIT_VAL; \ - for (j = 0; j < nc; j++) \ + for (octave_idx_type i = 0; i < nr; i++) \ + tmp[i] = INIT_VAL; \ + for (j = 0; j < nc; j++) \ { \ - for (octave_idx_type i = cidx(j); i < cidx(j + 1); i++) \ + for (octave_idx_type i = cidx(j); i < cidx(j + 1); i++) \ { \ - ROW_EXPR; \ + ROW_EXPR; \ } \ - } \ - octave_idx_type nel = 0; \ - for (octave_idx_type i = 0; i < nr; i++) \ - if (tmp[i] != EL_TYPE ()) \ - nel++ ; \ - retval = RET_TYPE (nr, static_cast<octave_idx_type> (1), nel); \ - retval.cidx(0) = 0; \ - retval.cidx(1) = nel; \ - nel = 0; \ - for (octave_idx_type i = 0; i < nr; i++) \ - if (tmp[i] != EL_TYPE ()) \ - { \ - retval.data(nel) = tmp[i]; \ - retval.ridx(nel++) = i; \ - } \ - } \ + } \ + octave_idx_type nel = 0; \ + for (octave_idx_type i = 0; i < nr; i++) \ + if (tmp[i] != EL_TYPE ()) \ + nel++ ; \ + retval = RET_TYPE (nr, static_cast<octave_idx_type> (1), nel); \ + retval.cidx(0) = 0; \ + retval.cidx(1) = nel; \ + nel = 0; \ + for (octave_idx_type i = 0; i < nr; i++) \ + if (tmp[i] != EL_TYPE ()) \ + { \ + retval.data(nel) = tmp[i]; \ + retval.ridx(nel++) = i; \ + } \ + } \ else \ - { \ - OCTAVE_LOCAL_BUFFER (EL_TYPE, tmp, nc); \ + { \ + OCTAVE_LOCAL_BUFFER (EL_TYPE, tmp, nc); \ \ - for (octave_idx_type j = 0; j < nc; j++) \ - { \ - tmp[j] = INIT_VAL; \ - for (octave_idx_type i = cidx(j); i < cidx(j + 1); i++) \ + for (octave_idx_type j = 0; j < nc; j++) \ + { \ + tmp[j] = INIT_VAL; \ + for (octave_idx_type i = cidx(j); i < cidx(j + 1); i++) \ { \ - COL_EXPR; \ + COL_EXPR; \ } \ - } \ - octave_idx_type nel = 0; \ - for (octave_idx_type i = 0; i < nc; i++) \ - if (tmp[i] != EL_TYPE ()) \ - nel++ ; \ - retval = RET_TYPE (static_cast<octave_idx_type> (1), nc, nel); \ - retval.cidx(0) = 0; \ - nel = 0; \ - for (octave_idx_type i = 0; i < nc; i++) \ - if (tmp[i] != EL_TYPE ()) \ - { \ - retval.data(nel) = tmp[i]; \ - retval.ridx(nel++) = 0; \ - retval.cidx(i+1) = retval.cidx(i) + 1; \ - } \ - else \ - retval.cidx(i+1) = retval.cidx(i); \ - } \ + } \ + octave_idx_type nel = 0; \ + for (octave_idx_type i = 0; i < nc; i++) \ + if (tmp[i] != EL_TYPE ()) \ + nel++ ; \ + retval = RET_TYPE (static_cast<octave_idx_type> (1), nc, nel); \ + retval.cidx(0) = 0; \ + nel = 0; \ + for (octave_idx_type i = 0; i < nc; i++) \ + if (tmp[i] != EL_TYPE ()) \ + { \ + retval.data(nel) = tmp[i]; \ + retval.ridx(nel++) = 0; \ + retval.cidx(i+1) = retval.cidx(i) + 1; \ + } \ + else \ + retval.cidx(i+1) = retval.cidx(i); \ + } \ } \ else if (nc == 0 && (nr == 0 || (nr == 1 && dim == -1))) \ { \ @@ -1761,12 +1761,12 @@ { \ retval.ridx (i) = 0; \ retval.cidx (i+1) = i; \ - retval.data (i) = MT_RESULT; \ - } \ + retval.data (i) = MT_RESULT; \ + } \ } \ else \ retval = RET_TYPE (static_cast<octave_idx_type> (1), nc, \ - static_cast<octave_idx_type> (0)); \ + static_cast<octave_idx_type> (0)); \ } \ else if (nc == 0 && dim == 1) \ { \ @@ -1776,14 +1776,14 @@ retval.cidx(0) = 0; \ retval.cidx(1) = nr; \ for (octave_idx_type i = 0; i < nr; i++) \ - { \ - retval.ridx(i) = i; \ - retval.data(i) = MT_RESULT; \ - } \ + { \ + retval.ridx(i) = i; \ + retval.data(i) = MT_RESULT; \ + } \ } \ else \ retval = RET_TYPE (nr, static_cast<octave_idx_type> (1), \ - static_cast<octave_idx_type> (0)); \ + static_cast<octave_idx_type> (0)); \ } \ else \ retval.resize (nr > 0, nc > 0); \ @@ -1796,11 +1796,11 @@ #define SPARSE_REDUCTION_OP_COL_EXPR(OP) \ tmp[j] OP data (i) -#define SPARSE_REDUCTION_OP(RET_TYPE, EL_TYPE, OP, INIT_VAL, MT_RESULT) \ +#define SPARSE_REDUCTION_OP(RET_TYPE, EL_TYPE, OP, INIT_VAL, MT_RESULT) \ SPARSE_BASE_REDUCTION_OP (RET_TYPE, EL_TYPE, \ - SPARSE_REDUCTION_OP_ROW_EXPR (OP), \ - SPARSE_REDUCTION_OP_COL_EXPR (OP), \ - INIT_VAL, MT_RESULT) + SPARSE_REDUCTION_OP_ROW_EXPR (OP), \ + SPARSE_REDUCTION_OP_COL_EXPR (OP), \ + INIT_VAL, MT_RESULT) // Don't break from this loop if the test succeeds because @@ -1819,9 +1819,9 @@ #define SPARSE_ANY_ALL_OP(DIM, INIT_VAL, MT_RESULT, TEST_OP, TEST_TRUE_VAL) \ SPARSE_BASE_REDUCTION_OP (SparseBoolMatrix, char, \ - 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) + 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_ALL_OP(DIM) \ if ((rows() == 1 && dim == -1) || dim == 1) \ @@ -1829,7 +1829,7 @@ else \ { \ SPARSE_ANY_ALL_OP (DIM, (cidx(j+1) - cidx(j) < nr ? false : true), \ - true, ==, false); \ + true, ==, false); \ } #define SPARSE_ANY_OP(DIM) SPARSE_ANY_ALL_OP (DIM, false, false, !=, true) @@ -1850,8 +1850,8 @@ for (octave_idx_type i = 0; i < nz; i++) \ { \ octave_quit (); \ - r.data(i) = s * a.data(i); \ - r.ridx(i) = a.ridx(i); \ + r.data(i) = s * a.data(i); \ + r.ridx(i) = a.ridx(i); \ } \ for (octave_idx_type i = 0; i < a_nc + 1; i++) \ { \ @@ -1871,8 +1871,8 @@ for (octave_idx_type i = 0; i < nz; i++) \ { \ octave_quit (); \ - r.data(i) = m.data(i) * s; \ - r.ridx(i) = m.ridx(i); \ + r.data(i) = m.data(i) * s; \ + r.ridx(i) = m.ridx(i); \ } \ for (octave_idx_type i = 0; i < nc + 1; i++) \ { \ @@ -1893,7 +1893,7 @@ OCTAVE_LOCAL_BUFFER (octave_idx_type, w, nr); \ RET_TYPE retval (nr, a_nc, static_cast<octave_idx_type> (0)); \ for (octave_idx_type i = 0; i < nr; i++) \ - w[i] = 0; \ + w[i] = 0; \ retval.xcidx(0) = 0; \ \ octave_idx_type nel = 0; \ @@ -1904,103 +1904,103 @@ { \ octave_idx_type col = a.ridx(j); \ for (octave_idx_type k = m.cidx(col) ; k < m.cidx(col+1); k++) \ - { \ - if (w[m.ridx(k)] < i + 1) \ + { \ + if (w[m.ridx(k)] < i + 1) \ { \ - w[m.ridx(k)] = i + 1; \ - nel++; \ - } \ - octave_quit (); \ - } \ - } \ + w[m.ridx(k)] = i + 1; \ + nel++; \ + } \ + octave_quit (); \ + } \ + } \ retval.xcidx(i+1) = nel; \ - } \ + } \ \ if (nel == 0) \ - return RET_TYPE (nr, a_nc); \ + return RET_TYPE (nr, a_nc); \ else \ - { \ + { \ for (octave_idx_type i = 0; i < nr; i++) \ - w[i] = 0; \ - \ + w[i] = 0; \ + \ OCTAVE_LOCAL_BUFFER (RET_EL_TYPE, Xcol, nr); \ \ - retval.change_capacity (nel); \ - /* The optimal break-point as estimated from simulations */ \ - /* Note that Mergesort is O(nz log(nz)) while searching all */ \ - /* values is O(nr), where nz here is non-zero per row of */ \ - /* length nr. The test itself was then derived from the */ \ - /* simulation with random square matrices and the observation */ \ - /* of the number of non-zero elements in the output matrix */ \ - /* it was found that the breakpoints were */ \ - /* nr: 500 1000 2000 5000 10000 */ \ - /* nz: 6 25 97 585 2202 */ \ - /* The below is a simplication of the 'polyfit'-ed parameters */ \ - /* to these breakpoints */ \ + retval.change_capacity (nel); \ + /* The optimal break-point as estimated from simulations */ \ + /* Note that Mergesort is O(nz log(nz)) while searching all */ \ + /* values is O(nr), where nz here is non-zero per row of */ \ + /* length nr. The test itself was then derived from the */ \ + /* simulation with random square matrices and the observation */ \ + /* of the number of non-zero elements in the output matrix */ \ + /* it was found that the breakpoints were */ \ + /* nr: 500 1000 2000 5000 10000 */ \ + /* nz: 6 25 97 585 2202 */ \ + /* The below is a simplication of the 'polyfit'-ed parameters */ \ + /* to these breakpoints */ \ octave_idx_type n_per_col = (a_nc > 43000 ? 43000 : \ - (a_nc * a_nc) / 43000); \ - octave_idx_type ii = 0; \ - octave_idx_type *ri = retval.xridx(); \ - octave_sort<octave_idx_type> sort; \ - \ - for (octave_idx_type i = 0; i < a_nc ; i++) \ - { \ - if (retval.xcidx(i+1) - retval.xcidx(i) > n_per_col) \ - { \ - for (octave_idx_type j = a.cidx(i); j < a.cidx(i+1); j++) \ - { \ - octave_idx_type col = a.ridx(j); \ - EL_TYPE tmpval = a.data(j); \ - for (octave_idx_type k = m.cidx(col) ; \ - k < m.cidx(col+1); k++) \ - { \ - octave_quit (); \ - octave_idx_type row = m.ridx(k); \ - if (w[row] < i + 1) \ - { \ - w[row] = i + 1; \ - Xcol[row] = tmpval * m.data(k); \ - } \ - else \ - Xcol[row] += tmpval * m.data(k); \ - } \ - } \ - for (octave_idx_type k = 0; k < nr; k++) \ - if (w[k] == i + 1) \ - { \ - retval.xdata(ii) = Xcol[k]; \ - retval.xridx(ii++) = k; \ - } \ - } \ - else \ - { \ - for (octave_idx_type j = a.cidx(i); j < a.cidx(i+1); j++) \ - { \ - octave_idx_type col = a.ridx(j); \ - EL_TYPE tmpval = a.data(j); \ - for (octave_idx_type k = m.cidx(col) ; \ - k < m.cidx(col+1); k++) \ - { \ - octave_quit (); \ - octave_idx_type row = m.ridx(k); \ - if (w[row] < i + 1) \ - { \ - w[row] = i + 1; \ - retval.xridx(ii++) = row;\ - Xcol[row] = tmpval * m.data(k); \ - } \ - else \ - Xcol[row] += tmpval * m.data(k); \ - } \ - } \ - sort.sort (ri + retval.xcidx(i), ii - retval.xcidx(i)); \ - for (octave_idx_type k = retval.xcidx(i); k < ii; k++) \ - retval.xdata(k) = Xcol[retval.xridx(k)]; \ - } \ - } \ - retval.maybe_compress (true);\ - return retval; \ - } \ + (a_nc * a_nc) / 43000); \ + octave_idx_type ii = 0; \ + octave_idx_type *ri = retval.xridx(); \ + octave_sort<octave_idx_type> sort; \ + \ + for (octave_idx_type i = 0; i < a_nc ; i++) \ + { \ + if (retval.xcidx(i+1) - retval.xcidx(i) > n_per_col) \ + { \ + for (octave_idx_type j = a.cidx(i); j < a.cidx(i+1); j++) \ + { \ + octave_idx_type col = a.ridx(j); \ + EL_TYPE tmpval = a.data(j); \ + for (octave_idx_type k = m.cidx(col) ; \ + k < m.cidx(col+1); k++) \ + { \ + octave_quit (); \ + octave_idx_type row = m.ridx(k); \ + if (w[row] < i + 1) \ + { \ + w[row] = i + 1; \ + Xcol[row] = tmpval * m.data(k); \ + } \ + else \ + Xcol[row] += tmpval * m.data(k); \ + } \ + } \ + for (octave_idx_type k = 0; k < nr; k++) \ + if (w[k] == i + 1) \ + { \ + retval.xdata(ii) = Xcol[k]; \ + retval.xridx(ii++) = k; \ + } \ + } \ + else \ + { \ + for (octave_idx_type j = a.cidx(i); j < a.cidx(i+1); j++) \ + { \ + octave_idx_type col = a.ridx(j); \ + EL_TYPE tmpval = a.data(j); \ + for (octave_idx_type k = m.cidx(col) ; \ + k < m.cidx(col+1); k++) \ + { \ + octave_quit (); \ + octave_idx_type row = m.ridx(k); \ + if (w[row] < i + 1) \ + { \ + w[row] = i + 1; \ + retval.xridx(ii++) = row;\ + Xcol[row] = tmpval * m.data(k); \ + } \ + else \ + Xcol[row] += tmpval * m.data(k); \ + } \ + } \ + sort.sort (ri + retval.xcidx(i), ii - retval.xcidx(i)); \ + for (octave_idx_type k = retval.xcidx(i); k < ii; k++) \ + retval.xdata(k) = Xcol[retval.xridx(k)]; \ + } \ + } \ + retval.maybe_compress (true);\ + return retval; \ + } \ } #define SPARSE_FULL_MUL( RET_TYPE, EL_TYPE, ZERO ) \
--- a/liboctave/Sparse-perm-op-defs.h +++ b/liboctave/Sparse-perm-op-defs.h @@ -63,7 +63,7 @@ const octave_idx_type *prow = p.pvec ().data (); OCTAVE_LOCAL_BUFFER(octave_idx_type, pcol, nr); for (octave_idx_type i = 0; i < nr; ++i) - pcol[prow[i]] = i; + pcol[prow[i]] = i; return octinternal_do_mul_colpm_sm (pcol, a); } else @@ -98,10 +98,10 @@ const octave_idx_type j = prow[j_src]; const octave_idx_type kend_src = a.cidx (j_src + 1); for (k = r.xcidx (j); k_src < kend_src; ++k, ++k_src) - { - r.xridx (k) = a.ridx (k_src); - r.xdata (k) = a.data (k_src); - } + { + r.xridx (k) = a.ridx (k_src); + r.xdata (k) = a.data (k_src); + } } assert (k_src == nent); @@ -134,10 +134,10 @@ octave_idx_type k_src; const octave_idx_type kend_src = a.cidx (j_src + 1); for (k_src = a.cidx (j_src); k_src < kend_src; ++k_src, ++k) - { - r.xridx (k) = a.ridx (k_src); - r.xdata (k) = a.data (k_src); - } + { + r.xridx (k) = a.ridx (k_src); + r.xdata (k) = a.data (k_src); + } } assert (k == nent);
--- a/liboctave/Sparse.h +++ b/liboctave/Sparse.h @@ -69,41 +69,41 @@ int count; SparseRep (void) : d (0), r (0), c (new octave_idx_type [1]), nzmx (0), nrows (0), - ncols (0), count (1) { c[0] = 0; } + ncols (0), count (1) { c[0] = 0; } SparseRep (octave_idx_type n) : d (0), r (0), c (new octave_idx_type [n+1]), nzmx (0), nrows (n), ncols (n), count (1) { - for (octave_idx_type i = 0; i < n + 1; i++) - c[i] = 0; + for (octave_idx_type i = 0; i < n + 1; i++) + c[i] = 0; } SparseRep (octave_idx_type nr, octave_idx_type nc) : d (0), r (0), c (new octave_idx_type [nc+1]), nzmx (0), nrows (nr), ncols (nc), count (1) { - for (octave_idx_type i = 0; i < nc + 1; i++) - c[i] = 0; + for (octave_idx_type i = 0; i < nc + 1; i++) + c[i] = 0; } SparseRep (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz) : d (new T [nz]), r (new octave_idx_type [nz]), c (new octave_idx_type [nc+1]), nzmx (nz), nrows (nr), ncols (nc), count (1) { - for (octave_idx_type i = 0; i < nc + 1; i++) - c[i] = 0; + for (octave_idx_type i = 0; i < nc + 1; i++) + c[i] = 0; } SparseRep (const SparseRep& a) : d (new T [a.nzmx]), r (new octave_idx_type [a.nzmx]), c (new octave_idx_type [a.ncols + 1]), nzmx (a.nzmx), nrows (a.nrows), ncols (a.ncols), count (1) { - for (octave_idx_type i = 0; i < nzmx; i++) - { - d[i] = a.d[i]; - r[i] = a.r[i]; - } - for (octave_idx_type i = 0; i < ncols + 1; i++) - c[i] = a.c[i]; + for (octave_idx_type i = 0; i < nzmx; i++) + { + d[i] = a.d[i]; + r[i] = a.r[i]; + } + for (octave_idx_type i = 0; i < ncols + 1; i++) + c[i] = a.c[i]; } ~SparseRep (void) { delete [] d; delete [] r; delete [] c; } @@ -146,10 +146,10 @@ void make_unique (void) { if (rep->count > 1) - { - --rep->count; - rep = new SparseRep (*rep); - } + { + --rep->count; + rep = new SparseRep (*rep); + } } public: @@ -170,7 +170,7 @@ typename Sparse<T>::SparseRep *nil_rep (void) const { static typename Sparse<T>::SparseRep *nr - = new typename Sparse<T>::SparseRep (); + = new typename Sparse<T>::SparseRep (); nr->count++; @@ -218,10 +218,10 @@ Sparse (const Sparse<T>& a, const dim_vector& dv); Sparse (const Array<T>& a, const Array<octave_idx_type>& r, const Array<octave_idx_type>& c, - octave_idx_type nr, octave_idx_type nc, bool sum_terms); + octave_idx_type nr, octave_idx_type nc, bool sum_terms); Sparse (const Array<T>& a, const Array<double>& r, const Array<double>& c, - octave_idx_type nr, octave_idx_type nc, bool sum_terms); + octave_idx_type nr, octave_idx_type nc, bool sum_terms); // Sparsify a normal matrix Sparse (const Array2<T>& a); @@ -313,23 +313,23 @@ T& checkelem (octave_idx_type n) { if (n < 0 || n >= numel ()) - return range_error ("T& Sparse<T>::checkelem", n); + return range_error ("T& Sparse<T>::checkelem", n); else - { - make_unique (); - return xelem (n); - } + { + make_unique (); + return xelem (n); + } } T& checkelem (octave_idx_type i, octave_idx_type j) { if (i < 0 || j < 0 || i >= dim1 () || j >= dim2 ()) - return range_error ("T& Sparse<T>::checkelem", i, j); + return range_error ("T& Sparse<T>::checkelem", i, j); else - { - make_unique (); - return xelem (i, j); - } + { + make_unique (); + return xelem (i, j); + } } T& checkelem (const Array<octave_idx_type>& ra_idx) @@ -337,9 +337,9 @@ octave_idx_type i = compute_index (ra_idx); if (i < 0) - return range_error ("T& Sparse<T>::checkelem", ra_idx); + return range_error ("T& Sparse<T>::checkelem", ra_idx); else - return elem (i); + return elem (i); } T& elem (octave_idx_type n) @@ -370,17 +370,17 @@ T checkelem (octave_idx_type n) const { if (n < 0 || n >= numel ()) - return range_error ("T Sparse<T>::checkelem", n); + return range_error ("T Sparse<T>::checkelem", n); else - return xelem (n); + return xelem (n); } T checkelem (octave_idx_type i, octave_idx_type j) const { if (i < 0 || j < 0 || i >= dim1 () || j >= dim2 ()) - return range_error ("T Sparse<T>::checkelem", i, j); + return range_error ("T Sparse<T>::checkelem", i, j); else - return xelem (i, j); + return xelem (i, j); } T checkelem (const Array<octave_idx_type>& ra_idx) const @@ -388,9 +388,9 @@ octave_idx_type i = compute_index (ra_idx); if (i < 0) - return range_error ("T Sparse<T>::checkelem", ra_idx); + return range_error ("T Sparse<T>::checkelem", ra_idx); else - return Sparse<T>::elem (i); + return Sparse<T>::elem (i); } T elem (octave_idx_type n) const { return xelem (n); } @@ -510,7 +510,7 @@ Sparse<T> sort (octave_idx_type dim = 0, sortmode mode = ASCENDING) const; Sparse<T> sort (Array<octave_idx_type> &sidx, octave_idx_type dim = 0, - sortmode mode = ASCENDING) const; + sortmode mode = ASCENDING) const; Sparse<T> diag (octave_idx_type k = 0) const; @@ -523,47 +523,47 @@ if (f_zero != 0.) { - octave_idx_type nr = rows (); - octave_idx_type nc = cols (); + octave_idx_type nr = rows (); + octave_idx_type nc = cols (); - result = Sparse<U> (nr, nc, f_zero); + result = Sparse<U> (nr, nc, f_zero); - for (octave_idx_type j = 0; j < nc; j++) - for (octave_idx_type i = cidx(j); i < cidx (j+1); i++) - { - octave_quit (); - /* Use data instead of elem for better performance. */ - result.data (ridx (i) + j * nr) = fcn (data(i)); - } + for (octave_idx_type j = 0; j < nc; j++) + for (octave_idx_type i = cidx(j); i < cidx (j+1); i++) + { + octave_quit (); + /* Use data instead of elem for better performance. */ + result.data (ridx (i) + j * nr) = fcn (data(i)); + } - result.maybe_compress (true); + result.maybe_compress (true); } else { - octave_idx_type nz = nnz (); - octave_idx_type nr = rows (); - octave_idx_type nc = cols (); + octave_idx_type nz = nnz (); + octave_idx_type nr = rows (); + octave_idx_type nc = cols (); - result = Sparse<U> (nr, nc, nz); - octave_idx_type ii = 0; - result.cidx (ii) = 0; + result = Sparse<U> (nr, nc, nz); + octave_idx_type ii = 0; + result.cidx (ii) = 0; - for (octave_idx_type j = 0; j < nc; j++) - { - for (octave_idx_type i = cidx(j); i < cidx (j+1); i++) - { - U val = fcn (data (i)); - if (val != 0.0) - { - result.data (ii) = val; - result.ridx (ii++) = ridx (i); - } - octave_quit (); - } - result.cidx (j+1) = ii; - } + for (octave_idx_type j = 0; j < nc; j++) + { + for (octave_idx_type i = cidx(j); i < cidx (j+1); i++) + { + U val = fcn (data (i)); + if (val != 0.0) + { + result.data (ii) = val; + result.ridx (ii++) = ridx (i); + } + octave_quit (); + } + result.cidx (j+1) = ii; + } - result.maybe_compress (false); + result.maybe_compress (false); } return result; @@ -598,7 +598,7 @@ template<typename T> std::istream& read_sparse_matrix (std::istream& is, Sparse<T>& a, - T (*read_fcn) (std::istream&)) + T (*read_fcn) (std::istream&)) { octave_idx_type nr = a.rows (); octave_idx_type nc = a.cols (); @@ -615,68 +615,68 @@ a.cidx (0) = 0; for (octave_idx_type i = 0; i < nz; i++) - { + { itmp = 0; jtmp = 0; - is >> itmp; - itmp--; + is >> itmp; + itmp--; - is >> jtmp; - jtmp--; + is >> jtmp; + jtmp--; - if (itmp < 0 || itmp >= nr) - { - (*current_liboctave_error_handler) - ("invalid sparse matrix: row index = %d out of range", - itmp + 1); - is.setstate (std::ios::failbit); - goto done; - } + if (itmp < 0 || itmp >= nr) + { + (*current_liboctave_error_handler) + ("invalid sparse matrix: row index = %d out of range", + itmp + 1); + is.setstate (std::ios::failbit); + goto done; + } - if (jtmp < 0 || jtmp >= nc) - { - (*current_liboctave_error_handler) - ("invalid sparse matrix: column index = %d out of range", - jtmp + 1); - is.setstate (std::ios::failbit); - goto done; - } + if (jtmp < 0 || jtmp >= nc) + { + (*current_liboctave_error_handler) + ("invalid sparse matrix: column index = %d out of range", + jtmp + 1); + is.setstate (std::ios::failbit); + goto done; + } - if (jtmp < jold) - { - (*current_liboctave_error_handler) - ("invalid sparse matrix: column indices must appear in ascending order"); - is.setstate (std::ios::failbit); - goto done; - } + if (jtmp < jold) + { + (*current_liboctave_error_handler) + ("invalid sparse matrix: column indices must appear in ascending order"); + is.setstate (std::ios::failbit); + goto done; + } else if (jtmp > jold) { for (octave_idx_type j = jold; j < jtmp; j++) a.cidx(j+1) = ii; } else if (itmp < iold) - { - (*current_liboctave_error_handler) - ("invalid sparse matrix: row indices must appear in ascending order in each column"); - is.setstate (std::ios::failbit); - goto done; - } + { + (*current_liboctave_error_handler) + ("invalid sparse matrix: row indices must appear in ascending order in each column"); + is.setstate (std::ios::failbit); + goto done; + } - iold = itmp; + iold = itmp; jold = jtmp; - tmp = read_fcn (is); - - if (is) - { - a.data (ii) = tmp; - a.ridx (ii++) = itmp; - } - else - goto done; - } + tmp = read_fcn (is); + + if (is) + { + a.data (ii) = tmp; + a.ridx (ii++) = itmp; + } + else + goto done; + } for (octave_idx_type j = jold; j < nc; j++) - a.cidx(j+1) = ii; + a.cidx(j+1) = ii; } done:
--- a/liboctave/SparseCmplxCHOL.h +++ b/liboctave/SparseCmplxCHOL.h @@ -43,7 +43,7 @@ (a, natural) { } SparseComplexCHOL (const SparseComplexMatrix& a, octave_idx_type& info, - bool natural = true) : + bool natural = true) : sparse_base_chol<SparseComplexMatrix, Complex, SparseMatrix> (a, info, natural) { } @@ -55,8 +55,8 @@ SparseComplexCHOL& operator = (const SparseComplexCHOL& a) { if (this != &a) - sparse_base_chol <SparseComplexMatrix, Complex, SparseMatrix> :: - operator = (a); + sparse_base_chol <SparseComplexMatrix, Complex, SparseMatrix> :: + operator = (a); return *this; } @@ -65,11 +65,11 @@ SparseComplexMatrix L (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, - SparseMatrix>:: L (); } + SparseMatrix>:: L (); } SparseComplexMatrix R (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, - SparseMatrix>:: R (); } + SparseMatrix>:: R (); } octave_idx_type P (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, @@ -77,20 +77,20 @@ ColumnVector perm (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, - SparseMatrix>:: perm (); } + SparseMatrix>:: perm (); } SparseMatrix Q (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, - SparseMatrix>:: Q (); } + SparseMatrix>:: Q (); } double rcond (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, - SparseMatrix>:: rcond (); } + SparseMatrix>:: rcond (); } // Compute the inverse of a matrix using the Cholesky factorization. SparseComplexMatrix inverse (void) const { return sparse_base_chol<SparseComplexMatrix, Complex, - SparseMatrix>:: inverse (); } + SparseMatrix>:: inverse (); } }; SparseComplexMatrix OCTAVE_API chol2inv (const SparseComplexMatrix& r);
--- a/liboctave/SparseCmplxLU.h +++ b/liboctave/SparseCmplxLU.h @@ -39,14 +39,14 @@ : sparse_base_lu <SparseComplexMatrix, Complex, SparseMatrix, double> () { } SparseComplexLU (const SparseComplexMatrix& a, - const Matrix& piv_thres = Matrix (), - bool scale = false); + const Matrix& piv_thres = Matrix (), + bool scale = false); SparseComplexLU (const SparseComplexMatrix& a, const ColumnVector& Qinit, - const Matrix& piv_thres = Matrix (), - bool scale = false, bool FixedQ = false, - double droptol = -1., bool milu = false, - bool udiag = false); + const Matrix& piv_thres = Matrix (), + bool scale = false, bool FixedQ = false, + double droptol = -1., bool milu = false, + bool udiag = false); SparseComplexLU (const SparseComplexLU& a) : sparse_base_lu <SparseComplexMatrix, Complex, SparseMatrix, double> (a) { } @@ -54,8 +54,8 @@ SparseComplexLU& operator = (const SparseComplexLU& a) { if (this != &a) - sparse_base_lu <SparseComplexMatrix, Complex, SparseMatrix, double> - :: operator = (a); + sparse_base_lu <SparseComplexMatrix, Complex, SparseMatrix, double> + :: operator = (a); return *this; }
--- a/liboctave/SparseCmplxQR.h +++ b/liboctave/SparseCmplxQR.h @@ -89,19 +89,19 @@ ~SparseComplexQR (void) { if (--rep->count <= 0) - delete rep; + delete rep; } SparseComplexQR& operator = (const SparseComplexQR& a) { if (this != &a) - { - if (--rep->count <= 0) - delete rep; + { + if (--rep->count <= 0) + delete rep; - rep = a.rep; - rep->count++; - } + rep = a.rep; + rep->count++; + } return *this; } @@ -121,19 +121,19 @@ ComplexMatrix Q (void) const { return rep->Q(); } friend ComplexMatrix qrsolve (const SparseComplexMatrix &a, const Matrix &b, - octave_idx_type &info); + octave_idx_type &info); friend SparseComplexMatrix qrsolve (const SparseComplexMatrix &a, - const SparseMatrix &b, - octave_idx_type &info); + const SparseMatrix &b, + octave_idx_type &info); friend ComplexMatrix qrsolve (const SparseComplexMatrix &a, - const ComplexMatrix &b, - octave_idx_type &info); + const ComplexMatrix &b, + octave_idx_type &info); friend SparseComplexMatrix qrsolve (const SparseComplexMatrix &a, - const SparseComplexMatrix &b, - octave_idx_type &info); + const SparseComplexMatrix &b, + octave_idx_type &info); protected: #ifdef HAVE_CXSPARSE @@ -147,25 +147,25 @@ // Publish externally used friend functions. extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, const Matrix &b, - octave_idx_type &info); + octave_idx_type &info); extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, - const MArray2<double> &b, - octave_idx_type &info); + const MArray2<double> &b, + octave_idx_type &info); extern SparseComplexMatrix qrsolve (const SparseComplexMatrix &a, - const SparseMatrix &b, - octave_idx_type &info); + const SparseMatrix &b, + octave_idx_type &info); extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, - const ComplexMatrix &b, - octave_idx_type &info); + const ComplexMatrix &b, + octave_idx_type &info); extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, - const MArray2<Complex> &b, - octave_idx_type &info); + const MArray2<Complex> &b, + octave_idx_type &info); extern SparseComplexMatrix qrsolve (const SparseComplexMatrix &a, - const SparseComplexMatrix &b, - octave_idx_type &info); + const SparseComplexMatrix &b, + octave_idx_type &info); #endif
--- a/liboctave/SparseQR.h +++ b/liboctave/SparseQR.h @@ -88,19 +88,19 @@ ~SparseQR (void) { if (--rep->count <= 0) - delete rep; + delete rep; } SparseQR& operator = (const SparseQR& a) { if (this != &a) - { - if (--rep->count <= 0) - delete rep; + { + if (--rep->count <= 0) + delete rep; - rep = a.rep; - rep->count++; - } + rep = a.rep; + rep->count++; + } return *this; } @@ -119,17 +119,17 @@ Matrix Q (void) const { return rep->Q(); } friend Matrix qrsolve (const SparseMatrix &a, const Matrix &b, - octave_idx_type &info); + octave_idx_type &info); friend SparseMatrix qrsolve (const SparseMatrix &a, const SparseMatrix &b, - octave_idx_type &info); + octave_idx_type &info); friend ComplexMatrix qrsolve (const SparseMatrix &a, const ComplexMatrix &b, - octave_idx_type &info); + octave_idx_type &info); friend SparseComplexMatrix qrsolve (const SparseMatrix &a, - const SparseComplexMatrix &b, - octave_idx_type &info); + const SparseComplexMatrix &b, + octave_idx_type &info); protected: #ifdef HAVE_CXSPARSE @@ -143,22 +143,22 @@ // Publish externally used friend functions. extern Matrix qrsolve (const SparseMatrix &a, const Matrix &b, - octave_idx_type &info); + octave_idx_type &info); extern Matrix qrsolve (const SparseMatrix &a, const MArray2<double> &b, - octave_idx_type &info); + octave_idx_type &info); extern SparseMatrix qrsolve (const SparseMatrix &a, const SparseMatrix &b, - octave_idx_type &info); + octave_idx_type &info); extern ComplexMatrix qrsolve (const SparseMatrix &a, const ComplexMatrix &b, - octave_idx_type &info); + octave_idx_type &info); extern ComplexMatrix qrsolve (const SparseMatrix &a, const MArray2<Complex> &b, - octave_idx_type &info); + octave_idx_type &info); extern SparseComplexMatrix qrsolve (const SparseMatrix &a, - const SparseComplexMatrix &b, - octave_idx_type &info); + const SparseComplexMatrix &b, + octave_idx_type &info); #endif
--- a/liboctave/SparsedbleCHOL.h +++ b/liboctave/SparsedbleCHOL.h @@ -39,7 +39,7 @@ sparse_base_chol<SparseMatrix, double, SparseMatrix> (a, natural) { } SparseCHOL (const SparseMatrix& a, octave_idx_type& info, - bool natural = true) : + bool natural = true) : sparse_base_chol<SparseMatrix, double, SparseMatrix> (a, info, natural) { } SparseCHOL (const SparseCHOL& a) : @@ -50,7 +50,7 @@ SparseCHOL& operator = (const SparseCHOL& a) { if (this != &a) - sparse_base_chol <SparseMatrix, double, SparseMatrix> :: operator = (a); + sparse_base_chol <SparseMatrix, double, SparseMatrix> :: operator = (a); return *this; }
--- a/liboctave/SparsedbleLU.h +++ b/liboctave/SparsedbleLU.h @@ -37,12 +37,12 @@ : sparse_base_lu <SparseMatrix, double, SparseMatrix, double> () { } SparseLU (const SparseMatrix& a, const Matrix& piv_thres = Matrix(), - bool scale = false); + bool scale = false); SparseLU (const SparseMatrix& a, const ColumnVector& Qinit, - const Matrix& piv_thres = Matrix(), bool scale = false, - bool FixedQ = false, double droptol = -1., - bool milu = false, bool udiag = false); + const Matrix& piv_thres = Matrix(), bool scale = false, + bool FixedQ = false, double droptol = -1., + bool milu = false, bool udiag = false); SparseLU (const SparseLU& a) : sparse_base_lu <SparseMatrix, double, SparseMatrix, double> (a) { } @@ -50,8 +50,8 @@ SparseLU& operator = (const SparseLU& a) { if (this != &a) - sparse_base_lu <SparseMatrix, double, SparseMatrix, double> - :: operator = (a); + sparse_base_lu <SparseMatrix, double, SparseMatrix, double> + :: operator = (a); return *this; }
--- a/liboctave/base-dae.h +++ b/liboctave/base-dae.h @@ -37,7 +37,7 @@ : base_diff_eqn (xx, tt), xdot (xx.length (), 0.0) { } base_diff_alg_eqn (const ColumnVector& xx, const ColumnVector& xxdot, - double tt) + double tt) : base_diff_eqn (xx, tt), xdot (xxdot) { } base_diff_alg_eqn (const base_diff_alg_eqn& a) @@ -48,10 +48,10 @@ base_diff_alg_eqn& operator = (const base_diff_alg_eqn& a) { if (this != &a) - { - base_diff_eqn::operator = (a); - xdot = a.xdot; - } + { + base_diff_eqn::operator = (a); + xdot = a.xdot; + } return *this; } @@ -62,7 +62,7 @@ } void initialize (const ColumnVector& x0, const ColumnVector& xdot0, - double t0) + double t0) { base_diff_eqn::initialize (x0, t0); xdot = xdot0;
--- a/liboctave/base-de.h +++ b/liboctave/base-de.h @@ -50,15 +50,15 @@ base_diff_eqn& operator = (const base_diff_eqn& a) { if (this != &a) - { - x = a.x; - t = a.t; - stop_time = a.stop_time; - stop_time_set = a.stop_time_set; - restart = a.restart; - integration_error = a.integration_error; - istate = a.istate; - } + { + x = a.x; + t = a.t; + stop_time = a.stop_time; + stop_time_set = a.stop_time_set; + restart = a.restart; + integration_error = a.integration_error; + istate = a.istate; + } return *this; }
--- a/liboctave/base-lu.h +++ b/liboctave/base-lu.h @@ -46,11 +46,11 @@ base_lu& operator = (const base_lu& a) { if (this != &a) - { - a_fact = a.a_fact; + { + a_fact = a.a_fact; l_fact = a.l_fact; - ipvt = a.ipvt; - } + ipvt = a.ipvt; + } return *this; }
--- a/liboctave/base-min.h +++ b/liboctave/base-min.h @@ -41,7 +41,7 @@ base_minimizer& operator = (const base_minimizer& a) { if (this != &a) - x = a.x; + x = a.x; return *this; } @@ -50,7 +50,7 @@ // minimization. virtual ColumnVector do_minimize (double& objf, octave_idx_type& inform, - ColumnVector& lambda) = 0; + ColumnVector& lambda) = 0; // Lots of ways to call the single function and optionally set and // get additional information. @@ -77,7 +77,7 @@ } virtual ColumnVector minimize (double& objf, octave_idx_type& inform, - ColumnVector& lambda) + ColumnVector& lambda) { return do_minimize (objf, inform, lambda); } @@ -100,7 +100,7 @@ } virtual ColumnVector minimize (const ColumnVector& x0, double& objf, - octave_idx_type& inform) + octave_idx_type& inform) { x = x0; ColumnVector lambda; @@ -108,7 +108,7 @@ } virtual ColumnVector minimize (const ColumnVector& x0, double& objf, - octave_idx_type& inform, ColumnVector& lambda) + octave_idx_type& inform, ColumnVector& lambda) { x = x0; return do_minimize (objf, inform, lambda);
--- a/liboctave/base-qr.h +++ b/liboctave/base-qr.h @@ -52,10 +52,10 @@ base_qr& operator = (const base_qr& a) { if (this != &a) - { - q = a.q; - r = a.r; - } + { + q = a.q; + r = a.r; + } return *this; }
--- a/liboctave/boolNDArray.h +++ b/liboctave/boolNDArray.h @@ -85,11 +85,11 @@ boolNDArray squeeze (void) const { return Array<bool>::squeeze (); } static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); // i/o
--- a/liboctave/boolSparse.h +++ b/liboctave/boolSparse.h @@ -56,13 +56,13 @@ explicit SparseBoolMatrix (const boolNDArray& a) : Sparse<bool> (a) { } explicit SparseBoolMatrix (const Array<bool> a, const Array<octave_idx_type>& r, - const Array<octave_idx_type>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<octave_idx_type>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : Sparse<bool> (a, r, c, nr, nc, sum_terms) { } explicit SparseBoolMatrix (const Array<bool> a, const Array<double>& r, - const Array<double>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<double>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : Sparse<bool> (a, r, c, nr, nc, sum_terms) { } SparseBoolMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz) : Sparse<bool> (r, c, num_nz) { } @@ -86,7 +86,7 @@ SparseBoolMatrix& insert (const SparseBoolMatrix& a, const Array<octave_idx_type>& indx); SparseBoolMatrix concat (const SparseBoolMatrix& rb, - const Array<octave_idx_type>& ra_idx); + const Array<octave_idx_type>& ra_idx); SparseBoolMatrix diag (octave_idx_type k = 0) const;
--- a/liboctave/chNDArray.h +++ b/liboctave/chNDArray.h @@ -81,11 +81,11 @@ charNDArray squeeze (void) const { return Array<char>::squeeze (); } static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); // i/o
--- a/liboctave/cmd-hist.h +++ b/liboctave/cmd-hist.h @@ -87,7 +87,7 @@ static void read_range (int = -1, int = -1, bool = true); static void read_range (const std::string&, int = -1, int = -1, - bool = true); + bool = true); static void write (const std::string& = std::string ());
--- a/liboctave/dMatrix.h +++ b/liboctave/dMatrix.h @@ -128,21 +128,21 @@ private: Matrix tinverse (MatrixType &mattype, octave_idx_type& info, double& rcon, - int force, int calc_cond) const; + int force, int calc_cond) const; Matrix finverse (MatrixType &mattype, octave_idx_type& info, double& rcon, - int force, int calc_cond) const; + int force, int calc_cond) const; public: Matrix inverse (void) const; Matrix inverse (octave_idx_type& info) const; Matrix inverse (octave_idx_type& info, double& rcon, int force = 0, - int calc_cond = 1) const; + int calc_cond = 1) const; Matrix inverse (MatrixType &mattype) const; Matrix inverse (MatrixType &mattype, octave_idx_type& info) const; Matrix inverse (MatrixType &mattype, octave_idx_type& info, double& rcon, - int force = 0, int calc_cond = 1) const; + int force = 0, int calc_cond = 1) const; Matrix pseudo_inverse (double tol = 0.0) const; @@ -164,59 +164,59 @@ private: // Upper triangular matrix solvers Matrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + double& rcon, solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Lower triangular matrix solvers Matrix ltsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + double& rcon, solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Full matrix solvers (lu/cholesky) Matrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcon, solve_singularity_handler sing_handler, + bool calc_cond = false) const; public: // Generic interface to solver with no probing of type Matrix solve (MatrixType &typ, const Matrix& b) const; Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info) const; Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcon) const; + double& rcon) const; Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, - bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; + double& rcon, solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, - bool singular_fallback = true, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexColumnVector solve (MatrixType &typ, - const ComplexColumnVector& b) const; + const ComplexColumnVector& b) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcon) const; + octave_idx_type& info, double& rcon) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, double& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; // Generic interface to solver with probing of type @@ -224,62 +224,62 @@ Matrix solve (const Matrix& b, octave_idx_type& info) const; Matrix solve (const Matrix& b, octave_idx_type& info, double& rcon) const; Matrix solve (const Matrix& b, octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexMatrix solve (const ComplexMatrix& b) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcon) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ColumnVector solve (const ColumnVector& b) const; ColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; ColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcon) const; ColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; ComplexColumnVector solve (const ComplexColumnVector& b) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcon) const; + double& rcon) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcon, solve_singularity_handler sing_handler, + double& rcon, solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; // Singular solvers Matrix lssolve (const Matrix& b) const; Matrix lssolve (const Matrix& b, octave_idx_type& info) const; Matrix lssolve (const Matrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; Matrix lssolve (const Matrix& b, octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& rank, double& rcon) const; ComplexMatrix lssolve (const ComplexMatrix& b) const; ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info) const; ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; ComplexMatrix lssolve (const ComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank, double &rcon) const; + octave_idx_type& rank, double &rcon) const; ColumnVector lssolve (const ColumnVector& b) const; ColumnVector lssolve (const ColumnVector& b, octave_idx_type& info) const; ColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; ColumnVector lssolve (const ColumnVector& b, octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& rank, double& rcon) const; ComplexColumnVector lssolve (const ComplexColumnVector& b) const; ComplexColumnVector lssolve (const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector lssolve (const ComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& info, + octave_idx_type& rank) const; ComplexColumnVector lssolve (const ComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank, double& rcon) const; + octave_idx_type& info, + octave_idx_type& rank, double& rcon) const; Matrix& operator += (const DiagMatrix& a); Matrix& operator -= (const DiagMatrix& a);
--- a/liboctave/dNDArray.h +++ b/liboctave/dNDArray.h @@ -52,7 +52,7 @@ NDArray (const Matrix& a) : MArrayN<double> (a) { } NDArray (const Array<octave_idx_type>& a, bool zero_based = false, - bool negative_to_nan = false); + bool negative_to_nan = false); template <class U> NDArray (const MArrayN<U>& a) : MArrayN<double> (a) { } @@ -139,11 +139,11 @@ NDArray squeeze (void) const { return MArrayN<double>::squeeze (); } static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); // i/o
--- a/liboctave/dSparse.h +++ b/liboctave/dSparse.h @@ -73,13 +73,13 @@ explicit SparseMatrix (const NDArray& a) : MSparse<double> (a) { } explicit SparseMatrix (const Array<double> a, const Array<octave_idx_type>& r, - const Array<octave_idx_type>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<octave_idx_type>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : MSparse<double> (a, r, c, nr, nc, sum_terms) { } explicit SparseMatrix (const Array<double> a, const Array<double>& r, - const Array<double>& c, octave_idx_type nr = -1, - octave_idx_type nc = -1, bool sum_terms = true) + const Array<double>& c, octave_idx_type nr = -1, + octave_idx_type nc = -1, bool sum_terms = true) : MSparse<double> (a, r, c, nr, nc, sum_terms) { } explicit SparseMatrix (const DiagMatrix& a); @@ -112,7 +112,7 @@ SparseMatrix concat (const SparseMatrix& rb, const Array<octave_idx_type>& ra_idx); SparseComplexMatrix concat (const SparseComplexMatrix& rb, - const Array<octave_idx_type>& ra_idx); + const Array<octave_idx_type>& ra_idx); friend OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a); friend OCTAVE_API SparseMatrix imag (const SparseComplexMatrix& a); @@ -135,19 +135,19 @@ private: SparseMatrix dinverse (MatrixType &mattyp, octave_idx_type& info, - double& rcond, const bool force = false, - const bool calccond = true) const; + double& rcond, const bool force = false, + const bool calccond = true) const; SparseMatrix tinverse (MatrixType &mattyp, octave_idx_type& info, - double& rcond, const bool force = false, - const bool calccond = true) const; + double& rcond, const bool force = false, + const bool calccond = true) const; public: SparseMatrix inverse (void) const; SparseMatrix inverse (MatrixType& mattype) const; SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info) const; SparseMatrix inverse (MatrixType& mattype, octave_idx_type& info, - double& rcond, int force = 0, int calc_cond = 1) const; + double& rcond, int force = 0, int calc_cond = 1) const; DET determinant (void) const; DET determinant (octave_idx_type& info) const; @@ -156,230 +156,230 @@ private: // Diagonal matrix solvers Matrix dsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix dsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseMatrix dsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix dsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Upper triangular matrix solvers Matrix utsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix utsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseMatrix utsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix utsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Lower triangular matrix solvers Matrix ltsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix ltsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseMatrix ltsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix ltsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Tridiagonal matrix solvers Matrix trisolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix trisolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseMatrix trisolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix trisolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Banded matrix solvers (umfpack/cholesky) Matrix bsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix bsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseMatrix bsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix bsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; // Full matrix solvers (umfpack/cholesky) void * factorize (octave_idx_type& err, double &rcond, Matrix &Control, - Matrix &Info, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + Matrix &Info, solve_singularity_handler sing_handler, + bool calc_cond = false) const; Matrix fsolve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + double& rcond, solve_singularity_handler sing_handler, + bool calc_cond = false) const; ComplexMatrix fsolve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseMatrix fsolve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; SparseComplexMatrix fsolve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; public: // Generic interface to solver with no probing of type Matrix solve (MatrixType &typ, const Matrix& b) const; Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info) const; Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; Matrix solve (MatrixType &typ, const Matrix& b, octave_idx_type& info, - double& rcond, solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + double& rcond, solve_singularity_handler sing_handler, + bool singular_fallback = true) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; ComplexMatrix solve (MatrixType &typ, const ComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool singular_fallback = true) const; SparseMatrix solve (MatrixType &typ, const SparseMatrix& b) const; SparseMatrix solve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; SparseMatrix solve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; SparseMatrix solve (MatrixType &typ, const SparseMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool singular_fallback = true) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool singular_fallback = true) const; SparseComplexMatrix solve (MatrixType &typ, - const SparseComplexMatrix& b) const; + const SparseComplexMatrix& b) const; SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; SparseComplexMatrix solve (MatrixType &typ, const SparseComplexMatrix& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler, - bool singular_fallabck = true) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler, + bool singular_fallabck = true) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; ColumnVector solve (MatrixType &typ, const ColumnVector& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler) const; ComplexColumnVector solve (MatrixType &typ, - const ComplexColumnVector& b) const; + const ComplexColumnVector& b) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcond) const; + octave_idx_type& info, double& rcond) const; ComplexColumnVector solve (MatrixType &typ, const ComplexColumnVector& b, - octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + octave_idx_type& info, double& rcond, + solve_singularity_handler sing_handler) const; // Generic interface to solver with probing of type Matrix solve (const Matrix& b) const; Matrix solve (const Matrix& b, octave_idx_type& info) const; Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond) const; Matrix solve (const Matrix& b, octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + solve_singularity_handler sing_handler) const; ComplexMatrix solve (const ComplexMatrix& b) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexMatrix solve (const ComplexMatrix& b, octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + solve_singularity_handler sing_handler) const; SparseMatrix solve (const SparseMatrix& b) const; SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info) const; SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; SparseMatrix solve (const SparseMatrix& b, octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + solve_singularity_handler sing_handler) const; SparseComplexMatrix solve (const SparseComplexMatrix& b) const; SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info) const; SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; SparseComplexMatrix solve (const SparseComplexMatrix& b, octave_idx_type& info, - double& rcond, - solve_singularity_handler sing_handler) const; + double& rcond, + solve_singularity_handler sing_handler) const; ColumnVector solve (const ColumnVector& b) const; ColumnVector solve (const ColumnVector& b, octave_idx_type& info) const; ColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcond) const; ColumnVector solve (const ColumnVector& b, octave_idx_type& info, double& rcond, - solve_singularity_handler sing_handler) const; + solve_singularity_handler sing_handler) const; ComplexColumnVector solve (const ComplexColumnVector& b) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcond) const; + double& rcond) const; ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, - double& rcond, - solve_singularity_handler sing_handler) const; + double& rcond, + solve_singularity_handler sing_handler) const; // other operations @@ -437,15 +437,15 @@ // Other operators. extern OCTAVE_API SparseMatrix operator * (const SparseMatrix& a, - const SparseMatrix& b); + const SparseMatrix& b); extern OCTAVE_API Matrix operator * (const Matrix& a, - const SparseMatrix& b); + const SparseMatrix& b); extern OCTAVE_API Matrix mul_trans (const Matrix& a, - const SparseMatrix& b); + const SparseMatrix& b); extern OCTAVE_API Matrix operator * (const SparseMatrix& a, - const Matrix& b); + const Matrix& b); extern OCTAVE_API Matrix trans_mul (const SparseMatrix& a, - const Matrix& b); + const Matrix& b); extern OCTAVE_API SparseMatrix operator * (const DiagMatrix&, const SparseMatrix&); extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&, const DiagMatrix&);
--- a/liboctave/data-conv.h +++ b/liboctave/data-conv.h @@ -64,11 +64,11 @@ static data_type string_to_data_type (const std::string& s); static void string_to_data_type (const std::string& s, int& block_size, - data_type& input_type, - data_type& output_type); + data_type& input_type, + data_type& output_type); static void string_to_data_type (const std::string& s, int& block_size, - data_type& output_type); + data_type& output_type); static std::string data_type_as_string (data_type dt); }; @@ -93,31 +93,31 @@ extern OCTAVE_API void do_double_format_conversion (void *data, int len, - oct_mach_info::float_format from_fmt, - oct_mach_info::float_format to_fmt - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format from_fmt, + oct_mach_info::float_format to_fmt + = oct_mach_info::native_float_format ()); extern OCTAVE_API void do_float_format_conversion (void *data, int len, - oct_mach_info::float_format from_fmt, - oct_mach_info::float_format to_fmt - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format from_fmt, + oct_mach_info::float_format to_fmt + = oct_mach_info::native_float_format ()); extern OCTAVE_API void do_float_format_conversion (void *data, size_t sz, int len, - oct_mach_info::float_format from_fmt, - oct_mach_info::float_format to_fmt - = oct_mach_info::native_float_format ()); + oct_mach_info::float_format from_fmt, + oct_mach_info::float_format to_fmt + = oct_mach_info::native_float_format ()); extern OCTAVE_API void read_doubles (std::istream& is, double *data, save_type type, int len, - bool swap, oct_mach_info::float_format fmt); + bool swap, oct_mach_info::float_format fmt); extern OCTAVE_API void write_doubles (std::ostream& os, const double *data, save_type type, int len); extern OCTAVE_API void read_floats (std::istream& is, float *data, save_type type, int len, - bool swap, oct_mach_info::float_format fmt); + bool swap, oct_mach_info::float_format fmt); extern OCTAVE_API void write_floats (std::ostream& os, const float *data, save_type type, int len);
--- a/liboctave/dbleCHOL.h +++ b/liboctave/dbleCHOL.h @@ -48,10 +48,10 @@ CHOL& operator = (const CHOL& a) { if (this != &a) - { - chol_mat = a.chol_mat; - xrcond = a.xrcond; - } + { + chol_mat = a.chol_mat; + xrcond = a.xrcond; + } return *this; }
--- a/liboctave/dbleGEPBAL.h +++ b/liboctave/dbleGEPBAL.h @@ -49,12 +49,12 @@ GEPBALANCE& operator = (const GEPBALANCE& a) { if (this != &a) - { - balanced_mat = a.balanced_mat; - balanced_mat2 = a.balanced_mat2; - balancing_mat = a.balancing_mat; - balancing_mat2 = a.balancing_mat2; - } + { + balanced_mat = a.balanced_mat; + balanced_mat2 = a.balanced_mat2; + balancing_mat = a.balancing_mat; + balancing_mat2 = a.balancing_mat2; + } return *this; } @@ -78,7 +78,7 @@ Matrix balancing_mat2; octave_idx_type init (const Matrix& a, const Matrix& b, - const std::string& balance_job); + const std::string& balance_job); }; #endif
--- a/liboctave/dbleHESS.h +++ b/liboctave/dbleHESS.h @@ -46,10 +46,10 @@ HESS& operator = (const HESS& a) { if (this != &a) - { - hess_mat = a.hess_mat; - unitary_hess_mat = a.unitary_hess_mat; - } + { + hess_mat = a.hess_mat; + unitary_hess_mat = a.unitary_hess_mat; + } return *this; }
--- a/liboctave/dbleLU.h +++ b/liboctave/dbleLU.h @@ -45,7 +45,7 @@ LU& operator = (const LU& a) { if (this != &a) - base_lu <Matrix> :: operator = (a); + base_lu <Matrix> :: operator = (a); return *this; }
--- a/liboctave/dbleQRP.h +++ b/liboctave/dbleQRP.h @@ -45,10 +45,10 @@ QRP& operator = (const QRP& a) { if (this != &a) - { - QR::operator = (a); - p = a.p; - } + { + QR::operator = (a); + p = a.p; + } return *this; }
--- a/liboctave/dbleSCHUR.h +++ b/liboctave/dbleSCHUR.h @@ -42,7 +42,7 @@ : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } SCHUR (const Matrix& a, const std::string& ord, int& info, - bool calc_unitary = true) + bool calc_unitary = true) : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } SCHUR (const SCHUR& a) @@ -51,10 +51,10 @@ SCHUR& operator = (const SCHUR& a) { if (this != &a) - { - schur_mat = a.schur_mat; - unitary_mat = a.unitary_mat; - } + { + schur_mat = a.schur_mat; + unitary_mat = a.unitary_mat; + } return *this; }
--- a/liboctave/dbleSVD.h +++ b/liboctave/dbleSVD.h @@ -58,12 +58,12 @@ SVD& operator = (const SVD& a) { if (this != &a) - { - type_computed = a.type_computed; - sigma = a.sigma; - left_sm = a.left_sm; - right_sm = a.right_sm; - } + { + type_computed = a.type_computed; + sigma = a.sigma; + left_sm = a.left_sm; + right_sm = a.right_sm; + } return *this; }
--- a/liboctave/dir-ops.h +++ b/liboctave/dir-ops.h @@ -44,7 +44,7 @@ dir_entry& operator = (const dir_entry& d) { if (this != &d) - copy (d); + copy (d); return *this; }
--- a/liboctave/fCColVector.h +++ b/liboctave/fCColVector.h @@ -93,26 +93,26 @@ // matrix by column vector -> column vector operations friend OCTAVE_API FloatComplexColumnVector operator * (const FloatComplexMatrix& a, - const FloatColumnVector& b); + const FloatColumnVector& b); friend OCTAVE_API FloatComplexColumnVector operator * (const FloatComplexMatrix& a, - const FloatComplexColumnVector& b); + const FloatComplexColumnVector& b); // matrix by column vector -> column vector operations friend OCTAVE_API FloatComplexColumnVector operator * (const FloatMatrix& a, - const FloatComplexColumnVector& b); + const FloatComplexColumnVector& b); // diagonal matrix by column vector -> column vector operations friend OCTAVE_API FloatComplexColumnVector operator * (const FloatDiagMatrix& a, - const FloatComplexColumnVector& b); + const FloatComplexColumnVector& b); friend OCTAVE_API FloatComplexColumnVector operator * (const FloatComplexDiagMatrix& a, - const ColumnVector& b); + const ColumnVector& b); friend OCTAVE_API FloatComplexColumnVector operator * (const FloatComplexDiagMatrix& a, - const FloatComplexColumnVector& b); + const FloatComplexColumnVector& b); // other operations
--- a/liboctave/fCMatrix.h +++ b/liboctave/fCMatrix.h @@ -156,22 +156,22 @@ private: FloatComplexMatrix tinverse (MatrixType &mattype, octave_idx_type& info, - float& rcon, int force, int calc_cond) const; + float& rcon, int force, int calc_cond) const; FloatComplexMatrix finverse (MatrixType &mattype, octave_idx_type& info, - float& rcon, int force, int calc_cond) const; + float& rcon, int force, int calc_cond) const; public: FloatComplexMatrix inverse (void) const; FloatComplexMatrix inverse (octave_idx_type& info) const; FloatComplexMatrix inverse (octave_idx_type& info, float& rcon, int force = 0, - int calc_cond = 1) const; + int calc_cond = 1) const; FloatComplexMatrix inverse (MatrixType &mattype) const; FloatComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const; FloatComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info, - float& rcon, int force = 0, - int calc_cond = 1) const; + float& rcon, int force = 0, + int calc_cond = 1) const; FloatComplexMatrix pseudo_inverse (float tol = 0.0) const; @@ -193,64 +193,64 @@ private: // Upper triangular matrix solvers FloatComplexMatrix utsolve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Lower triangular matrix solvers FloatComplexMatrix ltsolve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Full matrix solvers (umfpack/cholesky) FloatComplexMatrix fsolve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, - bool calc_cond = false) const; + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, + bool calc_cond = false) const; public: // Generic interface to solver with no probing of type FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b) const; FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, - float& rcon, solve_singularity_handler sing_handler, - bool singular_fallback = true, + float& rcon, solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, - bool singular_fallback = true, + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; FloatComplexColumnVector solve (MatrixType &typ, - const FloatComplexColumnVector& b) const; + const FloatComplexColumnVector& b) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; // Generic interface to solver with probing of type @@ -258,64 +258,64 @@ FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info) const; FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon) const; FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; FloatComplexMatrix solve (const FloatComplexMatrix& b) const; FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info) const; FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon) const; FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; FloatComplexColumnVector solve (const FloatColumnVector& b) const; FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info) const; FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, - float& rcon) const; + float& rcon) const; FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; FloatComplexColumnVector solve (const FloatComplexColumnVector& b) const; FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info) const; FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info, - float& rcon) const; + float& rcon) const; FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info, - float& rcon, - solve_singularity_handler sing_handler, + float& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; FloatComplexMatrix lssolve (const FloatMatrix& b) const; FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info) const; FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& rank, float& rcon) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& rank, float& rcon) const; FloatComplexColumnVector lssolve (const FloatColumnVector& b) const; FloatComplexColumnVector lssolve (const FloatColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; FloatComplexColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& rank, float& rcon) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& info, + octave_idx_type& rank) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& info, + octave_idx_type& rank, float& rcon) const; // matrix by diagonal matrix -> matrix operations
--- a/liboctave/fCNDArray.h +++ b/liboctave/fCNDArray.h @@ -124,11 +124,11 @@ FloatComplexNDArray squeeze (void) const { return MArrayN<FloatComplex>::squeeze (); } static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); // i/o
--- a/liboctave/fCRowVector.h +++ b/liboctave/fCRowVector.h @@ -91,10 +91,10 @@ // row vector by matrix -> row vector friend FloatComplexRowVector operator * (const FloatComplexRowVector& a, - const FloatComplexMatrix& b); + const FloatComplexMatrix& b); friend FloatComplexRowVector operator * (const FloatRowVector& a, - const FloatComplexMatrix& b); + const FloatComplexMatrix& b); // other operations
--- a/liboctave/fCmplxCHOL.h +++ b/liboctave/fCmplxCHOL.h @@ -51,10 +51,10 @@ FloatComplexCHOL& operator = (const FloatComplexCHOL& a) { if (this != &a) - { - chol_mat = a.chol_mat; - xrcond = a.xrcond; - } + { + chol_mat = a.chol_mat; + xrcond = a.xrcond; + } return *this; }
--- a/liboctave/fCmplxGEPBAL.h +++ b/liboctave/fCmplxGEPBAL.h @@ -50,12 +50,12 @@ FloatComplexGEPBALANCE& operator = (const FloatComplexGEPBALANCE& a) { if (this != &a) - { - balanced_mat = a.balanced_mat; - balanced_mat2 = a.balanced_mat2; - balancing_mat = a.balancing_mat; - balancing_mat2 = a.balancing_mat2; - } + { + balanced_mat = a.balanced_mat; + balanced_mat2 = a.balanced_mat2; + balancing_mat = a.balancing_mat; + balancing_mat2 = a.balancing_mat2; + } return *this; } @@ -79,7 +79,7 @@ FloatMatrix balancing_mat2; octave_idx_type init (const FloatComplexMatrix& a, const FloatComplexMatrix& b, - const std::string& balance_job); + const std::string& balance_job); }; #endif
--- a/liboctave/fCmplxHESS.h +++ b/liboctave/fCmplxHESS.h @@ -46,10 +46,10 @@ FloatComplexHESS& operator = (const FloatComplexHESS& a) { if (this != &a) - { - hess_mat = a.hess_mat; - unitary_hess_mat = a.unitary_hess_mat; - } + { + hess_mat = a.hess_mat; + unitary_hess_mat = a.unitary_hess_mat; + } return *this; }
--- a/liboctave/fCmplxLU.h +++ b/liboctave/fCmplxLU.h @@ -49,7 +49,7 @@ FloatComplexLU& operator = (const FloatComplexLU& a) { if (this != &a) - base_lu <FloatComplexMatrix> :: operator = (a); + base_lu <FloatComplexMatrix> :: operator = (a); return *this; }
--- a/liboctave/fCmplxQRP.h +++ b/liboctave/fCmplxQRP.h @@ -45,10 +45,10 @@ FloatComplexQRP& operator = (const FloatComplexQRP& a) { if (this != &a) - { - FloatComplexQR::operator = (a); - p = a.p; - } + { + FloatComplexQR::operator = (a); + p = a.p; + } return *this; }
--- a/liboctave/fCmplxSCHUR.h +++ b/liboctave/fCmplxSCHUR.h @@ -39,11 +39,11 @@ : schur_mat (), unitary_mat () { } FloatComplexSCHUR (const FloatComplexMatrix& a, const std::string& ord, - bool calc_unitary = true) + bool calc_unitary = true) : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } FloatComplexSCHUR (const FloatComplexMatrix& a, const std::string& ord, octave_idx_type& info, - bool calc_unitary = true) + bool calc_unitary = true) : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } FloatComplexSCHUR (const FloatComplexSCHUR& a) @@ -52,10 +52,10 @@ FloatComplexSCHUR& operator = (const FloatComplexSCHUR& a) { if (this != &a) - { - schur_mat = a.schur_mat; - unitary_mat = a.unitary_mat; - } + { + schur_mat = a.schur_mat; + unitary_mat = a.unitary_mat; + } return *this; }
--- a/liboctave/fCmplxSVD.h +++ b/liboctave/fCmplxSVD.h @@ -44,7 +44,7 @@ } FloatComplexSVD (const FloatComplexMatrix& a, octave_idx_type& info, - SVD::type svd_type = SVD::std) + SVD::type svd_type = SVD::std) { info = init (a, svd_type); } @@ -56,12 +56,12 @@ FloatComplexSVD& operator = (const FloatComplexSVD& a) { if (this != &a) - { - type_computed = a.type_computed; - sigma = a.sigma; - left_sm = a.left_sm; - right_sm = a.right_sm; - } + { + type_computed = a.type_computed; + sigma = a.sigma; + left_sm = a.left_sm; + right_sm = a.right_sm; + } return *this; }
--- a/liboctave/fEIG.h +++ b/liboctave/fEIG.h @@ -72,10 +72,10 @@ FloatEIG& operator = (const FloatEIG& a) { if (this != &a) - { - lambda = a.lambda; - v = a.v; - } + { + lambda = a.lambda; + v = a.v; + } return *this; }
--- a/liboctave/fMatrix.h +++ b/liboctave/fMatrix.h @@ -129,21 +129,21 @@ private: FloatMatrix tinverse (MatrixType &mattype, octave_idx_type& info, float& rcon, - int force, int calc_cond) const; + int force, int calc_cond) const; FloatMatrix finverse (MatrixType &mattype, octave_idx_type& info, float& rcon, - int force, int calc_cond) const; + int force, int calc_cond) const; public: FloatMatrix inverse (void) const; FloatMatrix inverse (octave_idx_type& info) const; FloatMatrix inverse (octave_idx_type& info, float& rcon, int force = 0, - int calc_cond = 1) const; + int calc_cond = 1) const; FloatMatrix inverse (MatrixType &mattype) const; FloatMatrix inverse (MatrixType &mattype, octave_idx_type& info) const; FloatMatrix inverse (MatrixType &mattype, octave_idx_type& info, float& rcon, - int force = 0, int calc_cond = 1) const; + int force = 0, int calc_cond = 1) const; FloatMatrix pseudo_inverse (float tol = 0.0) const; @@ -165,59 +165,59 @@ private: // Upper triangular matrix solvers FloatMatrix utsolve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, - float& rcon, solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + float& rcon, solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Lower triangular matrix solvers FloatMatrix ltsolve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, - float& rcon, solve_singularity_handler sing_handler, - bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; + float& rcon, solve_singularity_handler sing_handler, + bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; // Full matrix solvers (lu/cholesky) FloatMatrix fsolve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, - float& rcon, solve_singularity_handler sing_handler, - bool calc_cond = false) const; + float& rcon, solve_singularity_handler sing_handler, + bool calc_cond = false) const; public: // Generic interface to solver with no probing of type FloatMatrix solve (MatrixType &typ, const FloatMatrix& b) const; FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info) const; FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, - float& rcon) const; + float& rcon) const; FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, - float& rcon, solve_singularity_handler sing_handler, - bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; + float& rcon, solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, - bool singular_fallback = true, + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, + bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b) const; FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; FloatComplexColumnVector solve (MatrixType &typ, - const FloatComplexColumnVector& b) const; + const FloatComplexColumnVector& b) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, - octave_idx_type& info, float& rcon) const; + octave_idx_type& info, float& rcon) const; FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, - octave_idx_type& info, float& rcon, - solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; + octave_idx_type& info, float& rcon, + solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; // Generic interface to solver with probing of type FloatMatrix solve (const FloatMatrix& b) const; @@ -253,33 +253,33 @@ FloatMatrix lssolve (const FloatMatrix& b) const; FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info) const; FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& rank, float& rcon) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info, - octave_idx_type& rank, float &rcon) const; + octave_idx_type& rank, float &rcon) const; FloatColumnVector lssolve (const FloatColumnVector& b) const; FloatColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info) const; FloatColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& rank) const; FloatColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& rank, float& rcon) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, - octave_idx_type& info) const; + octave_idx_type& info) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank) const; + octave_idx_type& info, + octave_idx_type& rank) const; FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, - octave_idx_type& info, - octave_idx_type& rank, float& rcon) const; + octave_idx_type& info, + octave_idx_type& rank, float& rcon) const; FloatMatrix& operator += (const FloatDiagMatrix& a); FloatMatrix& operator -= (const FloatDiagMatrix& a);
--- a/liboctave/fNDArray.h +++ b/liboctave/fNDArray.h @@ -136,11 +136,11 @@ FloatNDArray squeeze (void) const { return MArrayN<float>::squeeze (); } static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); // i/o
--- a/liboctave/file-stat.h +++ b/liboctave/file-stat.h @@ -54,22 +54,22 @@ { if (this != &fs) { - initialized = fs.initialized; - fail = fs.fail; - errmsg = fs.errmsg; - fs_mode = fs.fs_mode; - fs_ino = fs.fs_ino; - fs_dev = fs.fs_dev; - fs_nlink = fs.fs_nlink; - fs_uid = fs.fs_uid; - fs_gid = fs.fs_gid; - fs_size = fs.fs_size; - fs_atime = fs.fs_atime; - fs_mtime = fs.fs_mtime; - fs_ctime = fs.fs_ctime; - fs_rdev = fs.fs_rdev; - fs_blksize = fs.fs_blksize; - fs_blocks = fs.fs_blocks; + initialized = fs.initialized; + fail = fs.fail; + errmsg = fs.errmsg; + fs_mode = fs.fs_mode; + fs_ino = fs.fs_ino; + fs_dev = fs.fs_dev; + fs_nlink = fs.fs_nlink; + fs_uid = fs.fs_uid; + fs_gid = fs.fs_gid; + fs_size = fs.fs_size; + fs_atime = fs.fs_atime; + fs_mtime = fs.fs_mtime; + fs_ctime = fs.fs_ctime; + fs_rdev = fs.fs_rdev; + fs_blksize = fs.fs_blksize; + fs_blocks = fs.fs_blocks; } return *this; @@ -217,10 +217,10 @@ { if (this != &fs) { - base_file_stat::operator = (fs); + base_file_stat::operator = (fs); - file_name = fs.file_name; - follow_links = fs.follow_links; + file_name = fs.file_name; + follow_links = fs.follow_links; } return *this; @@ -238,11 +238,11 @@ { if (n != file_name || ! initialized || force) { - initialized = false; + initialized = false; - file_name = n; + file_name = n; - update_internal (force); + update_internal (force); } } @@ -276,9 +276,9 @@ { if (this != &fs) { - base_file_stat::operator = (fs); + base_file_stat::operator = (fs); - fid = fs.fid; + fid = fs.fid; } return *this; @@ -296,11 +296,11 @@ { if (n != fid || ! initialized || force) { - initialized = false; + initialized = false; - fid = n; + fid = n; - update_internal (force); + update_internal (force); } }
--- a/liboctave/floatCHOL.h +++ b/liboctave/floatCHOL.h @@ -48,10 +48,10 @@ FloatCHOL& operator = (const FloatCHOL& a) { if (this != &a) - { - chol_mat = a.chol_mat; - xrcond = a.xrcond; - } + { + chol_mat = a.chol_mat; + xrcond = a.xrcond; + } return *this; }
--- a/liboctave/floatGEPBAL.h +++ b/liboctave/floatGEPBAL.h @@ -49,12 +49,12 @@ FloatGEPBALANCE& operator = (const FloatGEPBALANCE& a) { if (this != &a) - { - balanced_mat = a.balanced_mat; - balanced_mat2 = a.balanced_mat2; - balancing_mat = a.balancing_mat; - balancing_mat2 = a.balancing_mat2; - } + { + balanced_mat = a.balanced_mat; + balanced_mat2 = a.balanced_mat2; + balancing_mat = a.balancing_mat; + balancing_mat2 = a.balancing_mat2; + } return *this; } @@ -78,7 +78,7 @@ FloatMatrix balancing_mat2; octave_idx_type init (const FloatMatrix& a, const FloatMatrix& b, - const std::string& balance_job); + const std::string& balance_job); }; #endif
--- a/liboctave/floatHESS.h +++ b/liboctave/floatHESS.h @@ -46,10 +46,10 @@ FloatHESS& operator = (const FloatHESS& a) { if (this != &a) - { - hess_mat = a.hess_mat; - unitary_hess_mat = a.unitary_hess_mat; - } + { + hess_mat = a.hess_mat; + unitary_hess_mat = a.unitary_hess_mat; + } return *this; }
--- a/liboctave/floatLU.h +++ b/liboctave/floatLU.h @@ -47,7 +47,7 @@ FloatLU& operator = (const FloatLU& a) { if (this != &a) - base_lu <FloatMatrix> :: operator = (a); + base_lu <FloatMatrix> :: operator = (a); return *this; }
--- a/liboctave/floatQRP.h +++ b/liboctave/floatQRP.h @@ -45,10 +45,10 @@ FloatQRP& operator = (const FloatQRP& a) { if (this != &a) - { - FloatQR::operator = (a); - p = a.p; - } + { + FloatQR::operator = (a); + p = a.p; + } return *this; }
--- a/liboctave/floatSCHUR.h +++ b/liboctave/floatSCHUR.h @@ -42,7 +42,7 @@ : schur_mat (), unitary_mat () { init (a, ord, calc_unitary); } FloatSCHUR (const FloatMatrix& a, const std::string& ord, int& info, - bool calc_unitary = true) + bool calc_unitary = true) : schur_mat (), unitary_mat () { info = init (a, ord, calc_unitary); } FloatSCHUR (const FloatSCHUR& a) @@ -51,10 +51,10 @@ FloatSCHUR& operator = (const FloatSCHUR& a) { if (this != &a) - { - schur_mat = a.schur_mat; - unitary_mat = a.unitary_mat; - } + { + schur_mat = a.schur_mat; + unitary_mat = a.unitary_mat; + } return *this; }
--- a/liboctave/floatSVD.h +++ b/liboctave/floatSVD.h @@ -52,12 +52,12 @@ FloatSVD& operator = (const FloatSVD& a) { if (this != &a) - { - type_computed = a.type_computed; - sigma = a.sigma; - left_sm = a.left_sm; - right_sm = a.right_sm; - } + { + type_computed = a.type_computed; + sigma = a.sigma; + left_sm = a.left_sm; + right_sm = a.right_sm; + } return *this; }
--- a/liboctave/glob-match.h +++ b/liboctave/glob-match.h @@ -42,11 +42,11 @@ }; glob_match (const std::string& p, - unsigned int xopts = pathname|noescape|period) + unsigned int xopts = pathname|noescape|period) : pat (p), fnmatch_flags (opts_to_fnmatch_flags (xopts)) { } glob_match (const string_vector& p = string_vector (), - unsigned int xopts = pathname|noescape|period) + unsigned int xopts = pathname|noescape|period) : pat (p), fnmatch_flags (opts_to_fnmatch_flags (xopts)) { } glob_match (const glob_match& gm)
--- a/liboctave/idx-vector.h +++ b/liboctave/idx-vector.h @@ -523,19 +523,19 @@ ~idx_vector (void) { if (--rep->count == 0) - delete rep; + delete rep; } idx_vector& operator = (const idx_vector& a) { if (this != &a) - { - if (--rep->count == 0) - delete rep; + { + if (--rep->count == 0) + delete rep; - rep = a.rep; - rep->count++; - } + rep = a.rep; + rep->count++; + } return *this; }
--- a/liboctave/intNDArray.h +++ b/liboctave/intNDArray.h @@ -108,11 +108,11 @@ intNDArray& insert (const intNDArray<T>& a, const Array<octave_idx_type>& ra_idx); static void increment_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions, - int start_dimension = 0); + const dim_vector& dimensions, + int start_dimension = 0); static octave_idx_type compute_index (Array<octave_idx_type>& ra_idx, - const dim_vector& dimensions); + const dim_vector& dimensions); static T resize_fill_value (void) { return 0; }
--- a/liboctave/lo-ieee.h +++ b/liboctave/lo-ieee.h @@ -24,7 +24,7 @@ #if !defined (octave_liboctave_ieee_h) #define octave_liboctave_ieee_h 1 -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -111,23 +111,23 @@ extern OCTAVE_API int __lo_ieee_float_signbit (float); -#ifdef __cplusplus +#ifdef __cplusplus } #endif #define lo_ieee_isnan(x) (sizeof (x) == sizeof (float) ? \ - __lo_ieee_float_isnan (x) : __lo_ieee_isnan (x)) + __lo_ieee_float_isnan (x) : __lo_ieee_isnan (x)) #define lo_ieee_finite(x) (sizeof (x) == sizeof (float) ? \ - __lo_ieee_float_finite (x) : __lo_ieee_finite (x)) + __lo_ieee_float_finite (x) : __lo_ieee_finite (x)) #define lo_ieee_isinf(x) (sizeof (x) == sizeof (float) ? \ - __lo_ieee_float_isinf (x) : __lo_ieee_isinf (x)) + __lo_ieee_float_isinf (x) : __lo_ieee_isinf (x)) #define lo_ieee_is_NA(x) (sizeof (x) == sizeof (float) ? \ - __lo_ieee_float_is_NA (x) : __lo_ieee_is_NA (x)) + __lo_ieee_float_is_NA (x) : __lo_ieee_is_NA (x)) #define lo_ieee_is_NaN_or_NA(x) (sizeof (x) == sizeof (float) ? \ - __lo_ieee_float_is_NaN_or_NA (x) : __lo_ieee_is_NaN_or_NA (x)) + __lo_ieee_float_is_NaN_or_NA (x) : __lo_ieee_is_NaN_or_NA (x)) #define lo_ieee_signbit(x) (sizeof (x) == sizeof (float) ? \ - __lo_ieee_float_signbit (x) : __lo_ieee_signbit (x)) + __lo_ieee_float_signbit (x) : __lo_ieee_signbit (x)) #endif
--- a/liboctave/lo-specfun.h +++ b/liboctave/lo-specfun.h @@ -130,171 +130,171 @@ extern OCTAVE_API ComplexMatrix besselj (double alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix bessely (double alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besseli (double alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselk (double alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh1 (double alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh2 (double alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselj (const Matrix& alpha, const Complex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix bessely (const Matrix& alpha, const Complex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besseli (const Matrix& alpha, const Complex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselk (const Matrix& alpha, const Complex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh1 (const Matrix& alpha, const Complex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh2 (const Matrix& alpha, const Complex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselj (const Matrix& alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix bessely (const Matrix& alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besseli (const Matrix& alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselk (const Matrix& alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh1 (const Matrix& alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh2 (const Matrix& alpha, const ComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselj (double alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray bessely (double alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besseli (double alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselk (double alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselh1 (double alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselh2 (double alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselj (const NDArray& alpha, const Complex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray bessely (const NDArray& alpha, const Complex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besseli (const NDArray& alpha, const Complex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselk (const NDArray& alpha, const Complex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselh1 (const NDArray& alpha, const Complex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselh2 (const NDArray& alpha, const Complex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselj (const NDArray& alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray bessely (const NDArray& alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besseli (const NDArray& alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselk (const NDArray& alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselh1 (const NDArray& alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexNDArray besselh2 (const NDArray& alpha, const ComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselj (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix bessely (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besseli (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselk (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh1 (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API ComplexMatrix besselh2 (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplex besselj (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); @@ -316,171 +316,171 @@ extern OCTAVE_API FloatComplexMatrix besselj (float alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix bessely (float alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besseli (float alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselk (float alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh1 (float alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh2 (float alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselj (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix bessely (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besseli (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselk (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh1 (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh2 (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselj (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix bessely (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besseli (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselk (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh1 (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh2 (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselj (float alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray bessely (float alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besseli (float alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselk (float alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselh1 (float alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselh2 (float alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselj (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray bessely (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besseli (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselk (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselh1 (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselh2 (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselj (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray bessely (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besseli (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselk (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselh1 (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexNDArray besselh2 (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, - Array<octave_idx_type>& ierr); + Array<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselj (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix bessely (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besseli (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselk (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh1 (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API FloatComplexMatrix besselh2 (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, - Array2<octave_idx_type>& ierr); + Array2<octave_idx_type>& ierr); extern OCTAVE_API Complex airy (const Complex& z, bool deriv, bool scaled, octave_idx_type& ierr); extern OCTAVE_API Complex biry (const Complex& z, bool deriv, bool scaled, octave_idx_type& ierr);
--- a/liboctave/mx-op-decl.h +++ b/liboctave/mx-op-decl.h @@ -287,11 +287,11 @@ extern OCTAVE_API T ## NDArray min (octave_ ## T d, const T ## NDArray& m); \ extern OCTAVE_API T ## NDArray min (const T ## NDArray& m, octave_ ## T d); \ extern OCTAVE_API T ## NDArray min (const T ## NDArray& a, \ - const T ## NDArray& b); \ + const T ## NDArray& b); \ extern OCTAVE_API T ## NDArray max (octave_ ## T d, const T ## NDArray& m); \ extern OCTAVE_API T ## NDArray max (const T ## NDArray& m, octave_ ## T d); \ extern OCTAVE_API T ## NDArray max (const T ## NDArray& a, \ - const T ## NDArray& b); + const T ## NDArray& b); // permutation matrix by matrix ops and vice versa
--- a/liboctave/mx-op-defs.h +++ b/liboctave/mx-op-defs.h @@ -388,14 +388,14 @@ r.resize (m_nr, m_nc); \ \ if (m_nr > 0 && m_nc > 0) \ - { \ - r = R (m); \ + { \ + r = R (m); \ \ - octave_idx_type len = dm.length (); \ + octave_idx_type len = dm.length (); \ \ - for (octave_idx_type i = 0; i < len; i++) \ - r.elem(i, i) OPEQ dm.elem(i, i); \ - } \ + for (octave_idx_type i = 0; i < len; i++) \ + r.elem(i, i) OPEQ dm.elem(i, i); \ + } \ } \ \ return r; \ @@ -458,16 +458,16 @@ else \ { \ if (m_nr > 0 && m_nc > 0) \ - { \ - r = R (PREOP m); \ + { \ + r = R (PREOP m); \ \ - octave_idx_type len = dm.length (); \ + octave_idx_type len = dm.length (); \ \ - for (octave_idx_type i = 0; i < len; i++) \ - r.elem(i, i) OPEQ dm.elem(i, i); \ - } \ + for (octave_idx_type i = 0; i < len; i++) \ + r.elem(i, i) OPEQ dm.elem(i, i); \ + } \ else \ - r.resize (m_nr, m_nc); \ + r.resize (m_nr, m_nc); \ } \ \ return r; \ @@ -530,10 +530,10 @@ gripe_nonconformant (#OP, dm1_nr, dm1_nc, dm2_nr, dm2_nc); \ else \ { \ - r.resize (dm1_nr, dm1_nc); \ + r.resize (dm1_nr, dm1_nc); \ \ - if (dm1_nr > 0 && dm1_nc > 0) \ - F (dm1.length (), r.fortran_vec (), dm1.data (), dm2.data ()); \ + if (dm1_nr > 0 && dm1_nc > 0) \ + F (dm1.length (), r.fortran_vec (), dm1.data (), dm2.data ()); \ } \ \ return r; \
--- a/liboctave/oct-env.h +++ b/liboctave/oct-env.h @@ -82,7 +82,7 @@ std::string do_base_pathname (const std::string& s) const; std::string do_make_absolute (const std::string& s, - const std::string& dot_path) const; + const std::string& dot_path) const; std::string do_getcwd (void) const;
--- a/liboctave/oct-fftw.h +++ b/liboctave/oct-fftw.h @@ -60,22 +60,22 @@ static fftw_plan create_plan (int dir, const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const Complex *in, - Complex *out) + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const Complex *in, + Complex *out) { static fftw_plan dummy; return instance_ok () ? instance->do_create_plan (dir, rank, dims, howmany, stride, - dist, in, out) + dist, in, out) : dummy; } static fftw_plan create_plan (const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const double *in, Complex *out) + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const double *in, Complex *out) { static fftw_plan dummy; @@ -104,14 +104,14 @@ fftw_plan do_create_plan (int dir, const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const Complex *in, - Complex *out); + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const Complex *in, + Complex *out); fftw_plan do_create_plan (const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const double *in, Complex *out); + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const double *in, Complex *out); FftwMethod do_method (void); @@ -189,22 +189,22 @@ static fftwf_plan create_plan (int dir, const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const FloatComplex *in, - FloatComplex *out) + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const FloatComplex *in, + FloatComplex *out) { static fftwf_plan dummy; return instance_ok () ? instance->do_create_plan (dir, rank, dims, howmany, stride, - dist, in, out) + dist, in, out) : dummy; } static fftwf_plan create_plan (const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const float *in, FloatComplex *out) + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const float *in, FloatComplex *out) { static fftwf_plan dummy; @@ -233,14 +233,14 @@ fftwf_plan do_create_plan (int dir, const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const FloatComplex *in, - FloatComplex *out); + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const FloatComplex *in, + FloatComplex *out); fftwf_plan do_create_plan (const int rank, const dim_vector dims, - octave_idx_type howmany, octave_idx_type stride, - octave_idx_type dist, const float *in, FloatComplex *out); + octave_idx_type howmany, octave_idx_type stride, + octave_idx_type dist, const float *in, FloatComplex *out); FftwMethod do_method (void); @@ -299,30 +299,30 @@ public: static int fft (const double *in, Complex *out, size_t npts, - size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); + size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); static int fft (const Complex *in, Complex *out, size_t npts, - size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); + size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); static int ifft (const Complex *in, Complex *out, size_t npts, - size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); + size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); static int fftNd (const double*, Complex*, const int, const dim_vector &); static int fftNd (const Complex*, Complex*, const int, - const dim_vector &); + const dim_vector &); static int ifftNd (const Complex*, Complex*, const int, - const dim_vector &); + const dim_vector &); static int fft (const float *in, FloatComplex *out, size_t npts, - size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); + size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); static int fft (const FloatComplex *in, FloatComplex *out, size_t npts, - size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); + size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); static int ifft (const FloatComplex *in, FloatComplex *out, size_t npts, - size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); + size_t nsamples = 1, octave_idx_type stride = 1, octave_idx_type dist = -1); static int fftNd (const float*, FloatComplex*, const int, const dim_vector &); static int fftNd (const FloatComplex*, FloatComplex*, const int, - const dim_vector &); + const dim_vector &); static int ifftNd (const FloatComplex*, FloatComplex*, const int, - const dim_vector &); + const dim_vector &); private: octave_fftw (void);
--- a/liboctave/oct-group.h +++ b/liboctave/oct-group.h @@ -48,11 +48,11 @@ { if (this != &gr) { - gr_name = gr.gr_name; - gr_passwd = gr.gr_passwd; - gr_gid = gr.gr_gid; - gr_mem = gr.gr_mem; - valid = gr.valid; + gr_name = gr.gr_name; + gr_passwd = gr.gr_passwd; + gr_gid = gr.gr_gid; + gr_mem = gr.gr_mem; + valid = gr.valid; } return *this;
--- a/liboctave/oct-inttypes.h +++ b/liboctave/oct-inttypes.h @@ -709,7 +709,7 @@ // FIXME -- this is a workaround due to MSVC's absence of // std::abs (int64_t). The call to octave_int_abs can't // overflow, but std::abs (x) can! - T w = octave_int_abs (x % y); + T w = octave_int_abs (x % y); if (w >= y - w) z += 1 - (signbit (x) << 1); @@ -955,7 +955,7 @@ template <class T> octave_int<T> bitshift (const octave_int<T>& a, int n, - const octave_int<T>& mask = std::numeric_limits<T>::max ()) + const octave_int<T>& mask = std::numeric_limits<T>::max ()) { if (n > 0) return (a << n) & mask;
--- a/liboctave/oct-mutex.h +++ b/liboctave/oct-mutex.h @@ -66,11 +66,11 @@ { if (rep != m.rep) { - if (--rep->count == 0) - delete rep; + if (--rep->count == 0) + delete rep; - rep = m.rep; - rep->count++; + rep = m.rep; + rep->count++; } return *this;
--- a/liboctave/oct-passwd.h +++ b/liboctave/oct-passwd.h @@ -48,14 +48,14 @@ { if (this != &pw) { - pw_name = pw.pw_name; - pw_passwd = pw.pw_passwd; - pw_uid = pw.pw_uid; - pw_gid = pw.pw_gid; - pw_gecos = pw.pw_gecos; - pw_dir = pw.pw_dir; - pw_shell = pw.pw_shell; - valid = pw.valid; + pw_name = pw.pw_name; + pw_passwd = pw.pw_passwd; + pw_uid = pw.pw_uid; + pw_gid = pw.pw_gid; + pw_gecos = pw.pw_gecos; + pw_dir = pw.pw_dir; + pw_shell = pw.pw_shell; + valid = pw.valid; } return *this;
--- a/liboctave/oct-rand.h +++ b/liboctave/oct-rand.h @@ -66,7 +66,7 @@ // Set the current state/ static void state (const ColumnVector &s, - const std::string& d = std::string ()) + const std::string& d = std::string ()) { if (instance_ok ()) instance->do_state (s, d);
--- a/liboctave/oct-shlib.h +++ b/liboctave/oct-shlib.h @@ -129,13 +129,13 @@ octave_shlib& operator = (const octave_shlib& sl) { if (rep != sl.rep) - { - if (--rep->count == 0) - delete rep; + { + if (--rep->count == 0) + delete rep; - rep = sl.rep; - rep->count++; - } + rep = sl.rep; + rep->count++; + } return *this; }
--- a/liboctave/oct-sort.h +++ b/liboctave/oct-sort.h @@ -108,7 +108,7 @@ public: typedef bool (*compare_fcn_type) (typename ref_param<T>::type, - typename ref_param<T>::type); + typename ref_param<T>::type); octave_sort (void); @@ -159,10 +159,10 @@ octave_idx_type lo, octave_idx_type up = -1); static bool ascending_compare (typename ref_param<T>::type, - typename ref_param<T>::type); + typename ref_param<T>::type); static bool descending_compare (typename ref_param<T>::type, - typename ref_param<T>::type); + typename ref_param<T>::type); private:
--- a/liboctave/oct-spparms.h +++ b/liboctave/oct-spparms.h @@ -58,8 +58,8 @@ { if (&a != this) { - params = a.params; - keys = a.keys; + params = a.params; + keys = a.keys; } return *this;
--- a/liboctave/oct-time.h +++ b/liboctave/oct-time.h @@ -49,15 +49,15 @@ if (us >= 0) { - rem = us % 1000000; - extra = (us - rem) / 1000000; + rem = us % 1000000; + extra = (us - rem) / 1000000; } else { - us = -us; - rem = us % 1000000; - extra = - (1 + (us - rem) / 1000000); - rem = 1000000 - us % 1000000; + us = -us; + rem = us % 1000000; + extra = - (1 + (us - rem) / 1000000); + rem = 1000000 - us % 1000000; } ot_usec = rem; @@ -80,8 +80,8 @@ { if (this != &ot) { - ot_unix_time = ot.ot_unix_time; - ot_usec = ot.ot_usec; + ot_unix_time = ot.ot_unix_time; + ot_usec = ot.ot_usec; } return *this; @@ -162,7 +162,7 @@ operator + (const octave_time& t1, const octave_time& t2) { return octave_time (t1.unix_time () + t2.unix_time (), - t1.usec () + t2.usec ()); + t1.usec () + t2.usec ()); } class @@ -188,17 +188,17 @@ { if (this != &tm) { - tm_usec = tm.tm_usec; - tm_sec = tm.tm_sec; - tm_min = tm.tm_min; - tm_hour = tm.tm_hour; - tm_mday = tm.tm_mday; - tm_mon = tm.tm_mon; - tm_year = tm.tm_year; - tm_wday = tm.tm_wday; - tm_yday = tm.tm_yday; - tm_isdst = tm.tm_isdst; - tm_zone = tm.tm_zone; + tm_usec = tm.tm_usec; + tm_sec = tm.tm_sec; + tm_min = tm.tm_min; + tm_hour = tm.tm_hour; + tm_mday = tm.tm_mday; + tm_mon = tm.tm_mon; + tm_year = tm.tm_year; + tm_wday = tm.tm_wday; + tm_yday = tm.tm_yday; + tm_isdst = tm.tm_isdst; + tm_zone = tm.tm_zone; } return *this;
--- a/liboctave/oct-uname.h +++ b/liboctave/oct-uname.h @@ -51,14 +51,14 @@ { if (this != &unm) { - utsname_sysname = unm.utsname_sysname; - utsname_nodename = unm.utsname_nodename; - utsname_release = unm.utsname_release; - utsname_version = unm.utsname_version; - utsname_machine = unm.utsname_machine; + utsname_sysname = unm.utsname_sysname; + utsname_nodename = unm.utsname_nodename; + utsname_release = unm.utsname_release; + utsname_version = unm.utsname_version; + utsname_machine = unm.utsname_machine; - msg = unm.msg; - err = unm.err; + msg = unm.msg; + err = unm.err; } return *this;
--- a/liboctave/pathsearch.h +++ b/liboctave/pathsearch.h @@ -35,11 +35,11 @@ public: dir_path (const std::string& s = std::string (), - const std::string& d = std::string ()) + const std::string& d = std::string ()) : p_orig (s), p_default (d), initialized (false) { if (! p_orig.empty ()) - init (); + init (); } dir_path (const dir_path& dp) @@ -139,10 +139,10 @@ static void path_sep_char (char c) { if (instance_ok ()) - { - instance->xpath_sep_char = c; - instance->xpath_sep_str = std::string (1, c); - } + { + instance->xpath_sep_char = c; + instance->xpath_sep_str = std::string (1, c); + } } static std::string path_sep_str (void)
--- a/liboctave/sparse-base-chol.h +++ b/liboctave/sparse-base-chol.h @@ -37,14 +37,14 @@ { public: sparse_base_chol_rep (void) : count (1), Lsparse (0), - is_pd (false), minor_p (0) { } + is_pd (false), minor_p (0) { } sparse_base_chol_rep (const chol_type& a, - const bool natural) : count (1) + const bool natural) : count (1) { init (a, natural); } sparse_base_chol_rep (const chol_type& a, octave_idx_type& info, - const bool natural) : count (1) + const bool natural) : count (1) { info = init (a, natural); } ~sparse_base_chol_rep (void) @@ -54,7 +54,7 @@ octave_idx_type P (void) const { return (minor_p == static_cast<octave_idx_type>(Lsparse->ncol) ? - 0 : minor_p + 1); } + 0 : minor_p + 1); } ColumnVector perm (void) const { return perms + 1; } @@ -93,11 +93,11 @@ sparse_base_chol_rep (void) : count (1), is_pd (false), minor_p (0) { } sparse_base_chol_rep (const chol_type& a, - const bool natural) : count (1) + const bool natural) : count (1) { init (a, natural); } sparse_base_chol_rep (const chol_type& a, octave_idx_type& info, - const bool natural) : count (1) + const bool natural) : count (1) { info = init (a, natural); } ~sparse_base_chol_rep (void) { } @@ -140,11 +140,11 @@ sparse_base_chol (const chol_type& a, const bool n) : rep (new typename sparse_base_chol<chol_type, chol_elt, p_type>:: - sparse_base_chol_rep (a, n)) { } + sparse_base_chol_rep (a, n)) { } sparse_base_chol (const chol_type& a, octave_idx_type& info, const bool n) : rep (new typename sparse_base_chol<chol_type, chol_elt, p_type>:: - sparse_base_chol_rep (a, info, n)) { } + sparse_base_chol_rep (a, info, n)) { } sparse_base_chol (const sparse_base_chol<chol_type, chol_elt, p_type>& a) : rep (a.rep) { rep->count++; } @@ -152,19 +152,19 @@ ~sparse_base_chol (void) { if (--rep->count <= 0) - delete rep; + delete rep; } sparse_base_chol& operator = (const sparse_base_chol& a) { if (this != &a) - { - if (--rep->count <= 0) - delete rep; + { + if (--rep->count <= 0) + delete rep; - rep = a.rep; - rep->count++; - } + rep = a.rep; + rep->count++; + } return *this; }
--- a/liboctave/sparse-base-lu.h +++ b/liboctave/sparse-base-lu.h @@ -42,13 +42,13 @@ sparse_base_lu& operator = (const sparse_base_lu& a) { if (this != &a) - { - Lfact = a.Lfact; - Ufact = a.Ufact; - cond = a.cond; - P = a.P; - Q = a.Q; - } + { + Lfact = a.Lfact; + Ufact = a.Ufact; + cond = a.cond; + P = a.P; + Q = a.Q; + } return *this; }
--- a/liboctave/sparse-sort.h +++ b/liboctave/sparse-sort.h @@ -36,7 +36,7 @@ }; bool octave_sparse_sidxl_comp (octave_sparse_sort_idxl* i, - octave_sparse_sort_idxl* j); + octave_sparse_sort_idxl* j); class octave_idx_vector_sort @@ -47,6 +47,6 @@ }; bool octave_idx_vector_comp (octave_idx_vector_sort* i, - octave_idx_vector_sort* j); + octave_idx_vector_sort* j); #endif
--- a/liboctave/sparse-util.h +++ b/liboctave/sparse-util.h @@ -33,7 +33,7 @@ extern OCTAVE_API bool sparse_indices_ok (octave_idx_type *r, octave_idx_type *c, - octave_idx_type nrows, octave_idx_type ncols, - octave_idx_type nnz); + octave_idx_type nrows, octave_idx_type ncols, + octave_idx_type nnz); #endif
--- a/liboctave/statdefs.h +++ b/liboctave/statdefs.h @@ -30,31 +30,31 @@ #include <sys/stat.h> #endif -#ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */ +#ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */ #ifndef mode_t #define mode_t unsigned short #endif #endif #if !defined(S_ISBLK) && defined(S_IFBLK) -#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif #if !defined(S_ISCHR) && defined(S_IFCHR) -#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) #endif #if !defined(S_ISDIR) && defined(S_IFDIR) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif #if !defined(S_ISREG) && defined(S_IFREG) -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #if !defined(S_ISFIFO) && defined(S_IFIFO) -#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) #endif #if !defined(S_ISLNK) && defined(S_IFLNK) -#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #if !defined(S_ISSOCK) && defined(S_IFSOCK) -#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)