public static double dot ( DoubleTuple t0 , DoubleTuple t1 ) { Utils . checkForEqualSize ( t0 , t1 ) ; double result = 0 ; for ( int i = 0 ; i < t0 . getSize ( ) ; i ++ ) { result += t0 . get ( i ) * t1 . get ( i ) ; } return result ; }
Computes the dot product of the given tuples