assign3/mat.cpp
// assert other is the same size
// assert other can be lhs of mult op
assert other is the same size
assert other can be lhs of mult op
assert other is the same size assert other can be lhs of mult op
void Matrix::assertOtherLhs(const Matrix &other, std::string msg) const
{
    if (maxc!=other.maxr) {
        printf("ERROR(%s): Dimensions do not match: self \"%s\": %d X %d other \"%s\": %d X %d\n", msg.c_str(), name.c_str(), maxr, maxc, other.name.c_str(), other.maxr, other.maxc);
        exit(1);
    }
}
void Matrix :: assertOtherLhs ( const Matrix & other , std :: string msg ) const { if ( maxc != other . maxr ) { printf ( " \" \" \" \" \n " , msg . c_str ( ) , name . c_str ( ) , maxr , maxc , other . name . c_str ( ) , other . maxr , other . maxc ) ; exit ( 1 ) ; } }
assert other is the same size
assert other can be lhs of mult op
assert other is the same size assert other can be lhs of mult op