choose_parameters.m

来自「RankNGG 算法实现. 含有dll文件。源码为matlab」· M 代码 · 共 44 行

M
44
字号
function [rx,r,h,p,n]=choose_parameters(epsil)
% Choose the parameters for fast erfc summation.
%
%% Input
%
% * epsil ... the accuracy parameter for the fast approximate computation of erfc functions 
%
%% Ouput
%
% * rx ... the interval length
% * r ... the cutoff radius
% * h ... the series parameter
% * p ... the truncation number
% * n ... number of influential clusters
%
%% Signature
%
% Author: Vikas Chandrakant Raykar
% E-Mail: vikas@cs.umd.edu
% Date: September 27, 2006
%
%% See also
%
%  FastErfcSummation

erfc_inv=feval(maple('erfcinv'),epsil);
erfc_inv_half=feval(maple('erfcinv'),epsil/2);

rx=0.1*erfc_inv;
r=erfc_inv+(2*rx);

num_of_influential_clusters=2*round(floor(r/rx)/2)-1;
rx=r/num_of_influential_clusters;
n=(num_of_influential_clusters-1)/2;

r=erfc_inv+(2*rx);
h=pi/(3*(erfc_inv_half+r));
p=ceil(feval(maple('erfcinv'),sqrt(pi)*h*epsil/4)/(2*h));





⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?