Dot

Added dot function for sparse matrix.
Why are you using structured_dot_grad in one case and structured_dot in the other.  What is different between those two cases.