alexeckert / parallelDist

R Package: Parallel Distance Matrix Computation using Multiple Threads
GNU General Public License v2.0
49 stars 9 forks source link

additional parameters in user-defined function? #2

Closed YulongNiu closed 6 years ago

YulongNiu commented 6 years ago

Hi,

Thanks for your nice parallelDist package. Is it possible to add parameters in the user-defined function? For example:

double customDist(const arma::mat &A, const arma::mat &B, arma::uword p)
alexeckert commented 6 years ago

Hi @YulongNiu, good point, currently it's not supported.

When thinking about a possible mechanism, using va_list seems a bit dirty and slow while defining custom distance classes with custom constructors comes close to extending the package. Maybe there is more user-friendly, but still performant solution between both alternatives.

YulongNiu commented 6 years ago

@alexeckert Thanks for your reply.