File: isequal.m

package info (click to toggle)
suitesparse-graphblas 7.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 67,112 kB
  • sloc: ansic: 1,072,243; cpp: 8,081; sh: 512; makefile: 503; asm: 369; python: 125; awk: 10
file content (29 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function s = isequal (A, B)
%ISEQUAL True if matrices are equal and have the same type.
% s = isequal (A,B) is true of A and B have the same size, type, pattern,
% and values.  If A and B have different types, this function returns
% false.  Typecast A and B to a common type to compare their values
% (which is the behavior of the built-in isequal(A,B) function).
%
% If A is a GraphBLAS matrix with an explicit entry equal to zero, but in
% B that entry is not present, then isequal (A,B) returns false.  To drop
% them, use isequal (GrB.prune(A), GrB.prune(B)).
%
% The input matrices may be either GraphBLAS and/or built-in matrices, in
% any combination.  A and B do not have to be the same class.  For
% example, isequal (A, GrB (A)) is always true.
%
% See also isequal, GrB/eq, isequaln.

% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
% SPDX-License-Identifier: Apache-2.0

if (isobject (A))
    A = A.opaque ;
end
if (isobject (B))
    B = B.opaque ;
end

s = gbisequal (A, B) ;