latex---插入三线表伪代码流程图
?
我想實現下述偽代碼算法,注意不同于三線表哦
1 三線表要記得加入這個“宏包”
粗細可調:?https://blog.csdn.net/lishoubox/article/details/7331653
\usepackage{booktabs}
表格
\begin{table}[htbp]
?\caption{\label{tab:test}示例表格} ?%標題
?\begin{tabular}{lcl} %三列,居左,中,左
? ?\toprule %第一條線
? ?a11 & a12 & a13 \\
? ?\midrule %第二條線
? ?a21 & a22 & a23 \\
? ?a31 & a32 & a33 \\
? ?\bottomrule %第三條線
?\end{tabular}
\end{table}
2 偽代碼:
宏包+算法:?https://www.cnblogs.com/52ml/p/3823802.html
多種偽代碼格式以及宏包:?https://blog.csdn.net/lwb102063/article/details/53046265
https://blog.csdn.net/lwb102063/article/details/53046265
for循環
與if條件句
\For{$i=1;i\leq N;i\leftarrow i+1$}
? ? ? \If {$i=N$}
? ? ? ? ? ? ? ? ? ? \State $middle \gets (left + right) / 2$
? ? ? ? ? ? ? ? ? ? \State $result \gets result +$ \Call{MergerSort}{$Array, left, middle$}
? ? ? ? ? ? ? ? ? ? \State $result \gets result +$ \Call{MergerSort}{$Array, middle, right$}
? ? ? ? ? ? ? ? ? ? \State $result \gets result +$ \Call{Merger}{$Array,left,middle,right$}
? ? ? \EndIf?
? ? ? \State $d^{3}, d^{4}, d^{5} = D_{d_{3}}(f_{s}^{2}), D_{d_{4}}(f_{s}^{2}), D_{d_{5}}(f_{s}^{2})$ ;
? ? ? \State $f_{s}^{2}, f_{s}^{3}, f_{s}^{4}, f_{s}^{5} = D_{f_{i}}(f_{s}^{2}, f_{s}^{3}+d^{3}, f_{s}^{4}+d^{4}, f_{s}^{5}+d^{5});$
? ? ? \State $m^{2}, m^{3}, m^{4}, m^{5} = Conv_{2}(f_{s}^{2}), Conv_{3}(f_{s}^{3}), Conv_{4}(f_{s}^{4}), Conv_{5}(f_{s}^{5});$
? ? \EndFor
宏包:前期準備
\usepackage{algorithm} \usepackage{algpseudocode} \usepackage{amsmath} \renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm \renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm?
\begin{algorithm}[htb] \caption{ Framework of ensemble learning for our system.} \label{alg:Framwork} \begin{algorithmic}[1] \Require The set of positive samples for current batch, $P_n$; The set of unlabelled samples for current batch, $U_n$; Ensemble of classifiers on former batches, $E_{n-1}$; \Ensure Ensemble of classifiers on the current batch, $E_n$; \State Extracting the set of reliable negative and/or positive samples $T_n$ from $U_n$ with help of $P_n$; \label{code:fram:extract} \State Training ensemble of classifiers $E$ on $T_n \cup P_n$, with help of data in former batches; \label{code:fram:trainbase} \State $E_n=E_{n-1}cup E$; \label{code:fram:add} \State Classifying samples in $U_n-T_n$ by $E_n$; \label{code:fram:classify} \State Deleting some weak classifiers in $E_n$ so as to keep the capacity of $E_n$; \label{code:fram:select} \\ \Return $E_n$; \end{algorithmic} \end{algorithm}?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的latex---插入三线表伪代码流程图的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 最常用的五种数据分析方法,建议收藏!
- 下一篇: 使用selenium自动化工具爬取微博内