`
wsql
  • 浏览: 11793453 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

latex中algorithm2e包的用法示例

J# 
阅读更多
1.首先添加如下内容:
\usepackage[linesnumbered,boxed]{algorithm2e}
2.然后正文中添加如下示例:
\begin{algorithm}
\caption{identifyRowContext}
\KwIn{$r_i$ , $Backgrd(T_i)$=${T_1,T_2,\ldots,T_n}$ and similarity threshold $\theta_r$}
\KwOut{$con(r_i)$}
$con(r_i)= \Phi$\;
\For{$j=1;j \le n;j \ne i$}
{
float $maxSim=0$\;
$r^{maxSim}=null$\;

\While{not end of $T_j$}
{
compute Jaro($r_i,r_m$)($r_m \in T_j$)\;
\If{$(Jaro(r_i,r_m) \ge \theta _r) \wedge ((Jaro(r_i,r_m) \ge r^{maxSim}) $}
{
replace $r^maxSim$ with $r_m$\;

}


}
$con(r_i)=con(r_i) \cup {r^{maxSim}}$\;

}
return $con(r_i)$\;
\end{algorithm}
3.效果运行可知。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics