Unnamed
public text v1 · immutable[code]
bool check_sym(matrix const& a, matrix const& b)
{
//compares height
if(a.size() != b.size())
return false;
//compares width of matrix 'a' against itself
for(int i=0; i<a.size()-1; i++)
{
if(a[i].size() != a[i+1].size())
return false;
}
//compares width of matrix 'b' against itself
for(int i=0; i<b.size()-1; i++)
{
if(b[i].size() != b[i+1].size())
return false;
}
//compares width of matrix 'a' to 'b'
if(a[0].size != b[0].size())
return false;
return true;
}
[/code]