comparison src/DLD-FUNCTIONS/colamd.cc @ 13219:cf5ebc0e47e4

fix warnings for unused but set variables and shadowed variables * quadcc.cc (Fquadcc): Delete unused variable err_excess. * find.cc (find_nonzero_elem_idx (const PermMatrix&, int, octave_idx_type, int)): Delete unused variable end_nc. * eigs.cc (Feigs): Delete unused variable bmat. * conv2.cc (Fconvn): Delete unused variable separable. * colamd.cc (Fetree, Fsymamd): Delete unused variable nnz. * ccolamd.cc (Fcsymamd): Delete unused variable nnz. * pt-pr-code.cc (tree_print_code::visit_index_expression): Delete unused variable expr_has_parens. * pt-mat.cc (tree_matrix::rvalue1): Delete unused variables all_complex_p and all_strings_p (tm_const::init): Eliminate shadowed variables. * gl-render.cc (opengl_renderer::draw_image): Delete unused variable ok.
author John W. Eaton <jwe@octave.org>
date Sun, 25 Sep 2011 16:52:23 -0400
parents f96b9b9f141b
children b0cdd60db5e5
comparison
equal deleted inserted replaced
13218:01b7a60e2ff0 13219:cf5ebc0e47e4
542 // print knob settings if spumoni is set 542 // print knob settings if spumoni is set
543 if (spumoni > 0) 543 if (spumoni > 0)
544 octave_stdout << "symamd: dense row/col fraction: " 544 octave_stdout << "symamd: dense row/col fraction: "
545 << knobs [COLAMD_DENSE_ROW] << std::endl; 545 << knobs [COLAMD_DENSE_ROW] << std::endl;
546 546
547 octave_idx_type n_row, n_col, nnz; 547 octave_idx_type n_row, n_col;
548 octave_idx_type *ridx, *cidx; 548 octave_idx_type *ridx, *cidx;
549 SparseMatrix sm; 549 SparseMatrix sm;
550 SparseComplexMatrix scm; 550 SparseComplexMatrix scm;
551 551
552 if (args(0).is_sparse_type ()) 552 if (args(0).is_sparse_type ())
554 if (args(0).is_complex_type ()) 554 if (args(0).is_complex_type ())
555 { 555 {
556 scm = args(0).sparse_complex_matrix_value (); 556 scm = args(0).sparse_complex_matrix_value ();
557 n_row = scm.rows (); 557 n_row = scm.rows ();
558 n_col = scm.cols (); 558 n_col = scm.cols ();
559 nnz = scm.nnz ();
560 ridx = scm.xridx (); 559 ridx = scm.xridx ();
561 cidx = scm.xcidx (); 560 cidx = scm.xcidx ();
562 } 561 }
563 else 562 else
564 { 563 {
565 sm = args(0).sparse_matrix_value (); 564 sm = args(0).sparse_matrix_value ();
566 n_row = sm.rows (); 565 n_row = sm.rows ();
567 n_col = sm.cols (); 566 n_col = sm.cols ();
568 nnz = sm.nnz ();
569 ridx = sm.xridx (); 567 ridx = sm.xridx ();
570 cidx = sm.xcidx (); 568 cidx = sm.xcidx ();
571 } 569 }
572 } 570 }
573 else 571 else
577 else 575 else
578 sm = SparseMatrix (args(0).matrix_value ()); 576 sm = SparseMatrix (args(0).matrix_value ());
579 577
580 n_row = sm.rows (); 578 n_row = sm.rows ();
581 n_col = sm.cols (); 579 n_col = sm.cols ();
582 nnz = sm.nnz ();
583 ridx = sm.xridx (); 580 ridx = sm.xridx ();
584 cidx = sm.xcidx (); 581 cidx = sm.xcidx ();
585 } 582 }
586 583
587 if (n_row != n_col) 584 if (n_row != n_col)
666 663
667 if (nargout > 2 || nargin < 1 || nargin > 2) 664 if (nargout > 2 || nargin < 1 || nargin > 2)
668 print_usage (); 665 print_usage ();
669 else 666 else
670 { 667 {
671 octave_idx_type n_row, n_col, nnz; 668 octave_idx_type n_row, n_col;
672 octave_idx_type *ridx, *cidx; 669 octave_idx_type *ridx, *cidx;
673 bool is_sym = true; 670 bool is_sym = true;
674 SparseMatrix sm; 671 SparseMatrix sm;
675 SparseComplexMatrix scm; 672 SparseComplexMatrix scm;
676 673
679 if (args(0).is_complex_type ()) 676 if (args(0).is_complex_type ())
680 { 677 {
681 scm = args(0).sparse_complex_matrix_value (); 678 scm = args(0).sparse_complex_matrix_value ();
682 n_row = scm.rows (); 679 n_row = scm.rows ();
683 n_col = scm.cols (); 680 n_col = scm.cols ();
684 nnz = scm.nnz ();
685 ridx = scm.xridx (); 681 ridx = scm.xridx ();
686 cidx = scm.xcidx (); 682 cidx = scm.xcidx ();
687 } 683 }
688 else 684 else
689 { 685 {
690 sm = args(0).sparse_matrix_value (); 686 sm = args(0).sparse_matrix_value ();
691 n_row = sm.rows (); 687 n_row = sm.rows ();
692 n_col = sm.cols (); 688 n_col = sm.cols ();
693 nnz = sm.nnz ();
694 ridx = sm.xridx (); 689 ridx = sm.xridx ();
695 cidx = sm.xcidx (); 690 cidx = sm.xcidx ();
696 } 691 }
697 692
698 } 693 }