开发者

Display semi-pseudo code in LaTeX

开发者 https://www.devze.com 2023-02-13 00:43 出处:网络
How do I type this within LaTeX using lstlisting, or perhaps some other formatting package? E_{T}= \\phi ;

How do I type this within LaTeX using lstlisting, or perhaps some other formatting package?

E_{T}= \phi ;
sort the edges by their weight, $w(e_1) \le w(e_2) \le \dots \le w(e_m))$;
for (i = 1; i \le m; i = i+1) {
  if ($T+e_i$ contains no cycles) {
    E_T =E_T+ e_i;
  }
}开发者_开发知识库


Since it looks like pseudo-code, I recommend the algorithmicx package.

0

精彩评论

暂无评论...
验证码 换一张
取 消