Scalar product between two arrays, could potentially be replaced by std::inner_prod.
References rank().
This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.