Test whether a matrix is another one's transpose, or its own, in which case it tests symmetry.


#include "petscmat.h" 
PetscErrorCode  MatIsTranspose(Mat A,Mat B,PetscReal tol,PetscTruth *flg)
Collective on Mat

Input Parameter

A - the matrix to test
B - the matrix to test against, this can equal the first parameter

Output Parameters

flg -the result

C++ variants

PetscTruth MatIsTranspose(Mat A,Mat B)->MatIsTranspose(A,B,0,&t); return t;
PetscTruth MatIsTranspose(Mat A,Mat B,PetscReal tol)->MatIsTranspose(A,B,tol,&t); return t;


Only available for SeqAIJ/MPIAIJ matrices. The sequential algorithm has a running time of the order of the number of nonzeros; the parallel test involves parallel copies of the block-offdiagonal parts of the matrix.

See Also

MatTranspose(), MatIsSymmetric(), MatIsHermitian()

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages