Como posso adicionar comentários com o pacote `algorithm2e`?

Como posso adicionar comentários com o pacote `algorithm2e`?

Estou usando algorithm2eo pacote para escrever um algoritmo e estou tentando adicionar as linhas 3 e 4 no código da captura de tela como comentário, \tcc{}mas sem seccuss. Como posso adicionar comentários ao algorithm2epacote?

insira a descrição da imagem aqui

Código:

\documentclass{article}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e} 
\renewcommand{\baselinestretch}{1.5}
\usepackage{amsmath}

\begin{document}
\begin{algorithm}[H]
\SetAlgoLined
\KwData{2 graphs  $T$ and $\acute{T}$ with nodes V and $\acute{V}$.}
\KwResult{Find whether $T$ and $\acute{T}$ are isomorph.}

function($T$, $\acute{T}$) \\
 \Indp covert $T$ to $P_v$ and $\acute{T}$ to $\acute{P_v}$ ;\\
 $d=deg(P_T) \leq h(T)$ and $S=\{1,2,3,\dots,2h(T)\}$; \\
  $\acute{d} =deg(\acute{P_T}) \leq h(\acute{T})$ and $\acute{S}=\{1,2,3,\dots,2h(\acute{T})\}$; \\

 \eIf{$Pr[P_v = \acute{P_v}] = \frac{d}{S}=\frac{h(T)}{2h(T)} ==\frac{1}{2}$}{
    return true;
    }{
    return false;}

\end{algorithm}
\end{document}

Responder1

Eu simplesmente tentei

\tcc{$d=deg(P_T) \leq h(T)$ and $S=\{1,2,3,\dots,2h(T)\}$}
\tcc{$\acute{d} =deg(\acute{P_T}) \leq h(\acute{T})$ and $\acute{S}=\{1,2,3,\dots,2h(\acute{T})\}$}

e funcionou sem problemas. Basta ter cuidado para remover ; \\do final da linha.

informação relacionada