MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / IsIdent

Function IsIdent

FHE/Matrix.cpp:154–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool IsIdent(const matrix& A)
155{
156 unsigned int i,j,r=A.size();
157 if (A[0].size()!=r) { throw bad_value(); }
158 for (i=0; i<r; i++)
159 { for (j=0; j<r; j++)
160 { if (i!=j && A[i][j]!=0) { return false; } }
161 if (A[i][i]!=1) { return false; }
162 }
163 return true;
164}
165
166
167void print(const matrix& S)

Callers 1

invFunction · 0.85

Calls 2

bad_valueClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected