根据算法删除空格

根据算法删除空格

我想删除算法下的空白处(红色突出显示)。以下是代码

\documentclass[conference]{IEEEtran}
\usepackage{etex}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{booktabs}

\begin{document}    

\section {HHHHHHHHHHHH}
It is a neighborhood in the central region of Los Angeles, California. This 
ethnically diverse, densely populated neighborhood is notable as the home of 
the U.S. film industry, including several of its historic studios, and its 
name has come to be a shorthand reference for the industry and the people in 
it.

Daeida Wilcox may have learned of the name Hollywood from Alex Best, her 
neighbor in Holly Canyon (now Lake Hollywood) and a prominent investor and 
friend of Whitley's.[9][10] She recommended the same name to her husband, 
Harvey. H. Wilcox. In August 1887, Wilcox filed with the Los Angeles County 
Recorder's office a deed and parcel map of property he had sold named 
"Hollywood, California." Wilcox wanted to be the first to record it on a 
deed. The early real-estate boom busted that same year, yet Hollywood began 
its slow growth.

By 1900, the region had a post office, newspaper, hotel, and two markets. 
Los Angeles, with a population of 102,479 lay 10 miles (16 km) east through 
the vineyards, barley fields, and citrus groves. A single-track streetcar 
line ran down the middle of Prospect Avenue from it, but service was 
infrequent and the trip took two hours. The old citrus fruit-packing house 
was converted into a livery stable, improving transportation for the 
inhabitants of Hollywood.

\subsection{LLLLLLLLL}
The Hollywood Hotel was opened in 1902 by H. J. Whitley who was a president 
of the Los Pacific Boulevard and Development Company. Having finally 
acquired the Hurd ranch and subdivided it, Whitley built the hotel to 
attract land buyers. Flanking the west side of Highland Avenue, the 
structure fronted on Prospect Avenue, which, still a dusty, unpaved road, 
was regularly graded and graveled. The hotel was to become internationally 
known and was the center of the civic and social life and home of the stars 
for many years.

\begin{table}
\centering
\label{Table 1}
\caption{Nomenclature used in algorithms and functions}
\begin{tabular}{@{}ll@{}}
    \toprule
    Notation & Explanation             \\ \midrule
    $B$          & busted that same year    \\
    $T$          & neighbor in Holly Canyon     \\
    $t_j$        & $j_{th}$            \\
    $l_j$        & neighbor in Holly Canyon  \\
    $l_{max}$    & neighbor in Holly Canyon \\
    $R$          & neighbor in Holly Canyon  \\
    $R_{sorted}$ & neighbor in Holly Canyon  \\
    $r_i$        & $i_{th}$            \\
    %   $\lambda$ & Set of Hazard Rates for each node in $R$\\              
    $\lambda_i$  & neighbor in Holly Canyon  $i_{th}$ \\
    $P_i$        & neighbor in Holly Canyon $i_{th}$ \\     
    $MTBF_i$     & neighbor in Holly Canyon  $i_{th}$ \\    
    \bottomrule
   \end{tabular}    
\end{table} 

\algblockdefx[Foreach]{Foreach}{EndForeach}[1]{\textbf{for all} #1 
\textbf{do}}{\textbf{end for}}
% New definitions
\algnewcommand\algorithmicswitch{\textbf{switch}}
\algnewcommand\algorithmiccase{\textbf{case}}
\algnewcommand\algorithmicassert{\texttt{assert}}
\algnewcommand\Assert[1]{\State \algorithmicassert(#1)}%
% New "environments"
\algdef{SE}[SWITCH]{Switch}{EndSwitch}[1]{\algorithmicswitch\ #1\ 
\algorithmicdo}{\algorithmicend\ \algorithmicswitch}%
\algdef{SE}[CASE]{Case}{EndCase}[1]{\algorithmiccase\ #1}{\algorithmicend\ 
\algorithmiccase}%
\algdef{SE}[DEFAULT]{Default}{EndDefault}[1]{\algorithmicdefault\ #1}
{\algorithmicdefault\ \algorithmicdefault}%
\algtext*{EndSwitch}%
\algtext*{EndCase}%
\algtext*{EndDefault}%
%\algrenewcommand\algorithmicindent{.75em}%
\makeatletter
\setlength{\@fptop}{0pt}
\setlength{\@fpbot}{0pt plus 1fil}
\makeatother

\begin{algorithm}
\caption{jljdslkjoi djklfjdfkljdfid dfkdjfkdjf}
\begin{algorithmic}[1]  
    \State \textbf{Input: }         
    \State \textbf{Output: }    
    \If{($nbnbn == wwww$)} 
    \State $R_{xxx}$ $\gets$xyz(R)
    \ElsIf{($Policy == ccccD$)}
    \State $R_{cccc}$ $\gets$xyz(R)
    \ElsIf{($bbbb == xxxxxx$)}
    \State $R_{xxxxx}$ $\gets$xyz(R)
    \Else
    \Statex{\textit{//cvcvcvcv}}
    \EndIf              
    \Foreach{$b \in B$}
    \Foreach{ $j \in T$}        
    \State $ff_j$ = $t_j$.ccccc()           
    \State $V$ $\gets$ $ccc_j$
    \Statex{\textit{// cvcvcvcvcvcvcvcvc}}  
    \State $u_j$ = $l_dfdf$/$l_{kkk}$ 
    \State $U$ $\gets$ $u_j$        
    \EndForeach     
    \Statex{\textit{// vcvcvcvcvcvcv}}  
    \Foreach{ $j \in V$ }
    \State $dfd$ $\gets$ $mm_j$.hhhhhhhhhhhh()
    \EndForeach     
    \Foreach{$j \in V$}
    \State $ddff_{nnn_{j}}$  $\gets$  $ccccc_j.mmmmmm()$
    \Foreach{$i \in R_{dfdfsffdfdfdf}$} 
    \If{(($rrrrr_i$ $\geq$ $bbbb_{ccccccc_{j}}$) \&\& ($S_i$ $\neq$ 
$dfdfdf$))}
    \State $ggggg_i$ $\gets$ $kkkk_j$.iiiiiii()     
    \State $ll_i = lll_i - VM_{lllllll_{j}} $   
    \Statex{\textit{// Cfgsfdgffgfgfgdfg 5}}                    
    \State $jjjj_{ij}$ $\gets$ $jjjj_j$.vvfdgrtrtrtrt()
    \Statex{\textit{// ghghghghgh}}     
    \Statex{\textit{hghghghgh}} 
    \State $jjjj_{ij}$ $\gets$ $vm_j$.efdgfghfghghghgh()            
    \If{($ggggg_i == 0$)}
    \State $jjjj_{ghghhghghg} = gggg_{ghghhghg} - gggg_{fghgfhghgh_i}$
    \EndIf 
    \State break
    \EndIf  
    \EndForeach         
    \EndForeach
    \EndForeach     
 \end{algorithmic}  
\end{algorithm}

\algblockdefx[Foreach]{Foreach}{EndForeach}[1]{\textbf{for all} #1 
\textbf{do}}{\textbf{end for}}
%\algrenewcommand\algorithmicindent{.75em}%
\algdef{SE}[FUNCTION]{Function}{EndFunction}%
[2]{\algorithmicfunction\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}}%
{\algorithmicend\ \algorithmicfunction}%
\newfloat{function}{htbp}{loa}
\floatname{function}{Function}

   \begin{function}
    \begin{algorithmic}[1]

    \Statex{\textbf{function} \scshape{jkjdkfjdkf}($R$)}        
    \Statex{\textit{// dfhjkshdfjksdhjkfhjkhdfjkf3}}
    \Foreach{$i \in R$}
    \State $hhhh_i$ $\gets$ $r_i$.vvfdgrtrtrtrt()       
    \EndForeach
    \Foreach{ $i \in R$ }
    \State $R_{hhhh}$ $\gets$ $hhh_i$.vvfdgrtrtrtrt()
    \EndForeach     
    \State\Return $R_{fghfgfgfg}$
    \Statex{\textbf{end function}} 
    %  \EndFunction 
\end{algorithmic}
\caption{fjdkjfdkfjkdjfkdjfkdf} 
\end{function}

\subsection{D}

Whitley's company developed and sold one of the early residential areas, the 
Ocean View Tract.[12] Whitley did much to promote the area. He paid 
thousands of dollars for electric lighting, including bringing electricity 
and building a bank, as well as a road into the Cahuenga Pass. The lighting 
ran for several blocks down Prospect Avenue. Whitley's land was centered on 
Highland Avenue.[13][14] His 1918 development, Whitley Heights, was named 
for him.[![Algorithm][1]][1]
 \end{document}

算法

相关内容