I am using algorithm2e
. These are my declarations:
\usepackage{cvpr}
\usepackage{times}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
% For tables
\usepackage{tabu}
%\usepackage{caption} %\captionsetup[table]{skip=10pt}
\bibliographystyle{unsrtnat}
\usepackage[numbers,sort&compress]{natbib}
\usepackage[linesnumbered,boxed]{algorithm2e}
\usepackage{algpseudocode}
% Include other packages here, before hyperref.
% If you comment hyperref and then uncomment it, you should delete
% egpaper.aux before re-running latex. (Or just hit 'q' on the first latex
% run, let it finish, and you should be clear).
\usepackage[breaklinks=true,bookmarks=false]{hyperref}
This is my code. Why are some of the texts italicized and some are not ? What is the function to make a text italicized and to not make it italicized ?
\begin{algorithm}
\SetKwInOut{Input}{Input}
\SetKwInOut{Output}{Output}
\Input{a graph G = (V,E)}
\Output{a hierarchical tree}
\BlankLine
Initialize edge weights\\
\ForEach{\normalfont{vertex} V_i \subset V } % why is V_i italic but V not ?
{
j \leftarrow \text{argmin}_k(\text{cost}(V_i, V_k)), \ k \subset \text{neighbors} \ \text{of} \ i \\
E_{ij} \leftarrow E_{ij} + 1 \\
}
\BlankLine
\ForEach{\normalfont{edge} E_{ij} \subset E }
{
E_{ij} \leftarrow argmin(E_{ij} \normalfont{.weight}), \ j \subset N ) \\
E_{ij} \leftarrow E_{ij} + 1 \\
}
\end{algorithm}