comparison src/DLD-FUNCTIONS/colamd.cc @ 14854:5ae9f0f77635

maint: Use Octave coding conventions for coddling parenthis is DLD-FUNCTIONS directory * __fltk_uigetfile__.cc, __glpk__.cc, __init_fltk__.cc, __magick_read__.cc, besselj.cc, bsxfun.cc, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc, daspk.cc, dasrt.cc, dassl.cc, dmperm.cc, fft.cc, filter.cc, find.cc, gcd.cc, kron.cc, lsode.cc, lu.cc, luinc.cc, quad.cc, quadcc.cc, rand.cc, regexp.cc, schur.cc, str2double.cc, symbfact.cc, symrcm.cc, tril.cc, urlwrite.cc: Use Octave coding conventions for coddling parenthis is DLD-FUNCTIONS directory.
author Rik <octave@nomad.inbox5.com>
date Mon, 09 Jul 2012 13:01:49 -0700
parents 8de863b7126b
children 560317fd5977
comparison
equal deleted inserted replaced
14853:72b8b39e12be 14854:5ae9f0f77635
224 than that of @code{@var{S}' * @var{S}}.\n\ 224 than that of @code{@var{S}' * @var{S}}.\n\
225 \n\ 225 \n\
226 @var{knobs} is an optional one- to three-element input vector. If @var{S} is\n\ 226 @var{knobs} is an optional one- to three-element input vector. If @var{S} is\n\
227 m-by-n, then rows with more than @code{max(16,@var{knobs}(1)*sqrt(n))}\n\ 227 m-by-n, then rows with more than @code{max(16,@var{knobs}(1)*sqrt(n))}\n\
228 entries are ignored. Columns with more than\n\ 228 entries are ignored. Columns with more than\n\
229 @code{max(16,@var{knobs}(2)*sqrt(min(m,n)))} entries are removed prior to\n\ 229 @code{max (16,@var{knobs}(2)*sqrt(min(m,n)))} entries are removed prior to\n\
230 ordering, and ordered last in the output permutation @var{p}. Only\n\ 230 ordering, and ordered last in the output permutation @var{p}. Only\n\
231 completely dense rows or columns are removed if @code{@var{knobs}(1)} and\n\ 231 completely dense rows or columns are removed if @code{@var{knobs}(1)} and\n\
232 @code{@var{knobs}(2)} are < 0, respectively. If @code{@var{knobs}(3)} is\n\ 232 @code{@var{knobs}(2)} are < 0, respectively. If @code{@var{knobs}(3)} is\n\
233 nonzero, @var{stats} and @var{knobs} are printed. The default is\n\ 233 nonzero, @var{stats} and @var{knobs} are printed. The default is\n\
234 @code{@var{knobs} = [10 10 0]}. Note that @var{knobs} differs from earlier\n\ 234 @code{@var{knobs} = [10 10 0]}. Note that @var{knobs} differs from earlier\n\
312 octave_stdout << "\ncolamd version " << COLAMD_MAIN_VERSION << "." 312 octave_stdout << "\ncolamd version " << COLAMD_MAIN_VERSION << "."
313 << COLAMD_SUB_VERSION << ", " << COLAMD_DATE << ":\n"; 313 << COLAMD_SUB_VERSION << ", " << COLAMD_DATE << ":\n";
314 314
315 if (knobs [COLAMD_DENSE_ROW] >= 0) 315 if (knobs [COLAMD_DENSE_ROW] >= 0)
316 octave_stdout << "knobs(1): " << User_knobs (0) 316 octave_stdout << "knobs(1): " << User_knobs (0)
317 << ", rows with > max(16," 317 << ", rows with > max (16,"
318 << knobs [COLAMD_DENSE_ROW] << "*sqrt(size(A,2)))" 318 << knobs [COLAMD_DENSE_ROW] << "*sqrt (size(A,2)))"
319 << " entries removed\n"; 319 << " entries removed\n";
320 else 320 else
321 octave_stdout << "knobs(1): " << User_knobs (0) 321 octave_stdout << "knobs(1): " << User_knobs (0)
322 << ", only completely dense rows removed\n"; 322 << ", only completely dense rows removed\n";
323 323
324 if (knobs [COLAMD_DENSE_COL] >= 0) 324 if (knobs [COLAMD_DENSE_COL] >= 0)
325 octave_stdout << "knobs(2): " << User_knobs (1) 325 octave_stdout << "knobs(2): " << User_knobs (1)
326 << ", cols with > max(16," 326 << ", cols with > max (16,"
327 << knobs [COLAMD_DENSE_COL] << "*sqrt(size(A)))" 327 << knobs [COLAMD_DENSE_COL] << "*sqrt (size(A)))"
328 << " entries removed\n"; 328 << " entries removed\n";
329 else 329 else
330 octave_stdout << "knobs(2): " << User_knobs (1) 330 octave_stdout << "knobs(2): " << User_knobs (1)
331 << ", only completely dense columns removed\n"; 331 << ", only completely dense columns removed\n";
332 332
413 tree_postorder (n_col, etree, colbeg); 413 tree_postorder (n_col, etree, colbeg);
414 414
415 // return the permutation vector 415 // return the permutation vector
416 NDArray out_perm (dim_vector (1, n_col)); 416 NDArray out_perm (dim_vector (1, n_col));
417 for (octave_idx_type i = 0; i < n_col; i++) 417 for (octave_idx_type i = 0; i < n_col; i++)
418 out_perm(i) = p [colbeg [i]] + 1; 418 out_perm(i) = p[colbeg [i]] + 1;
419 419
420 retval(0) = out_perm; 420 retval(0) = out_perm;
421 421
422 // print stats if spumoni > 0 422 // print stats if spumoni > 0
423 if (spumoni > 0) 423 if (spumoni > 0)
462 to be symmetric; only the strictly lower triangular part is referenced.\n\ 462 to be symmetric; only the strictly lower triangular part is referenced.\n\
463 @var{S} must be square.\n\ 463 @var{S} must be square.\n\
464 \n\ 464 \n\
465 @var{knobs} is an optional one- to two-element input vector. If @var{S} is\n\ 465 @var{knobs} is an optional one- to two-element input vector. If @var{S} is\n\
466 n-by-n, then rows and columns with more than\n\ 466 n-by-n, then rows and columns with more than\n\
467 @code{max(16,@var{knobs}(1)*sqrt(n))} entries are removed prior to ordering,\n\ 467 @code{max (16,@var{knobs}(1)*sqrt(n))} entries are removed prior to ordering,\n\
468 and ordered last in the output permutation @var{p}. No rows/columns are\n\ 468 and ordered last in the output permutation @var{p}. No rows/columns are\n\
469 removed if @code{@var{knobs}(1) < 0}. If @code{@var{knobs} (2)} is nonzero,\n\ 469 removed if @code{@var{knobs}(1) < 0}. If @code{@var{knobs} (2)} is nonzero,\n\
470 @code{stats} and @var{knobs} are printed. The default is @code{@var{knobs}\n\ 470 @code{stats} and @var{knobs} are printed. The default is @code{@var{knobs}\n\
471 = [10 0]}. Note that @var{knobs} differs from earlier versions of symamd.\n\ 471 = [10 0]}. Note that @var{knobs} differs from earlier versions of symamd.\n\
472 \n\ 472 \n\
606 tree_postorder (n_col, etree, post); 606 tree_postorder (n_col, etree, post);
607 607
608 // return the permutation vector 608 // return the permutation vector
609 NDArray out_perm (dim_vector (1, n_col)); 609 NDArray out_perm (dim_vector (1, n_col));
610 for (octave_idx_type i = 0; i < n_col; i++) 610 for (octave_idx_type i = 0; i < n_col; i++)
611 out_perm(i) = perm [post [i]] + 1; 611 out_perm(i) = perm[post [i]] + 1;
612 612
613 retval(0) = out_perm; 613 retval(0) = out_perm;
614 614
615 // print stats if spumoni > 0 615 // print stats if spumoni > 0
616 if (spumoni > 0) 616 if (spumoni > 0)