[mlpack-git] [mlpack/mlpack] edge_boxes: feature extraction updated, tests added (#696)

Marcus Edel notifications at github.com
Tue Jun 14 19:04:31 EDT 2016


> +
> +//just a helper function, can't use it for anything else
> +//finds max numbers on cube axis and returns max values,
> +// also stores the locations of max values in Location
> +template<typename MatType, typename CubeType>
> +MatType StructuredForests<MatType, CubeType>::
> +MaxAndLoc(CubeType &mag, arma::umat &Location) const
> +{
> +  /*Vectorize this function after prototype works*/
> +  MatType MaxVal(Location.n_rows, Location.n_cols);
> +  for(size_t i = 0; i < mag.n_rows; ++i)
> +  {
> +    for(size_t j = 0; j < mag.n_cols; ++j)
> +    {
> +      /*can use -infinity here*/
> +      double max =  std::numeric_limits<double>::min();

``std::numeric_limits<double>::min()`` is ``DBL_MIN``: ``DBL_MIN`` returns the minimum positive normalized value, I guess what you like is: ``-DBL_MAX``?



---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67073948
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160614/6b15a6a0/attachment.html>


More information about the mlpack-git mailing list