/* 
 * call-seq: dot(b)
 *
 * Column vector dot product
 *
 *   a.dot(b)
 *
 * +DimensionError+ is raised unless
 *
 *   a.hsize == b.hsize and
 *   b.hsize == 1 and
 *   a.vsize == b.vsize
 *
 */
VALUE rb_dmatrix_dot(VALUE self, VALUE rb)
{
    DMatrix* a ;
    DMatrix* b ;

    get_dmatrix(a, self) ;
    get_dmatrix(b, rb) ;

    if( a->hsize != 1 ||
        b->hsize != 1 ||
        a->vsize != b->vsize )
    {
        raise_dim_error() ;
    }
    
    return rb_float_new(DMatrix_dot(a, b)) ;
}