~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to CXSparse/MATLAB/Test/check_if_same.m

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function check_if_same (p1,p2)
 
2
%CHECK_IF_SAME check if two inputs are identical or not
 
3
%
 
4
% Example:
 
5
%   check_if_same (1:5, 2:6)
 
6
% See also: testall
 
7
 
 
8
%   Copyright 2006-2007, Timothy A. Davis.
 
9
%   http://www.cise.ufl.edu/research/sparse
 
10
 
 
11
    if (isempty (p1))
 
12
        if (~isempty (p2))
 
13
            p1          %#ok
 
14
            p2          %#ok
 
15
            error ('empty!') ;
 
16
        end
 
17
    elseif (any (p1 ~= p2))
 
18
        p1              %#ok
 
19
        p2              %#ok
 
20
        error ('!') ;
 
21
    end
 
22