Move Dot from SGVector to CMath

I have checked the build and unit-tests. They are running fine. Not able to test all the examples though. There is some problem with Ubuntu so I'm not able to install anything.
Yeah i understand the cmake problem. Should we introduce HAVE_LINAG_LIB
which would only make the native impementation visible. But then we would
only have dot and a couple of other functions only as it is not possible to
implement everything natively as you mentioned.

In src/shogun/classifier/svm/NewtonSVM.cpp
<https://github.com/shogun-toolbox/shogun/pull/2630#discussion-diff-21786757>
:

> @@ -290,7 +290,7 @@ void CNewtonSVM::line_search_linear(float64_t* weights, float64_t* d, float64_t*
>
>  		memset(temp1, 0, sizeof(float64_t)*sv_len);
>  		SGVector<float64_t>::vector_multiply(temp1, outzsv, Ysv, sv_len);
> -		tempg=SGVector<float64_t>::dot(temp1, Xsv, sv_len);

@sanuj <https://github.com/sanuj> SGVector has vlen within it. So that's
fine. What I'm worried about is that presently we don't have HAVE_LINALG_LIB
macro defined if none of the external linalg backend is found. And all the
stuff inside linalg works only if the macro is defined. So no matter what
native implementation is added to linalg, with present cmake setting it
won't be visible if external linalg libs are not found. See the problem?

I didn't get the non-vectors part. dot is only for vectors, right?

—
Reply to this email directly or view it on GitHub
<https://github.com/shogun-toolbox/shogun/pull/2630/files#r21786757>.