mat.cpp
// SQUARE of distance of row of this with col of other -> double
SQUARE of distance of row of this with col of other -> double
SQUARE of distance of row of this with col of other - > double
double Matrix::dist2(int r, int c, const Matrix &other) const
{
    double sum;
    assertDefined("lhs of dist2");
    other.assertDefined("rhs of dist2");
    assertOtherLhs(other, "dist2");
    sum = 0;
    for (int i=0; i<maxc; i++) {
        double tmp;
        tmp = m[r][i] - other.m[i][c];
        sum += tmp * tmp;
    }
    return sum;
}
double Matrix :: dist2 ( int r , int c , const Matrix & other ) const { double sum ; assertDefined ( " " ) ; other . assertDefined ( " " ) ; assertOtherLhs ( other , " " ) ; sum = 0 ; for ( int i = 0 ; i < maxc ; i ++ ) { double tmp ; tmp = m [ r ] [ i ] - other . m [ i ] [ c ] ; sum += tmp * tmp ; } return sum ; }
SQUARE of distance of row of this with col of other -> double
SQUARE of distance of row of this with col of other - > double