[mlpack-git] [mlpack/mlpack] backported ind2sub and sub2ind. (#683)
stereomatchingkiss
notifications at github.com
Thu Jun 9 10:52:56 EDT 2016
> + }
> + return input_data;
> +}
> +
> +template<typename MatType, typename CubeType>
> +arma::vec StructuredForests<MatType, CubeType>::
> +GetFeatureDimension()
> +{
> + /*
> + shrink: amount to shrink channels
> + p_size: size of image patches
> + n_cell: number of self similarity cells
> + n_orient: number of orientations per gradient scale
> + */
> + arma::vec P(2);
> + int shrink, p_size, n_cell;
Same, could you use size_t and const at here. The new thing is, we could apply lazy evaluation at here.Rather than declare your parameters as
`int shrink, p_size, n_cell;`
you can
const size_t shrink = options["shrink"];
const size_t p_size = options["p_size"];
const size_t n_cell = options["n_cell"];
---
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/683/files/9d85b64c6c6bdff608331195351d09abf56cfc96#r66456126
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160609/007554fa/attachment.html>
More information about the mlpack-git
mailing list