All pastes #250248 Raw Edit

Anonymous

public text v1 · immutable
#250248 ·published 2006-11-16 19:51 UTC
rendered paste body
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;
}