[mlpack-git] [mlpack/mlpack] Added the discretize function. Design changes as discussed. (#703)

Tham notifications at github.com
Fri Jun 24 12:22:58 EDT 2016


> +template<typename MatType, typename CubeType>
> +void StructuredForests<MatType, CubeType>::
> +GetFeatureDimension(arma::vec& FtrDim)
> +{
> +  FtrDim = arma::vec(2);
> +
> +  const size_t shrink = this->params.Shrink();
> +  const size_t pSize = this->params.PSize();
> +  const size_t numCell = this->params.NumCell();
> +  const size_t numOrient = this->params.NumOrient();
> +  
> +  size_t nColorCh;
> +  if (this->params.RGBD() == 0)
> +    nColorCh = 3;
> +  else
> +    nColorCh = 4;

Another solution(a problem of taste, pick the one you like more :) ) : 
`const size_t nColorCh = params.RGBD() == 0 ? 3 : 4;`


---
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/703/files/0abec2cbb44a0556b129485b485bae8d07986af7#r68423267
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160624/1b4765f3/attachment.html>


More information about the mlpack-git mailing list