[mlpack-git] [mlpack] Error Compiling Lars.cpp on Windows (#424)

Joseph Mariadassou notifications at github.com
Sat Mar 21 01:12:06 EDT 2015


Using Visual Studio 2013 Release x64
In this function
void LARS::GivensRotate(const arma::vec::fixed<2>& x,
                        arma::vec::fixed<2>& rotatedX,
                        arma::mat& matG)
{
  if (x(1) == 0)  /////////////////////////////compiler error/////////////////////

The compiler error is (could be an issue with armadillo);
-------------------------------------------------------------------------------------------------------------------------
1>C:\Projects\CPP\mlpack\mlpack-1.0.12\src\mlpack\methods\lars\lars.cpp(431): error C3066: there are multiple ways that an object of this type can be called with these arguments
1>          c:\projects\include\armadillo_bits/Col_bones.hpp(198): could be 'const arma::subview_col<eT> arma::Col<eT>::operator ()(const arma::span &) const'
1>          with
1>          [
1>              eT=double
1>          ]
1>          c:\projects\include\armadillo_bits/Col_bones.hpp(198): or       'arma::subview_col<eT> arma::Col<eT>::operator ()(const arma::span &)'
1>          with
1>          [
1>              eT=double
1>          ]
1>          c:\projects\include\armadillo_bits/Col_bones.hpp(198): or       'double &arma::Mat<double>::operator ()(const arma::uword)'
1>          c:\projects\include\armadillo_bits/Col_bones.hpp(198): or       'const double &arma::Mat<double>::operator ()(const arma::uword) const'
1>          c:\projects\include\armadillo_bits/Col_bones.hpp(221): or       'double &arma::Col<double>::fixed<0x02>::operator ()(const arma::uword)'
1>          c:\projects\include\armadillo_bits/Col_bones.hpp(222): or       'const double &arma::Col<double>::fixed<0x02>::operator ()(const arma::uword) const'
1>          while trying to match the argument list '(int)'
---------------------------------------------------------------------------

The work around is
if (x[1] == 0)



---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150320/c9e30d84/attachment-0001.html>


More information about the mlpack-git mailing list