本文整理汇总了C++中Cylinder::getrT方法的典型用法代码示例。如果您正苦于以下问题:C++ Cylinder::getrT方法的具体用法?C++ Cylinder::getrT怎么用?C++ Cylinder::getrT使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cylinder
的用法示例。
在下文中一共展示了Cylinder::getrT方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rho_tun
float MCC::rho_tun(Cylinder const & t_a, Cylinder const & t_b, Cylinder const & k_a, Cylinder const & k_b)
{
float d1, d2, d3;
d1 = fabs(t_a.ds(k_a.getX(),k_a.getY()) - t_b.ds(k_b.getX(),k_b.getY()))/(t_a.ds(k_a.getX(),k_a.getY()) + t_b.ds(k_b.getX(),k_b.getY()));
d2 = fabs(t_a.dFi(t_a.dFi(t_a.getrT(),k_a.getrT()),t_b.dFi(t_b.getrT(),k_b.getrT())));
d3 = fabs(t_a.dFi(dR(t_a,k_a),dR(t_b,k_b)));
return Cylinder::psi(d1,MUP1,TAUP1)*Cylinder::psi(d2,MUP2,TAUP2)*Cylinder::psi(d3,MUP3,TAUP3);
}
示例2: nhs
float Cylinder::nhs(const Cylinder &c) const
{
int hamming = 0;
const float P = 30;
if (abs(dFi(getrT(),c.getrT())) > 0.785398163397 || dss(c.getX(), c.getY()) > DELTAXY*DELTAXY)
return 0;
for(unsigned int i = 0; i < NUMCELLS; ++i)
if (getB1(i) != c.getB1(i))
hamming++;
return pow(1.0-((float)hamming)/NUMCELLS, P);
}
示例3: similarity
float Cylinder::similarity(const Cylinder & c) const
{
unsigned int count = 0;
float norma_b = 0, normb_a = 0, norm_diff = 0;
float ca_b, cb_a;
if (abs(dFi(getrT(),c.getrT())) > DELTAZETA)
return 0;
if (bit == false)
{
for (unsigned int i=0; i<NUMCELLS; i++)
{
ca_b = cmVector[i];
cb_a = c.getCM(i);
if (ca_b>=0 && cb_a>=0)
{
count++;
norma_b += ca_b*ca_b;
normb_a += cb_a*cb_a;
norm_diff += ca_b*cb_a;
}
}
//Check if two cylinders are matchable
if(count >= MINCELLS)
{
norm_diff = sqrt(norma_b + normb_a - 2.0*norm_diff);
return 1.0 - (norm_diff/(sqrt(norma_b)+sqrt(normb_a)));
}
else
return 0;
}
else
{
int counta_b = 0, countb_a = 0, count_diff = 0;
for (unsigned int i=0; i<cmBit1.size(); ++i)
if (getB2(i) && c.getB2(i))
{
count++;
if (getB1(i))
{
counta_b++;
if(!c.getB1(i))
count_diff++;
}
if (c.getB1(i))
{
countb_a++;
if(!getB1(i))
count_diff++;
}
}
//Check if two cylinders are matchable
if (count >= MINCELLS)
return (1 - (sqrt(count_diff)/(sqrt(counta_b)+sqrt(countb_a))));
else
return 0;
}
}