add test for row scalar product
test set all with function
fix row scalar product bug and add a test for it