diff --git a/Latex/design pattern/0.jpg b/Latex/design pattern/0.jpg new file mode 100644 index 0000000..a95fee6 Binary files /dev/null and b/Latex/design pattern/0.jpg differ diff --git a/Latex/design pattern/bjtu-thesis-master/.gitignore b/Latex/design pattern/bjtu-thesis-master/.gitignore new file mode 100644 index 0000000..cefc767 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/.gitignore @@ -0,0 +1,27 @@ +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +*.log +*.aux +*.synctex.gz +*.out +*.toc diff --git a/Latex/design pattern/bjtu-thesis-master/0.png b/Latex/design pattern/bjtu-thesis-master/0.png new file mode 100644 index 0000000..7b968d3 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/0.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/1.png b/Latex/design pattern/bjtu-thesis-master/1.png new file mode 100644 index 0000000..3b18b3b Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/1.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/10.png b/Latex/design pattern/bjtu-thesis-master/10.png new file mode 100644 index 0000000..bf988a0 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/10.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/11.png b/Latex/design pattern/bjtu-thesis-master/11.png new file mode 100644 index 0000000..6e09561 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/11.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/12.png b/Latex/design pattern/bjtu-thesis-master/12.png new file mode 100644 index 0000000..2bd16f3 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/12.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/13.png b/Latex/design pattern/bjtu-thesis-master/13.png new file mode 100644 index 0000000..7a3563e Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/13.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/14.png b/Latex/design pattern/bjtu-thesis-master/14.png new file mode 100644 index 0000000..52710d4 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/14.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/15.png b/Latex/design pattern/bjtu-thesis-master/15.png new file mode 100644 index 0000000..610090f Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/15.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/16.png b/Latex/design pattern/bjtu-thesis-master/16.png new file mode 100644 index 0000000..c0cd3ff Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/16.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/17.png b/Latex/design pattern/bjtu-thesis-master/17.png new file mode 100644 index 0000000..dea783a Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/17.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/18.png b/Latex/design pattern/bjtu-thesis-master/18.png new file mode 100644 index 0000000..fbd524e Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/18.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/19.png b/Latex/design pattern/bjtu-thesis-master/19.png new file mode 100644 index 0000000..bee52fb Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/19.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/2.png b/Latex/design pattern/bjtu-thesis-master/2.png new file mode 100644 index 0000000..fd2d737 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/2.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/20.png b/Latex/design pattern/bjtu-thesis-master/20.png new file mode 100644 index 0000000..da835dc Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/20.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/21.png b/Latex/design pattern/bjtu-thesis-master/21.png new file mode 100644 index 0000000..7e08ca0 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/21.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/22.png b/Latex/design pattern/bjtu-thesis-master/22.png new file mode 100644 index 0000000..24d304d Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/22.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/3.png b/Latex/design pattern/bjtu-thesis-master/3.png new file mode 100644 index 0000000..2b1f633 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/3.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/4.png b/Latex/design pattern/bjtu-thesis-master/4.png new file mode 100644 index 0000000..8366e6d Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/4.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/5.png b/Latex/design pattern/bjtu-thesis-master/5.png new file mode 100644 index 0000000..81e07ac Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/5.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/6.png b/Latex/design pattern/bjtu-thesis-master/6.png new file mode 100644 index 0000000..3129d31 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/6.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/7.png b/Latex/design pattern/bjtu-thesis-master/7.png new file mode 100644 index 0000000..ff667f7 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/7.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/8.png b/Latex/design pattern/bjtu-thesis-master/8.png new file mode 100644 index 0000000..95bf279 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/8.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/9.png b/Latex/design pattern/bjtu-thesis-master/9.png new file mode 100644 index 0000000..779423f Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/9.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/BJTU-thesis.cls b/Latex/design pattern/bjtu-thesis-master/BJTU-thesis.cls new file mode 100644 index 0000000..e6b9b97 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/BJTU-thesis.cls @@ -0,0 +1,460 @@ +%=================================================== + +%=================================================== + +%导入需要的宏包 +\RequirePackage{amsmath,amsthm,amsfonts,amssymb,bm,mathrsfs,upgreek} +\RequirePackage{fancyhdr} +\RequirePackage{lastpage} + + + +%依赖的Latex版本 +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +%声明本文档为模板类 +\ProvidesClass{BJTU-thesis}[2018/4/27] + + +%根据用户选项LoadClass +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}} +\newif\if@isEnMaster\@isEnMasterfalse +\newif\if@isAcMaster\@isAcMasterfalse +\newif\if@isDoctor\@isDoctorfalse +\newif\if@isTwoSide\@isTwoSidefalse +%专硕 +\DeclareOption{EnMaster}{\@isEnMastertrue} +%学硕 +\DeclareOption{AcMaster}{\@isAcMastertrue} +%博士 +\DeclareOption{Doctor}{\@isDoctortrue} +\DeclareOption{twoside}{\@isTwoSidetrue} +\ProcessOptions\relax +\if@isTwoSide +\LoadClass[zihao=-4,a4paper,twoside,openright,UTF8,space=auto]{ctexbook} +\else +\LoadClass[zihao=-4,a4paper,oneside,openright,UTF8,space=auto]{ctexbook} +\fi + + + +%定义使用者需要填写的标签 +\def\BJTU@label@schoolNumber{学校代码:~} +\def\BJTU@label@classification{密级:~} +\def\BJTU@label@author{作者姓名:~} +\def\BJTU@label@studentNumber{学~~~~~~号:~} +\def\BJTU@label@advisor{导师姓名:~} +\def\BJTU@label@advisorTitle{职~~~~~~称:~} +\def\BJTU@label@engineeringMasterField{工程硕士专业领域:~} +\def\BJTU@label@degreeLevel{学位级别:~} +\def\BJTU@label@degreeType{学位类别:~} +\def\BJTU@label@major{学科专业:~} +\def\BJTU@label@researchArea{研究方向:~} +\def\BJTU@label@comment{\dag~同等贡献} + +%定义上述标签的默认值 +\def\BJTU@value@schoolNumber{10004} +\def\BJTU@value@classification{公开} +\def\BJTU@value@authora{XXXX} +\def\BJTU@value@authorb{XXXX} +\def\BJTU@value@authorc{XXXX} +\def\BJTU@value@authord{XXXX} +\def\BJTU@value@authorf{XXXX} +\def\BJTU@value@studentNumber{XXXX} +\def\BJTU@value@advisor{XXXX} +\def\BJTU@value@advisorTitle{XXXX} +\def\BJTU@value@engineeringMasterField{XXXX} +\if@isDoctor +\def\BJTU@value@degreeLevel{博士} +\else +\def\BJTU@value@degreeLevel{硕士} +\fi +\def\BJTU@value@degreeType{XXXX} +\def\BJTU@value@major{XXXX} +\def\BJTU@value@researchArea{XXXX} +\def\BJTU@value@title{中文题目} +\def\BJTU@value@englishtitle{英文题目} +\def\BJTU@value@comment{\dag~同等贡献} + +%定义用户填写上述标签对应值的命令,需要用户在主文档自行调用 +\newcommand\schooNumber[1]{\def\BJTU@value@schoolNumber{#1}} +\newcommand\classification[1]{\def\BJTU@value@classification{#1}} +\newcommand\authora[1]{\def\BJTU@value@authora{#1}} +\newcommand\authorb[1]{\def\BJTU@value@authorb{#1}} +\newcommand\authorc[1]{\def\BJTU@value@authorc{#1}} +\newcommand\authord[1]{\def\BJTU@value@authord{#1}} +\newcommand\authorf[1]{\def\BJTU@value@authorf{#1}} +\newcommand\studentNumber[1]{\def\BJTU@value@studentNumber{#1}} +\newcommand\advisor[1]{\def\BJTU@value@advisor{#1}} +\newcommand\advisorTitle[1]{\def\BJTU@value@advisorTitle{#1}} +\newcommand\engineeringMasterField[1]{\def\BJTU@value@engineeringMasterField{#1}} +\newcommand\degreeType[1]{\def\BJTU@value@degreeType{#1}} +\newcommand\major[1]{\def\BJTU@value@major{#1}} +\newcommand\researchArea[1]{\def\BJTU@value@researchArea{#1}} +\newcommand\englishtitle[1]{\def\BJTU@value@englishtitle{#1}} +\renewcommand\title[1]{\def\BJTU@value@title{#1}} +\newcommand\comment[1]{\def\BJTU@value@comment{#1}} + + +%版权授权书 +\newcommand{\makeAuthorization}{ + \chapter*{学位论文版权使用授权书} + \thispagestyle{empty} + 本学位论文作者完全了解北京交通大学有关保留、使用学位论文的规定。特授权北京交通大学可以将学位论文的全部或部分内容编入有关数据库进行检索,提供阅览服务,并采用影印、缩印或扫描等复制手段保存、汇编以供查阅和借阅。同意学校向国家有关部门或机构送交论文的复印件和磁盘。学校可以为存在馆际合作关系的兄弟高校用户提供文献传递服务和交换服务。 + + (保密的学位论文在解密后适用本授权说明) + + \vspace{72pt} + 学位论文作者签名:~~~~~~~~~~~~~~~~~~~~~~~导师签名: + + \vspace{12pt} + 签字日期:~~~~~~年~~~月~~~日~~~~~~~~~~~~~~签字日期:~~~~~年~~~月~~~日 +} + + +%制作内封 +\newcommand{\makeInfo}{ + \newpage + \pagenumbering{roman} + \thispagestyle{plain} + {\songti\zihao{5}\noindent\BJTU@label@schoolNumber\BJTU@value@schoolNumber} + \hfill + {\songti\zihao{5}\BJTU@label@classification\BJTU@value@classification} + %这里控制上下间距 + \vspace{31.5pt} + \begin{center} + {\kaishu\zihao{0}北~京~交~通~大~学\\} + %这里控制上下间距 + %\if@isDoctor + %{\songti\zihao{2}软件构思综合训练\\} + %\else + %{\songti\zihao{2}软件构思综合训练\\} + %\fi + %这里控制上下间距 + \vspace{44pt} + {\songti\zihao{-3}\BJTU@value@title\\} + %这里控制上下间距 + \vspace{15pt} + {\songti\zihao{-3}\BJTU@value@englishtitle\\} + \end{center} + %这里控制上下间距 + \vspace{48pt} + {\songti\zihao{4} + \begin{tabular}{lp{30mm}l} + \BJTU@label@author \BJTU@value@author& &\BJTU@label@studentNumber \BJTU@value@studentNumber \\ + \\ + \BJTU@label@advisor \BJTU@value@advisor& &\BJTU@label@advisorTitle \BJTU@value@advisorTitle \\ + \\ + \if@isEnMaster + \BJTU@label@engineeringMasterField \BJTU@value@engineeringMasterField& &\BJTU@label@degreeLevel \BJTU@value@degreeLevel \\ + \else + \BJTU@label@degreeType \BJTU@value@degreeType& &\BJTU@label@degreeLevel \BJTU@value@degreeLevel \\ + \\ + \BJTU@label@major \BJTU@value@major& &\BJTU@label@researchArea \BJTU@value@researchArea \\ + \fi + \end{tabular} + } + \vfill + \begin{center} + {\songti\zihao{4}\textbf{北京交通大学}软件学院\\ \vspace{10pt}2018年4月} + \end{center} +} + + +%重新定义致谢环境 +\renewenvironment{thanks}{ + \chapter*{致谢}\thispagestyle{plain} +}{} + + + +%定义中文摘要环境 +%%页眉部分加章标题的问题尚未解决 +\newenvironment{abstract}{ + \chapter*{摘要} + \markboth{摘要}{摘要} + \addcontentsline{toc}{chapter}{摘要} +}{} + +%定义英文摘要环境 +\newenvironment{englishabstract}{ + \chapter*{ABSTRACT} + \markboth{ABSTRACT}{ABSTRACT} + \addcontentsline{toc}{chapter}{ABSTRACT} +}{} + +%定义中英文关键词命令 +\newcommand{\keywords}[1]{\textbf{关键词:}#1} +\newcommand{\englishkeywords}[1]{\textbf{KEYWORDS:~}#1} + + + +%%定义正文的页眉页脚格式 +\def\BJTU@chapter{} +\fancypagestyle{BJTU@heading}{ + \fancyhf{} + \fancyhead[L]{ + \if@isDoctor + 结构光三维重建软件设计模式分析 + \else + 结构光三维重建软件设计模式分析 + \fi + } + \fancyhead[R]{\leftmark} + \fancyfoot[C]{\thepage} +} + + + +%%设置页边距和装订线 +\usepackage[ +top=3.5cm, +bottom=2.5cm, +left=1.5cm, +right=2.5cm, +bindingoffset=1cm, +headheight=15pt +]{geometry} + +%% 设置章节格式 +\ctexset{chapter={ + name={}, + number = {\arabic{chapter}}, + format = {\heiti \centering \zihao{3}}, + pagestyle = {BJTU@heading}, + beforeskip = 28bp, + afterskip = 20bp, + fixskip = true, + } +} + +%% 设置一级章节格式 +\ctexset{section={ + format={\raggedright \bfseries \sffamily \zihao{4}}, + beforeskip = 28bp plus 1ex minus .2ex, + afterskip = 24bp plus .2ex, + fixskip = true, + } +} + +% 设置二级标题格式 + +%黑体小四加粗顶左,单倍行距,序号与题目间空一个汉字符 + +\ctexset{subsection={ + format = {\bfseries \sffamily \raggedright \zihao{-4}}, + beforeskip =28bp plus 1ex minus .2ex, + afterskip = 24bp plus .2ex, + fixskip = true, + } +} + +% 设置三节标题格式:黑体小四居左书写,单倍行距,序号与题目间空一个汉字符 + +\ctexset{subsubsection={ + format={\heiti \raggedright \zihao{-4}}, + beforeskip=28bp plus 1ex minus .2ex, + afterskip=24bp plus .2ex, + fixskip=true, + } +} + + +%目录 +\ifxetex % xelatex +\RequirePackage[xetex]{hyperref} +\hypersetup{ + bookmarksnumbered, + colorlinks, + linkcolor=black, + citecolor=black, + plainpages=false, + pdfstartview=FitH +} +\else +\ifpdf +\RequirePackage[pdftex,unicode]{hyperref} +\else +\RequirePackage[dvipdfmx,unicode]{hyperref} +\fi +\fi + +%\addtocontents{toc}{\protect\hypersetup{hidelinks}} +\addtocontents{lot}{\protect\hypersetup{hidelinks}} +\addtocontents{lof}{\protect\hypersetup{hidelinks}} + +\RequirePackage{titletoc} +\titlecontents{chapter}[0pt]{\songti \zihao{4}} +{\thecontentslabel\hspace{\ccwd}}{} +{\hspace{.5em}\titlerule*{.}\contentspage} +\titlecontents{section}[2\ccwd]{\songti \zihao{-4}} +{\thecontentslabel\hspace{\ccwd}}{} +{\hspace{.5em}\titlerule*{.}\contentspage} +\titlecontents{subsection}[4\ccwd]{\songti \zihao{-4}} +{\thecontentslabel\hspace{\ccwd}}{} +{\hspace{.5em}\titlerule*{.}\contentspage} + +\titlecontents{figure}[0pt]{\songti\zihao{-4}} +{\figurename~\thecontentslabel\quad}{\hspace*{-1.5cm}} +{\hspace{.5em}\titlerule*{.}\contentspage} + +\titlecontents{table}[0pt]{\songti\zihao{-4}} +{\tablename~\thecontentslabel\quad}{\hspace*{-1.5cm}} +{\hspace{.5em}\titlerule*{.}\contentspage} + +\renewcommand\tableofcontents{% + \chapter*{\contentsname}%目录里显示“目录”,否则\chapter* + \@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}% + \pdfbookmark[0]{目录}{bittoc} + \@starttoc{toc}% +} + + + +%设定文档页眉页脚 +\pagestyle{BJTU@heading} +%必须在设置完文档的页眉页脚格式之后再重定义此命令 +\rhead{\thepage\ / \pageref{LastPage} \small 页} + +%%定义制作论文封面命令 +\newcommand{\makecover}{ + \newpage\thispagestyle{empty} + \vspace{50pt} + \begin{figure} + \centering + \includegraphics*[]{logo.png} + \end{figure} + \vspace{18pt} + \begin{center} + \if@isDoctor + {\songti\zihao{-1}\bfseries{基于编码结构光的高铁轮轨姿态三维重建\\}} + \else + {\songti\zihao{-1}\bfseries{基于编码结构光的高铁轮轨姿态三维重建\\}} + \fi + \vspace{30pt} + \textbf{{\songti\zihao{0}\BJTU@value@title\\}} + \vspace{115pt} + \begin{tabular}{l} + {\songti\zihao{4}负责人:\BJTU@value@authora}\\ + \\ + {\songti\zihao{4}其他成员:\BJTU@value@authorb}\\ + \\ + {\songti\zihao{4}指导教师:\BJTU@value@advisor}\\ + \end{tabular} + \\ + \vspace{80pt} + {\songti\zihao{4}\textbf{北京交通大学}计算机学院\\\vspace{14pt}2020年6月} + \end{center} +} + + +%% graphics packages +\RequirePackage{graphicx} +\renewcommand{\tablename}{表} +\setlength{\belowcaptionskip}{4pt} +\setlength{\abovecaptionskip}{4pt} % 设置 caption 与上下文间距 + + + +%% 如果插入的图片没有指定扩展名,那么依次搜索下面的扩展名所对应的文件 +\DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.jpeg} +% ccaption -- bicaption +%\RequirePackage{ccaption} +%\captiondelim{\ } +%\captionnamefont{\songti\zihao{5}} +%\captiontitlefont{\songti\zihao{5}} + + +%% sort and compress citations +\RequirePackage[numbers,square,comma,super,sort&compress]{natbib} +% 上标引用 +\newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}} + + +% 将浮动参数设为较宽松的值 +\renewcommand{\textfraction}{0.15} +\renewcommand{\topfraction}{0.85} +\renewcommand{\bottomfraction}{0.65} +\renewcommand{\floatpagefraction}{0.60} + +% 颜色宏包 +\RequirePackage{xcolor} + + +% 中文破折号 +\newcommand{\cndash}{\rule{0.0em}{0pt}\rule[0.35em]{1.4em}{0.05em}\rule{0.2em}{0pt}} + +% listings 源代码显示宏包 +\RequirePackage{listings} +\lstset{tabsize=4, % + frame=shadowbox, %把代码用带有阴影的框圈起来 + commentstyle=\color{red!50!green!50!blue!50},%浅灰色的注释 + rulesepcolor=\color{red!20!green!20!blue!20},%代码块边框为淡青色 + keywordstyle=\color{blue!90}\bfseries, %代码关键字的颜色为蓝色,粗体 + showstringspaces=false,%不显示代码字符串中间的空格标记 + stringstyle=\ttfamily, % 代码字符串的特殊格式 + keepspaces=true, % + breakindent=22pt, % + numbers=left,%左侧显示行号 + stepnumber=1,% + numberstyle=\tiny, %行号字体用小号 + basicstyle=\footnotesize, % + showspaces=false, % + flexiblecolumns=true, % + breaklines=true, %对过长的代码自动换行 + breakautoindent=true,% + breakindent=4em, % + aboveskip=1em, %代码块边框 + %% added by http://bbs.ctex.org/viewthread.php?tid=53451 + fontadjust, + captionpos=t, + framextopmargin=2pt,framexbottommargin=2pt,abovecaptionskip=-3pt,belowcaptionskip=3pt, + xleftmargin=4em,xrightmargin=4em, % 设定listing左右的空白 + texcl=true, + % 设定中文冲突,断行,列模式,数学环境输入,listing数字的样式 + extendedchars=false,columns=flexible,mathescape=true + numbersep=-1em +} +\renewcommand{\lstlistingname}{代码} %% 重命名Listings标题头 + +%% enumerate 列表环境间距调节 +\usepackage{enumitem} +% \setenumerate[1]{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt} +% \setitemize[1]{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=0pt} +% \setdescription{itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=5pt} + +%_ 参考文献风格 added by wei.jianwen@gmail.com +\bibliographystyle{GBT7714-2005NLang} + +%_ 参考文献环境 +\renewenvironment{thebibliography}[1] +{\zihao{5} + \chapter*{\bibname} + \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}% + \addcontentsline{toc}{chapter}{参考文献} + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \setlength{\parsep}{1mm} + \setlength{\labelsep}{0.5em} + \setlength{\itemsep}{0.05pc} + \setlength{\listparindent}{0in} + \setlength{\itemindent}{0in} + \setlength{\rightmargin}{0in} + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m} +{\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} + + + + +\endinput \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/GBT7714-2005NLang.bst b/Latex/design pattern/bjtu-thesis-master/GBT7714-2005NLang.bst new file mode 100644 index 0000000..fd68709 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/GBT7714-2005NLang.bst @@ -0,0 +1,2545 @@ +%% BUPTThesis.bst +%% +%% 北京理工大学研究生学位论文参考文献 BibTeX 样式 +%% +%% +%% 直接采用了北京邮电大学的模板 +%% +%% +%% 本样式基于 IEEEtran 和 ThuThesis 修改而成,基本满足北京邮电大学研究生论文格式要求 +%% +%% 作者: +%% 张煜 (email:dazzlezhang@gmail.com) +%% +%% 更新记录: +%% $LastChangedBy: dazzlezhang $ +%% $LastChangedDate: 2009-06-24 11:30:57 +0800 (三, 2009-06-24) $ +%% $LastChangedRevision: 71 $ + +%% 一些设置的缺省值 +% 英文姓名排版格式字符串, 按~<, Jr.>格式 +FUNCTION {default.name.format.string} {"{vv~}{ll}{~f}{, Jj}"} + +% 列出的最多作者数目, 即当作者数目超过下列数字时, 超出部分的作者姓名将略去 +FUNCTION {default.max.num.names.before.forced.et.al} { #3 } + +% 是否为盲审版本, #0 表示盲审将隐去作者信息, #1 表示非盲审 +FUNCTION {default.is.for.peer.review} { #0 } +%%%%%%%%%%%%%% +% 一些辅助函数 +%%%%%%%%%%%%%% +% #0 不在终端显示开始/完成的提示信息 +% #1 显示提示信息 +FUNCTION {is.print.banners.to.terminal} {#1} + +%%%%%%%%%%%%%%%% +% 版本与提示信息 +%%%%%%%%%%%%%%%% +% 版本信息 +FUNCTION{bst.file.version} { "0.2" } +FUNCTION{bst.file.date} { "2009/01/25" } +FUNCTION{bst.file.website} { + "http://code.google.com/p/buptthesis/" } + +% 开始提示信息 +FUNCTION {banner.message}{ + is.print.banners.to.terminal + { "-- BUPTThesis.bst version" " " * bst.file.version * + " (" * bst.file.date * ") " * "by Yu Zhang." * + top$ + "-- " bst.file.website * + top$ + "-- See the " quote$ * "userguide.pdf" * quote$ * + " manual for usage information." * + top$ + } + { skip$ } + if$ +} + +% 完成提示信息 +FUNCTION {completed.message} { + is.print.banners.to.terminal + { "" top$ "Done." top$ } + { skip$ } + if$ +} + +%%%%%%%%%%%%%%%%%%% +%% 预定义的字符串宏 +%%%%%%%%%%%%%%%%%%% +% 英文月份 +MACRO {jan} {"January"} +MACRO {feb} {"February"} +MACRO {mar} {"March"} +MACRO {apr} {"April"} +MACRO {may} {"May"} +MACRO {jun} {"June"} +MACRO {jul} {"July"} +MACRO {aug} {"August"} +MACRO {sep} {"September"} +MACRO {oct} {"October"} +MACRO {nov} {"November"} +MACRO {dec} {"December"} + +%%%%%%%%%%%% +%% 条目定义 +%%%%%%%%%%%% +ENTRY { address % 地址 + assignee % 标准授权人 + author % 作者 + booktitle % 专著/论文集名 + chapter % + day % + dayfiled % + edition % 版本 + editor % 编者 + howpublished % 出版形式 + esubtype % 电子文献子类 + institution % + journal % 期刊 + key % + language % 语言 + month % 月 + monthfiled % + nationality % + newsletter % + note % + number % + number2 % + organization % + pages % + publisher % + refdate % + update % 电子文档更新或修改日期 + school % + series % + title % + translator % + type % + volume % + volume2 % + year % + year2 % + yearfiled % + url % URL + pubaddress % 出版地 + CTLname_format_string % 作者英文姓名排版格式 + CTLmax_names_forced_etal % 强制略去的最大作者数 + CTLauthor_name_english % 作者英文姓名 + CTLauthor_name_chinese % 作者中文姓名 + CTLfor_peer_review % 是否匿名 + } + {} + { label } + +%%%%%%%%%%%%% +%% 字符串常量 +%%%%%%%%%%%%% +% FUNCTION {bbl.anonymous} { language empty$ { "Anon" } { "佚名" } if$ } +FUNCTION {bbl.anonymous} { "" } +FUNCTION {bbl.etal} { language empty$ { "et~al" } { "等" } if$ } +FUNCTION {bbl.sine.loco} { language empty$ { "S.~l." } { "出版地不详" } if$ } +FUNCTION {bbl.sine.nomine} { language empty$ { "s.~n." } { "出版者不详" } if$ } + +FUNCTION {bbl.comma} { language empty$ { ", " } { "," } if$ } +FUNCTION {bbl.colon} { language empty$ { ": " } { ":" } if$ } +FUNCTION {bbl.period} { language empty$ { "." } { "." } if$ } +FUNCTION {bbl.parallel} { "~//~" } + +FUNCTION {bbl.st} { "st" } % 序数词后缀 +FUNCTION {bbl.nd} { "nd" } % 序数词后缀 +FUNCTION {bbl.rd} { "rd" } % 序数词后缀 +FUNCTION {bbl.th} { "th" } % 序数词后缀 + +FUNCTION {bbl.number} { "第" } +FUNCTION {bbl.author} { "作者" } + +%%%%%%%%%%%% +%% 整型变量 +%%%%%%%%%%% +INTEGERS { output.state before.all mid.sentence after.title after.sentence url.sentence after.block before.pages } +INTEGERS { number.label longest.label.width multiresult + nameptr namesleft numnames lastnamecapitalized namelength charptr } +INTEGERS { max.num.names.before.forced.et.al } +INTEGERS { is.for.peer.review } + +%%%%%%%%%%%%% +%% 字符串变量 +%%%%%%%%%%%%% +STRINGS { s + t + longest.label + thename + name.emph.author.en % 强调现实的作者英文姓名 + name.emph.author.zh % 强调显示的作者中文姓名 + name.format.string % 姓名的格式字符串 + author.name.in.english % 作者英文姓名 + author.name.in.chinese % 作者中文姓名 +} + +%%%%%%%%%%%%%%%%%%%%% +%% LaTeX 参考文献代码 +%%%%%%%%%%%%%%%%%%%%% + +% 输出 .bbl 文件开始 +FUNCTION {begin.bib} { + "% Generated by BUPTThesis.bst, version: " bst.file.version * + " (" * bst.file.date * ")" * + write$ newline$ % 输出注释行,说明产生该bbl的bst及版本 + + preamble$ empty$ % 输出前导 + 'skip$ + { preamble$ write$ newline$ } + if$ + + "\begin{thebibliography}{" longest.label * "}" * + write$ newline$ % 输出 \begin{thebiliography}{x} +} + +% 输出 .bbl 文件结束部分 +FUNCTION {end.bib} { + newline$ + "\end{thebibliography}" + write$ newline$ +} + +%%%%%%%%%%%% +%% 底层函数 +%%%%%%%%%%%% + +% 控制变量初始化 +FUNCTION {initialize.controls} { + default.name.format.string 'name.format.string := + default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al := + default.is.for.peer.review 'is.for.peer.review := +} + +% 初始化最长 label +FUNCTION {initialize.longest.label} { + "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +% 最长 label pass +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + { skip$ } + if$ +} + +% 逻辑非: 栈顶元素的逻辑非 +FUNCTION {not} { + { #0 } + { #1 } + if$ +} + +% 逻辑与 +FUNCTION {and} { + { skip$ } + { pop$ #0 } + if$ +} + +% 逻辑或 +FUNCTION {or} { + { pop$ #1 } + { skip$ } + if$ +} + +% 返回 #1 : 栈顶字符是数字"0"~"9" +% 返回 #0 : 其他 +FUNCTION {is.num} { + chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +% 栈顶整数乘以10 +FUNCTION {bump.int.mag} { + #0 'multiresult := % 初始化乘运算结果 y <- 0 + { duplicate$ #0 > } % 栈顶整数 x = 0 时才停止循环 + { #1 - % x <- x - 1 + multiresult #10 + + 'multiresult := % y <- y + 10 + } + while$ + pop$ % 释放 x + multiresult % y 压栈返回 +} + +% 将栈顶字符("0"~"9")转换为整数(0~9) +FUNCTION {char.to.integer} { + duplicate$ + is.num + { chr.to.int$ "0" chr.to.int$ - } + { "noninteger character " quote$ * swap$ * quote$ * + " in integer field of " * cite$ * warning$ + #0 % 如果栈定字符不是("0"~"9"), 给出警告返回 0 + } + if$ +} + +% 将栈顶字符串转换为整数 +FUNCTION {string.to.integer} { + duplicate$ text.length$ 'namesleft := % namesleft <- 字符串长度 + #1 'nameptr := % nameptr <- 1 + #0 'numnames := % numnames <- 0 + { nameptr namesleft > not } % while( ! ( nameptr > namesleft ) ) + { duplicate$ nameptr #1 substring$ % 取第 nameptr 个字符 x + char.to.integer numnames bump.int.mag + + 'numnames := % numnames <- chr2int( x ) + 10 * numnames + nameptr #1 + + 'nameptr := % nameptr <- nameptr + 1 + } + while$ + pop$ % 释放栈顶元素 + numnames % numnames 压栈返回 +} + +% convert the strings "yes" or "no" to #1 or #0 respectively +FUNCTION {yes.no.to.int} +{ "l" change.case$ duplicate$ + "yes" = + { pop$ #1 } + { duplicate$ "no" = + { pop$ #0 } + { "unknown boolean " quote$ * swap$ * quote$ * + " in " * cite$ * warning$ + #0 + } + if$ + } + if$ +} + +% 初始化状态常量 +FUNCTION {initialize.status.constants} +{ #0 'before.all := % 起始 + #1 'mid.sentence := % 句中 + #2 'after.sentence := % 句末 + #3 'after.block := % 块后 + #4 'after.title := % + #5 'before.pages := % +} + +FUNCTION {remove.char} +{ 't := + 's := + "" + { s empty$ not } + { s #1 #1 substring$ + s #2 global.max$ substring$ 's := + duplicate$ t = 'pop$ + { * } + if$ + } + while$ +} + +STRINGS {z} +FUNCTION {remove.period} +{ 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ +} + +FUNCTION {remove.dots} { + duplicate$ "input=" swap$ * warning$ + "language=" language * warning$ + language empty$ + { "." remove.char + duplicate$ "output('.')=" swap$ * warning$ } + { "." remove.char + duplicate$ "output('.')=" swap$ * warning$ + "." remove.char + duplicate$ "output('.')=" swap$ * warning$ } + if$ +} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + pop$ + } + if$ + } + if$ +} + +%%%%%%%%%%%% +%% 调试例程 +%%%%%%%%%%%% + +% 默认调试输出函数 +FUNCTION {debug.output} { + "[DEBUG] " swap$ * top$ +} + +% 状态调试输出函数 +FUNCTION {debug.output.status} { + "---- output.state=" + output.state before.all = + { "before.all" } + { output.state mid.sentence = + { "mid.sentence" } + { output.state after.sentence = + { "after.sentence" } + { output.state url.sentence = + { "url.sentence" } + { output.state before.pages = + { "before.pages" } + { "after.block" } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + * debug.output +} + +FUNCTION {output.year} +{ 't := + number empty$ + volume empty$ + and + { add.period$ write$ } + { ", " * write$ } + if$ + t +} + +% STRINGS {z} +% FUNCTION {remove.dots} +% { 'z := +% "" +% { z empty$ not } +% { z #1 #1 substring$ +% z #2 global.max$ substring$ 'z := +% duplicate$ bbl.period = 'pop$ +% { * } +% if$ +% } +% while$ +% %z +% } + +% 对于中文文献, 用全角句点替换英文句点 +FUNCTION {replace.half.width.period} { +% % DEBUG +% duplicate$ "-- replace.half.width.period(" swap$ * ")" * debug.output +% % END OF DEBUG + language empty$ + { " " * } % 对于英文文献, 在句点后加一空格 + { duplicate$ text.length$ 'numnames := % numnames 等于字符串长度 +% % DEBUG +% numnames int.to.str$ "---- text.length$=" swap$ * debug.output +% % END OF DEBUG + duplicate$ numnames #1 substring$ "." = + { % % DEBUG +% "---- Found '.' at the end" debug.output +% % END OF DEBUG + numnames #1 - + #1 swap$ substring$ + bbl.period * + } + { skip$ } + if$ + } + if$ +% % DEBUG +% duplicate$ "---- Return=" swap$ * debug.output +% % END OF DEBUG +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 输出例程: 输出栈顶项并根据需要添加标点符号 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% 非空项输出函数: 用于输出非空项 +FUNCTION {output.nonnull} { +% % DEBUG +% duplicate$ "output.nonnull(" swap$ * ")" * debug.output +% debug.output.status +% % END OF DEBUG + swap$ + % 根据当前输出状态添加前置标点符号 + % before.all 起始, 不添加任何标点符号直接输出 + % mid.sentence 句中, 前置逗号输出 + % after.sentence 句末, 前置句号输出 + % after.block 块后, 前置句号, 后置 \newblock 输出 + % after.title + output.state mid.sentence = + { bbl.comma * write$ } % mid.sentence 前置逗号 + { output.state after.block = + { add.period$ % 块后, 后置句号 + replace.half.width.period % 为中文文献替换句点 + write$ + newline$ +% "\newblock " write$ + } % 后置 \newblock 输出 + { output.state before.all = + { write$ } % 起始, 不添加任何标点符号直接输出 + { output.state after.title = + { bbl.parallel * + write$ } + { output.state before.pages = + { bbl.colon * + write$ } + { add.period$ % 句末, 前置句号输出 + replace.half.width.period + write$ } % + if$ + } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + % s +} + +% 无警告输出函数 +FUNCTION {output} { + duplicate$ empty$ + { pop$ } % 若输出项为空, 则舍去空输出项 + { output.nonnull } % 否则调用非空输出函数 + if$ +} + +% 警告输出函数: 同 output, 但是对于空项给出警告提示 +FUNCTION {output.warn} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + { output.nonnull } + if$ +} + +% 将数字字符串转换成序数词形式字符串(例如: "7" -> "7th") +FUNCTION {num.to.ordinal} { + duplicate$ #-1 #1 substring$ "1" = + { bbl.st * } + { duplicate$ #-1 #1 substring$ "2" = + { bbl.nd * } + { duplicate$ #-1 #1 substring$ "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ +} + +% 从字符串中提取前导数字的函数 +% 如果栈顶字符串以数字开头(例如: "11th"), 则将字符串用其数字部分(即,"11") +% 替换. 否则, 保持原字符串不变. 用于版本转换函数(convert.edition) +% s 保存提取出的数字, t 保存剩余待扫描的字符串. +FUNCTION {extract.num} { + duplicate$ 't := % t <- 输入字符串 + "" 's := % s <- "" + { t empty$ not } % while( t != "" ) { + { t #1 #1 substring$ % tmp <- t[0] + t #2 global.max$ substring$ + 't := % t <- t[2:global.max$] + duplicate$ is.num % if( is.num( tmp ) ) + { s swap$ * 's := } % s <- s & tmp + { pop$ "" 't := } % else t <- "" + if$ % } + } % + while$ % if( s == "" ) + s empty$ % ; + 'skip$ % else + { pop$ s } % return s + if$ % +} + +% 将1st~10th单词形式的序数词转换成阿拉伯数字形式 +FUNCTION {word.to.num} { + duplicate$ "l" change.case$ + 's := % s <- lower( arg ) + s "first" = % if ( s == "first" ) + { pop$ "1" } % return "1" + { skip$ } + if$ + s "second" = % if ( s == "second" ) + { pop$ "2" } % return "2" + { skip$ } + if$ + s "third" = + { pop$ "3" } + { skip$ } + if$ + s "fourth" = + { pop$ "4" } + { skip$ } + if$ + s "fifth" = + { pop$ "5" } + { skip$ } + if$ + s "sixth" = + { pop$ "6" } + { skip$ } + if$ + s "seventh" = + { pop$ "7" } + { skip$ } + if$ + s "eighth" = + { pop$ "8" } + { skip$ } + if$ + s "ninth" = + { pop$ "9" } + { skip$ } + if$ + s "tenth" = + { pop$ "10" } + { skip$ } + if$ +} + +% 转换字符串形式的序数词为数字形式的序数词 +% 例如: 将 "Eleventh" 转换为 "11th" +FUNCTION {convert.edition} { + duplicate$ empty$ 'skip$ + { duplicate$ #1 #1 substring$ + is.num % if( is.num( arg[1] ) ) { + { extract.num % tmp <- extract.num( arg ) + num.to.ordinal % tmp <- num.to.ordinal( tmp ) + } % } else { + { word.to.num % tmp <- word.to.num( arg ) + duplicate$ #1 #1 substring$ + is.num % if( is.num( tmp[1] ) ) + { num.to.ordinal } % tmp <- num.to.ordinal( tmp ) + { "edition ordinal word " + quote$ * edition * quote$ * + " may be too high (or improper) for conversion" * + " in " * cite$ * warning$ % else output warning + } + if$ + } + if$ + } + if$ +} + +FUNCTION {start.entry} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + replace.half.width.period + write$ + newline$ +} + +% FUNCTION {fin.entry} +% { duplicate$ empty$ +% 'pop$ +% 'write$ +% if$ +% newline$ +% } + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + + + + + +FUNCTION {format.language} +{ language empty$ + 'skip$ + 'skip$ + if$ + } +FUNCTION {is.space} +{ chr.to.int$ + duplicate$ #32 = + { pop$ #1 } + { pop$ #0 } + if$ +} +FUNCTION {is.lower.char} +{ + chr.to.int$ + duplicate$ #96 > + { #123 < + { #1 } + { #0 } + if$ + } + { pop$ #0 } + if$ +} + +% 将last name转换为全大写 +FUNCTION {capitalize.last.name} { + "u" change.case$ +} +% FUNCTION {capitalize.last.name} +% { +% 'thename := % 输入参数 thename +% thename text.length$ +% 'namelength := % namelength := thename 的长度 +% #1 'charptr := +% #0 'lastnamecapitalized := +% "" + +% { charptr #1 - namelength < +% % % debug +% % duplicate$ int.to.str$ "( charptr + #1 > namelength ) == " swap$ * warning$ +% % % eod +% } +% { +% % % debug +% % "charptr = " charptr int.to.str$ * +% % ", lastnamecapitalized = " * +% % lastnamecapitalized int.to.str$ * warning$ +% % % eod +% lastnamecapitalized #1 = +% { thename charptr namelength charptr - #1 + substring$ * +% namelength #1 + 'charptr := +% % % debug +% % duplicate$ "top of the stack = " swap$ * warning$ +% % % eod +% } +% { thename charptr #1 substring$ +% % % debug +% % duplicate$ "the char = " swap$ * warning$ +% % % eod +% duplicate$ is.lower.char +% % % debug +% % duplicate$ int.to.str$ "is.lower.char = " swap$ * warning$ +% % % eod +% { "u" change.case$ * } +% { duplicate$ is.space +% % % debug +% % duplicate$ int.to.str$ "is.space = " swap$ * warning$ +% % % eod +% { #1 'lastnamecapitalized := +% * +% } +% { * +% } +% if$ +% } +% if$ +% % % debug +% % duplicate$ "top of the stack = " swap$ * warning$ +% % % eod +% charptr #1 + 'charptr := +% } +% if$ +% } +% while$ +% } +% 格式化盲审姓名 +FUNCTION {format.names.for.peer.review} { + 's := % s := author域 + #1 'nameptr := % nameptr 是姓名指针,初始化为 1 + s num.names$ 'numnames := % 利用 num.names$ 获得 s 中的作者数量存入 nameptr + numnames 'namesleft := % 未处理的姓名数 namesleft := numnames + % 循环处理所有姓名 + { namesleft #0 > } % if namesleft > #0 (还有姓名没有格式化) + { s nameptr % 选择第 nameptr 个姓名 + name.format.string % 按 name.format.string 的格式排版 + format.name$ % 调用 format.name$ + remove.period % 并删除缩写符号'.' + 't := % 格式化后的姓名暂存于 t + language empty$ + { author.name.in.english }% 如果是英文文献将 author.name.in.english 压栈 + { author.name.in.chinese } % 否则将 author.name.in.chinese 压栈 + if$ + t = % 用当前的姓名与栈上的姓名做比较 + { nameptr int.to.str$ % 将作者序号转化为字符串 + "\CJKnumber{" swap$ * "}" * % 使用中文数字 + bbl.number swap$ * bbl.author * % 加上``第''和``作者'' +% duplicate$ debug.output + } + { skip$ } + if$ + nameptr #1 + 'nameptr := % 姓名指针加 1 + namesleft #1 - 'namesleft := % 剩余姓名数减 1 + } + while$ +} +% 格式化非盲审姓名 +FUNCTION {format.names.for.non.peer.review} { + % 初始化 + 's := % s := author域 + #1 'nameptr := % nameptr 是姓名指针,初始化为 1 + s num.names$ 'numnames := % 利用 num.names$ 获得 s 中的作者数量存入 nameptr + numnames 'namesleft := % 未处理的姓名数 namesleft := numnames + % 循环处理所有姓名 + { namesleft #0 > } % if namesleft > #0 (还有姓名没有格式化) + { s nameptr % 选择第 nameptr 个姓名 + name.format.string % 按 name.format.string 的格式排版 + format.name$ % 调用 format.name$ +% language empty$ +% { "u" change.case$ } % 如果不是语言为空, 做大写转换 +% { skip$ } +% if$ % + remove.period % 并删除缩写符号'.' + 't := % 格式化后的姓名暂存于 t + nameptr #1 > + { nameptr max.num.names.before.forced.et.al #1 + = + { "others" 't := % 如果当前作者的序数已经超出了最大列显作者数 + #1 'namesleft := } % 则置未处理姓名数为#1, 以便跳出循环 + { skip$ } % 如果作者序数在允许范围内, 则跳过 + if$ % + bbl.comma * % 添加逗号 + namesleft #1 > % 若当前姓名不是最后一个 + { t * } % 显示当前姓名 + { t "others" = % 若当前姓名是最后一个且后面有略去的姓名 + { bbl.etal * } % 添加", et~al"或",等" + { t * } % 如果没有略去姓名,以句点结束 + if$ % + } + if$ % + } + { t } % 如果是第一个作者, 直接将排版后的姓名压栈 + if$ + nameptr #1 + 'nameptr := % 姓名指针加 1 + namesleft #1 - 'namesleft := % 剩余姓名数减 1 + } + while$ +} +% 格式化姓名 +FUNCTION {format.names} { + is.for.peer.review + { format.names.for.peer.review } % 格式化盲审姓名 + { format.names.for.non.peer.review } % 格式化非盲审姓名 + if$ +} +FUNCTION {format.authors} +{ author empty$ + { bbl.anonymous + "The author in " cite$ * " is missing." * warning$ } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { bbl.anonymous + "The editor in " cite$ * " is missing." * warning$ + } + { editor format.names } + if$ +} + +FUNCTION {format.assignees} { + assignee empty$ + { "" } + { assignee format.names } + if$ +} + +% 译者格式 +FUNCTION {format.translators} +{ translator empty$ + { "" } % 无译者 + { new.block % 有译者 + translator format.names ",译" * + } + if$ +} + +% 机构格式 +FUNCTION {format.institution} { + institution empty$ + { "" } + { institution } + if$ +} + +% 组织格式 +FUNCTION {format.organization} { + organization empty$ + { "" } + { organization } + if$ +} + +% 文献类型标志代码/电子文献载体标志代码 +FUNCTION {bib.type.designator} { +% % DEBUG +% "bib.type.designator(type:" type$ * debug.output +% " url: " url empty$ { "" }{ url } if$ * debug.output +% % END OF DEBUG + + % 文献类型标志代码 + type$ "book" = type$ "inbook" = or + { "M" } + { type$ "standard" = + { "S" } + { type$ "proceedings" = type$ "conference" = or type$ "inproceedings" = or + { "C" } + { type$ "patent" = + { "P" } + { type$ "phdthesis" = type$ "mastersthesis" = or + { "D" } + { type$ "techreport" = + { "R" } + { type$ "article" = type$ "periodical" = or + { "J" } + { type$ "online" = type$ "webpage" = or type$ "www" = or + { "EB" } + { type$ "electronic" = + { esubtype empty$ + { url empty$ + { "" } + { "EB" } + if$ + } + { esubtype "webpage" = + { "EB" } + { esubtype "database" = + { "DB" } + { esubtype "program" = + { "CP" } + { "" } + if$ % electronics[program] + } + if$ % electronics[database] + } + if$ % electronics[webpage] + } + if$ + } + { "" } % 其他 + if$ % electronics + } + if$ % online/webpage/www + } + if$ % article/periodical + } + if$ % techreport + } + if$ % phdthesis/mastersthesis + } + if$ % patent + } + if$ % proceedings/inproceedings/conference + } + if$ % standard + } + if$ % book/inbook +% % DEBUG +% duplicate$ " doc.designator: " swap$ * debug.output +% % END OF DEBUG + % 电子文献载体标志代码 + duplicate$ "" = + { skip$ } + { "~[" swap$ * + howpublished empty$ + { url empty$ + { "" } + { "/OL" } + if$ + } + { howpublished "online" = + { "/OL" } + { howpublished "magtype" = + { "MT" } + { howpublished "disk" = + { "DK" } + { howpublished "cdrom" = + { "CD" } + { "" } + if$ % cdrom + } + if$ % disk + } + if$ % magitude type + } + if$ % online + } + if$ + * "]" * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { new.block + title } + if$ +} + +% 格式化年月日``YYYY-MM-DD'' +FUNCTION {format.year.month.day} { + year empty$ + { "YYYY" } + { year } + if$ + "-" * + month empty$ + { "MM" * } + { month text.length$ #2 < + { "0" * } + { skip$ } + if$ + month * + } + if$ + "-" * + day empty$ + { "DD" * } + { day text.length$ #2 < + { "0" * } + 'skip$ + if$ + day * + } + if$ +} + +FUNCTION {format.reference.date} { + refdate empty$ + { "" + url empty$ + { skip$ } + { "The refdate in " cite$ * " is missing." * warning$ } + if$ + } + { output.state mid.sentence = + { before.all 'output.state := } + { skip$ } + if$ + "~[" refdate * "]" * } + if$ +} + +% patent的题名项: 专利题名: 专利国别, 专利号~[文献类型标志] +FUNCTION {format.patent.title} { + title empty$ % 专利提名 + { "" } + { new.block + title bbl.colon * + nationality empty$ % 专利国别, 专利号 + { % 专利国别为必备项 + "The nationality in " cite$ * " is missing." * warning$ + } + { number empty$ + { % 专利号为必选项 + "The number in " cite$ * " is missing." * warning$ + } + { % 产生``专利国别, 专利号'' + nationality * bbl.comma * number * + } + if$ + } + if$ + % 文献类型标志 + bib.type.designator * + } + if$ +} + +% patent的出版项: +FUNCTION {format.patent.publication} { + new.block + format.year.month.day +% % DEBUG +% duplicate$ "End of format.patent.publication, top = " swap$ * debug.output +% % END OF DEBUG + url empty$ + { skip$ } + { refdate empty$ + { "The refdate in " cite$ * " is missing." * warning$ } + { "~[" * refdate * "]" * } + if$ + } + if$ +} + +% electronic的主要责任者: +% author 或 organization +FUNCTION {format.electronic.authors} +{ + author empty$ + { organization empty$ + { " " } + { organization } + if$ + } + { format.authors } + if$ +} + +% electronic的出版项 +FUNCTION {format.electronic.publication} { + new.block + % 出版地: 出版者 + address empty$ + { "" } + { address + publisher empty$ + { skip$ } + { bbl.colon * publisher * } + if$ + } + if$ + + % 出版年 + year empty$ + { skip$ } + { publisher empty$ + { "" } + { bbl.comma } + if$ + * year * } + if$ +} + +%% article的标题格式 +FUNCTION {format.atitle} +{ title empty$ + { "" } + { title + newsletter empty$ + { "~[J" * } + { newsletter "yes" = + { "~[N" * } + { "~[J" * } + if$ + } + if$ + url empty$ + { "]" * } + { "/OL]" * } + if$ + } + if$ +} +%% incollection的标题格式 +FUNCTION {format.ictitle} +{ title empty$ + { "" } + { title "~[M]~//~" * + editor format.names * + } + if$ +} +%% inproceedings的标题格式 +FUNCTION {format.iptitle} +{ title empty$ + { "" } + { title "~[C]~//~" * + editor format.names * + } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +% 年,卷(期) +FUNCTION {format.year.volume.number} { + year empty$ + { "" } + { type$ "periodical" = + { new.block } + { mid.sentence 'output.state := } + if$ + year + volume empty$ + 'skip$ + { bbl.comma * volume * } + if$ + number empty$ + 'skip$ + { "~(" * number * ")" * } + if$ + year2 empty$ + { skip$ } + { "~--" * + year2 "now" = + { skip$ } + { year2 * + volume2 empty$ + { skip$ } + { bbl.comma * volume2 * } + if$ + number2 empty$ + 'skip$ + { "~(" * number2 * ")" * } + if$ + } + if$ + } + if$ + } + if$ +% %% DEBUG +% duplicate$ "format.year.volume.number=" swap$ * debug.output +% %% END OF DEBUG +} + +% +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + { year } + { month bbl.comma * year * } + if$ + } + if$ +} +function {format.year.year} +{ year empty$ + 'skip$ + { year "--" * + year2 empty$ + 'skip$ + { year2 "now" = + 'skip$ + { year2 * } + if$ + } + if$ + } + if$ +} + +% 专著标题格式 +FUNCTION {format.book.title} { + new.block % 生成一个新的block + title + type$ "proceedings" = + { address empty$ + { skip$ } + { bbl.comma * address * bbl.comma * + month empty$ + { skip$ } + { month * } + if$ + year empty$ + { skip$ } + { year * } + if$ + } + if$ + } + { skip$ } + if$ + bib.type.designator * % 标题 + [文献标志代码/电子文献载体标志代码] +} + +% 科技报告标题格式 +FUNCTION {format.techreport.title} { + title empty$ + { "" } + { new.block % 生成一个新的block + title % 标题 + + number empty$ % 编号 + + { "" } + { bbl.comma * number } + if$ * + bib.type.designator * % [文献标志代码/电子文献载体标志代码] + } + if$ +} + +% 连续出版物标题格式 +FUNCTION {format.jtitle} +{ title "~[J" * + url empty$ + { "]" * } + { "/OL]" * } + if$ +} + +% 论文集标题格式 +FUNCTION {format.ptitle.volume} +{ title + volume empty$ + { "~[C]" } + { bbl.colon volume * "~[C]" * } + if$ * + %emphasize +} +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { language empty$ + { "volume" volume tie.or.space.connect } + { volume } + if$ + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +% 版本项格式 +FUNCTION {format.edition} { + edition empty$ + { "" } + { new.block % 版本项按一个block输出 + language empty$ % 英文文献版本号自动转换成数字形式的序数词 + { edition convert.edition + "l" change.case$ " ed" * + } + { edition } % 中文文献版本号直接输出 + if$ + } + if$ +} + + +FUNCTION {format.url} +{ url empty$ + { "" } + { new.block + "\url{" url * "}" * + } + if$ +} + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { before.pages 'output.state := + pages multi.page.check + { "" pages n.dashify tie.or.space.connect } + { "" pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { newsletter empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { bbl.colon * pages n.dashify * } + if$ + } + if$ + % duplicate$ "top of stack = " swap$ * warning$ + url empty$ + 'skip$ + { refdate empty$ + { "there's an url but no refdate in " cite$ * warning$ } + { %duplicate$ "url and refdate is not empty, top of stack = " swap$ * warning$ + "~[" * refdate * "]" * + } + if$ + %duplicate$ "top of stack = " swap$ * warning$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { language empty$ + { " " booktitle * } + % { "Proceedings of " booktitle * } + { " " booktitle * } + if$ + } + { language empty$ +% { "In: " format.editors * ", Proceedings of " * booktitle * } + { " " booktitle * } + { " " booktitle * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle.volume} +{ booktitle empty$ + { "" } + { editor empty$ + { language empty$ +% { "Proceedings of " booktitle * } + { " " booktitle * } + { " " booktitle * } + if$ + } + { language empty$ + %{ "In: " format.editors * ", Proceedings of " * booktitle * } + { " " booktitle * } + { " " booktitle * } + if$ + } + if$ + %% volume + volume empty$ + 'skip$ + { language empty$ + { "Vol." * volume * } + { ":第" * volume * "卷" * } + if$ + } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{ll }{f{~}}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ll }{f{~}}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{ll }{f{~}}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +% 出版地: 出版者 +FUNCTION {format.address.publisher} { + new.block + type$ "inproceedings" = + { pubaddress empty$ + { "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地 + publisher empty$ + { "there's neither pubaddress nor publisher in " cite$ * warning$ + "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { "there's a publisher but no pubaddress in " cite$ * warning$ + publisher * % 有出版者 + } + if$ + } + { pubaddress bbl.colon * % 有出版地 + publisher empty$ + { "there's a pubaddress but no publisher in " cite$ * warning$ + "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { publisher * } % 有出版者 + if$ + } + if$ + } + { address empty$ + { "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地 + publisher empty$ + { "there's neither address nor publisher in " cite$ * warning$ + "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { "there's a publisher but no address in " cite$ * warning$ + publisher * % 有出版者 + } + if$ + } + { address bbl.colon * % 有出版地 + publisher empty$ + { "there's a address but no publisher in " cite$ * warning$ + "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { publisher * } % 有出版者 + if$ + } + if$ + } + if$ +} + +% 出版地: 出版者, 出版年 +FUNCTION {format.address.publisher.year} { +% % DEBUG +% "-- format.address.publisher.year(){" debug.output +% "-- address =" address * debug.output +% "-- publisher=" publisher * debug.output +% "-- year =" year * debug.output +% % END OF DEBUG + new.block + type$ "inproceedings" = + { pubaddress empty$ + { "" % "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地 + publisher empty$ + { "there's neither pubaddress nor publisher in " cite$ * warning$ + "" * % "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { "there's a publisher but no pubaddress in " cite$ * warning$ + publisher * % 有出版者 + } + if$ + } + { publisher empty$ + { "there's a pubaddress but no publisher in " cite$ * warning$ + "" % "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { pubaddress bbl.colon * % 有出版地 + publisher * } % 有出版者 + if$ + } + if$ + } + { address empty$ + { "" % "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地 + publisher empty$ + { "there's neither address nor publisher in " cite$ * warning$ + "" * % "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { "there's a publisher but no address in " cite$ * warning$ + publisher * % 有出版者 + } + if$ + } + { publisher empty$ + { "there's a address but no publisher in " cite$ * warning$ + "" % "[" * bbl.sine.nomine * "]" * % 无出版者 + } + { address bbl.colon * % 有出版地 + publisher * } % 有出版者 + if$ + } + if$ + } + if$ + + % 出版年 + year empty$ + { "there's no year in " cite$ * warning$ } + { type$ "inproceedings" = + { bbl.comma * year * } + { publisher empty$ + { year * } + { bbl.comma * year * } + if$ + } + if$ + + type$ "periodical" = + { year2 empty$ % 对连续出版物可以排版 year2 + { skip$ } + { "--" * + year2 "l" change.case$ "now" = + { skip$ } + { year2 * } + if$ + } + if$ + } + { skip$ } + if$ + } + if$ +% % DEBUG +% duplicate$ "-- }=" swap$ * debug.output +% % END OF DEBUG +} + +% 出版地: 学校, 出版年 +FUNCTION {format.address.school.year} { + new.block + address empty$ + { "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地 + school empty$ + { "there's neither address nor school in " cite$ * warning$ + "[" bbl.sine.nomine * "]" * % 无出版者 + } + { "there's a school but no address in " cite$ * warning$ + school * % 有出版者 + } + if$ + } + { address bbl.colon * % 有出版地 + school empty$ + { "there's a address but no school in " cite$ * warning$ + "[" bbl.sine.nomine * "]" * % 无出版者 + } + { school * } % 有出版者 + if$ + } + if$ + % 出版年 + year empty$ + { "there's no year in " cite$ * warning$ } + { bbl.comma * year * } + if$ +} + + +% FUNCTION {format.title.type} +% { title empty$ +% { type empty$ +% { "" } +% { "there's a type but no title in " cite$ * warning$ +% type +% } +% if$ +% } +% { type empty$ +% 'title +% { title bbl.colon * type * } +% if$ +% } +% if$ +% } + +FUNCTION {format.note} { + note empty$ + { new.block "" } + { url empty$ + { new.block } + { before.all 'output.state := } + if$ + note } + if$ +} + +%%%%%%%%%%%%%%%%% +%% 著录格式: 专著 +%%%%%%%%%%%%%%%%% + +% 普通图书 +FUNCTION {book} { + start.entry % 开始 + + author empty$ % 主要责任者 + { format.editors "author and editor" output.warn } + { format.authors output.nonnull } + if$ + format.book.title "title" output.warn % 题名项 + format.translators output % 其他责任者(可选) + format.edition output % 版本项 + format.address.publisher.year output.nonnull % + format.reference.date output % + format.url output % 获取或访问路径 + format.note output % 备注 + + fin.entry +} + +% 标准 +FUNCTION {standard} { + start.entry + + organization empty$ % 主要责任人 + { format.institution "organization and institution" output.warn } + { format.organization output.nonnull } + if$ + format.book.title "title" output.warn % 题名项 + format.translators output % 其他责任人 + format.edition output % 版本项 + format.address.publisher.year output.nonnull % 出版项 + format.url output % URL + format.note output % 备注项 + + fin.entry +} + +% 学位论文 +FUNCTION {phdthesis} { + start.entry + + format.authors "author" output.warn + format.book.title "title" output.warn + format.address.school.year output + format.note output + + fin.entry +} + +% 会议录/论文集 +FUNCTION {proceedings} { + start.entry + + editor empty$ + { organization empty$ + { format.institution "author, organization institution" output.warn } + { format.organization output.nonnull } + if$ + } + { format.editors output.nonnull } + if$ + format.book.title "title" output.warn + format.address.publisher.year output + format.note output + + fin.entry +} + +% 科技报告 +FUNCTION {techreport} { + start.entry + + author empty$ + { organization empty$ + { format.institution + "author, organization and institution" output.warn } + { format.organization output.nonnull } + if$ + } + { format.authors output.nonnull } + if$ + format.techreport.title "title" output.warn + format.address.publisher.year output.nonnull + format.url output + format.note output + + fin.entry +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 著录格式: 专著中析出的文献 +%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {format.collection.editors} { + booktitle empty$ + { "" } + { after.title 'output.state := + format.editors } + if$ +} +FUNCTION {format.address} { + booktitle empty$ + { new.block } + { mid.sentence 'output.state := } + if$ + address empty$ + { "" } + { address } + if$ +} + +FUNCTION {format.month.year} { + month empty$ + { "" } + { month " " * } + if$ + year empty$ + { "There is month but no year in " cite$ * warning$ } + { year * } + if$ +} + +FUNCTION {format.collection.title} { + booktitle empty$ + { "" } + { new.block + "In " booktitle * +% address empty$ +% { skip$ } +% { bbl.comma * address * bbl.comma * +% month empty$ +% { skip$ } +% { month * } +% if$ +% year empty$ +% { skip$ } +% { " " * year * } +% if$ +% } +% if$ + } + if$ +} +% 图书中析出的文献 +FUNCTION {inbook} { + start.entry + + author empty$ + { format.editors "author and editor" output.warn } + { format.authors output.nonnull } + if$ + format.book.title "title" output.warn + format.collection.editors "editor" output.warn + format.collection.title "booktitle" output.warn + format.translators output % 其他责任人 + format.edition output % 版本项 + format.address.publisher.year output.nonnull % 出版项 + format.pages "pages" output.warn % + format.url output % URL + format.note output % 备注项 + + fin.entry +} + +%%%%%%%%%%%%%%%%% +%% 著录格式: 专利 +%%%%%%%%%%%%%%%%% +FUNCTION {patent} { + start.entry + + author empty$ + { format.assignees "assignee" output.warn } + { format.authors output.nonnull } + if$ + format.patent.title "title" output.warn + format.patent.publication output + format.url output + format.note output + + fin.entry +} + +% 电子文献更新或修改日期 +FUNCTION {format.update.date} { + update empty$ + { "" } + { output.state mid.sentence = + { before.all 'output.state := } + { skip$ } + if$ + "~(" update * ")" * } + if$ +} + +%%%%%%%%%%%%%%%%%%%%% +%% 著录格式: 电子文献 +%%%%%%%%%%%%%%%%%%%%% +FUNCTION {electronic} { + start.entry + + author empty$ + { organization "author and organization" output.warn } + { format.authors output.nonnull } + if$ + format.book.title output + format.electronic.publication output + format.update.date output + format.reference.date output + format.url output + format.note output + + fin.entry +} + +%%%%%%%%%%%%%%%%%%%%%%% +%% 著录格式: 连续出版物 +%%%%%%%%%%%%%%%%%%%%%%% +FUNCTION {periodical} { + start.entry + + editor empty$ + { format.organization "editors and organization" output.warn } + { format.editors output.nonnull } + if$ + format.book.title "title" output.warn + format.year.volume.number output + format.address.publisher.year output + format.url output + format.note output + + fin.entry +} + +FUNCTION {format.journal.title} { + journal empty$ + { "" } + { new.block journal } + if$ +} + +% 连续出版物中析出的文献 +FUNCTION {article} +{ start.entry + + format.authors "author" output.warn + format.book.title "title" output.warn + format.journal.title "journal" output.warn + format.year.volume.number output + format.pages "pages" output.warn + format.reference.date output + format.url output + format.note output + + fin.entry +} + +FUNCTION {booklet} +{ start.entry + format.authors output + new.block + format.title "title" output.warn + howpublished address new.block.checkb + howpublished output + address output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ start.entry + format.authors "author" output.warn + new.block + format.ictitle "title" output.warn + new.block + crossref missing$ + { %format.in.ed.booktitle "booktitle" output.warn + %format.bvolume output + format.in.ed.booktitle.volume "booktitle" output.warn + format.number.series output + format.chapter.pages output + new.sentence +% publisher "publisher" output.warn +% address output + format.address.publisher.year output + format.edition output + format.date ":" * format.pages * output + %format.date "year" output.warn + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + note output + fin.entry +} + +% 论文集中析出的文献 +FUNCTION {inproceedings} { + start.entry + + format.authors "author" output.warn + format.book.title "title" output.warn + format.collection.editors "editor" output.warn + format.collection.title "booktitle" output.warn + format.address output + format.month.year output +% format.address.publisher.year output.nonnull % 出版项 + format.pages "pages" output.warn % + format.url output % URL + format.note output % 备注项 +% format.in.booktitle "booktitle" output.warn +% %format.bvolume output +% %format.number.series output +% %format.pages output +% address empty$ +% { organization publisher new.sentence.checkb +% organization output +% publisher output +% %format.date "year" output.warn +% %year output +% format.date ":" * format.pages * output +% } +% { %address output.nonnull +% format.address.publisher.year output +% %format.date "year" output.warn +% % year output +% format.date ":" * format.pages * output +% new.sentence +% organization output +% %publisher output +% } +% if$ +% new.block + % pages output + %remove.dots + +% { format.incoll.inproc.crossref output.nonnull +% format.pages output +% } +% if$ +% new.block +% note output + fin.entry +} + +FUNCTION {manual} +{ start.entry + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.book.title "title" output.warn + author empty$ + { organization empty$ + { address new.block.checka + address output + } + 'skip$ + if$ + } + { organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + fin.entry +} + +% FUNCTION {masterthesis.type} +% { "~[D]" +% % language empty$ +% % { "[Master Thesis]" } +% % { "[硕士学位论文]" } +% % if$ +% } + +% FUNCTION {mastersthesis} +% { start.entry +% format.authors "author" add.period$ output.warn +% new.block +% format.title remove.dots " " * masterthesis.type * output +% new.block +% format.address.school output +% %address output +% %school "school" output.warn +% format.date "year" output.warn +% new.block +% note output +% fin.entry +% } + +FUNCTION {misc} +{ start.entry + + format.authors output +% title howpublished new.block.checkb + format.title output +% howpublished new.block.checka +% howpublished output +% format.date output + format.address output + format.month.year output + format.pages "pages" output.warn + format.url output +% new.block + format.note output + fin.entry +% empty.misc.check +} + +FUNCTION {phdthesis.type} +{ "~[D]" +% language empty$ +% { "[PhD Thesis]" } +% { "[博士学位论文]" } +% if$ +} + + + + +FUNCTION {unpublished} +{ start.entry + format.authors "author" output.warn + new.block + format.title "title" output.warn + new.block + note "note" output.warn + format.date output + fin.entry +} + +% 专用控制条目 BUPTThesisBSTCTL 用于提供方便的用户设置接口 +FUNCTION {BUPTThesisBSTCTL}{ + is.print.banners.to.terminal + { "** BUPTThesis BST control entry " quote$ * cite$ * + quote$ * " detected." * + top$ + } + { skip$ } + if$ +% CTLuse_article_number +% empty$ +% { skip$ } +% { CTLuse_article_number +% yes.no.to.int +% 'is.use.number.for.article := +% } +% if$ +% CTLuse_paper +% empty$ +% { skip$ } +% { CTLuse_paper +% yes.no.to.int +% 'is.use.paper := +% } +% if$ +% CTLuse_forced_etal +% empty$ +% { skip$ } +% { CTLuse_forced_etal +% yes.no.to.int +% 'is.forced.et.al := +% } +% if$ + % 显示作者数目 + CTLmax_names_forced_etal + empty$ + { skip$ } + { CTLmax_names_forced_etal + string.to.integer + 'max.num.names.before.forced.et.al := + } + if$ + % 论文作者英文姓名 + CTLauthor_name_english + empty$ + { skip$ } + { CTLauthor_name_english + 'author.name.in.english := + % #1 'is.for.peer.review := +% "CTLauthor_name_english=" author.name.in.english * debug.output + } + if$ + % 论文作者中文姓名 + CTLauthor_name_chinese + empty$ + { skip$ } + { CTLauthor_name_chinese + 'author.name.in.chinese := + % #1 'is.for.peer.review := +% "CTLauthor_name_chinese=" author.name.in.chinese * debug.output + } + if$ + CTLfor_peer_review + empty$ + { skip$ } + { CTLfor_peer_review + yes.no.to.int + 'is.for.peer.review := + } + if$ +% CTLnames_show_etal +% empty$ +% { skip$ } +% { CTLnames_show_etal +% string.to.integer +% 'num.names.shown.with.forced.et.al := +% } +% if$ +% CTLuse_alt_spacing +% empty$ +% { skip$ } +% { CTLuse_alt_spacing +% yes.no.to.int +% 'is.use.alt.interword.spacing := +% } +% if$ +% CTLalt_stretch_factor +% empty$ +% { skip$ } +% { CTLalt_stretch_factor +% 'ALTinterwordstretchfactor := +% "\renewcommand{\BIBentryALTinterwordstretchfactor}{" +% ALTinterwordstretchfactor * "}" * +% write$ newline$ +% } +% if$ +% CTLdash_repeated_names +% empty$ +% { skip$ } +% { CTLdash_repeated_names +% yes.no.to.int +% 'is.dash.repeated.names := +% } +% if$ +% CTLname_emph_author_en % 强调显示的作者英文姓名 +% empty$ +% { skip$ } % 若没有给出则跳过 +% { CTLname_emph_author_en +% 'name.emph.author.en := % 否则更新 name.emph.author.en +% } +% if$ +% CTLname_emph_author_zh % 强调显示的作者中文姓名 +% empty$ +% { skip$ } % 若没有给出则跳过 +% { CTLname_emph_author_zh +% 'name.emph.author.zh := % 否则更新 name.emph.author.zh +% } +% if$ + CTLname_format_string % 英文姓名排版格式字符串 + empty$ + { skip$ } % 若没有自定义则跳过 + { CTLname_format_string % 否则更新 name.format.string + 'name.format.string := + } + if$ +% CTLname_latex_cmd +% empty$ +% { skip$ } +% { CTLname_latex_cmd +% 'name.latex.cmd := +% } +% if$ +% CTLname_url_prefix +% missing$ +% { skip$ } +% { CTLname_url_prefix +% 'name.url.prefix := +% } +% if$ + + +% num.names.shown.with.forced.et.al max.num.names.before.forced.et.al > +% { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$ +% max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al := +% } +% { skip$ } +% if$ +} + +%%%%%%%%%%%% +%% 条目别名 +%%%%%%%%%%%% +FUNCTION {mastersthesis} {phdthesis} +FUNCTION {conference} {inproceedings} +FUNCTION {online} {electronic} +FUNCTION {internet} {electronic} +FUNCTION {webpage} {electronic} +FUNCTION {www} {electronic} +FUNCTION {default.type} {misc} + + +%%%%%%%%%% +%% 主程序 +%%%%%%%%%% + +READ + +EXECUTE {initialize.controls} % 初始化控制变量 +EXECUTE {initialize.status.constants} % 初始化状态常量 +EXECUTE {banner.message} % 显示初始提示信息 + +EXECUTE {initialize.longest.label} % 初始化最长的标号 +ITERATE {longest.label.pass} % 处理最长的标号 + +EXECUTE {begin.bib} % 开始 +ITERATE {call.type$} % +EXECUTE {end.bib} % 结束 + +EXECUTE {completed.message} % 显示完成提示信息 + +%% EOF diff --git a/Latex/design pattern/bjtu-thesis-master/LICENSE b/Latex/design pattern/bjtu-thesis-master/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Latex/design pattern/bjtu-thesis-master/README.md b/Latex/design pattern/bjtu-thesis-master/README.md new file mode 100644 index 0000000..111974d --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/README.md @@ -0,0 +1,11 @@ +- 说明: + + 北京交通大学学位论文非官方latex模版,供学习交流使用。 + +- 功能: + + 基本满足北京交通大学专业硕士、学术硕士和博士的学位论文格式要求,但细节之处仍需要完善。 + +- 参考: + + [北京理工大学学位论文latex模版](https://github.com/BIT-thesis/LaTeX-template)。 \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/build.bat b/Latex/design pattern/bjtu-thesis-master/build.bat new file mode 100644 index 0000000..b40b49c --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/build.bat @@ -0,0 +1,8 @@ +del *.log +del *.aux +del *.toc +del *.out +del *.bbl +del *.blg +del chapters\*.aux +del *.synctex.gz \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/build.sh b/Latex/design pattern/bjtu-thesis-master/build.sh new file mode 100644 index 0000000..fcbaccd --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/build.sh @@ -0,0 +1 @@ +rm *.aux *.log *.toc *.synctex.gz *.out chapters/*.aux *.bbl *.blg diff --git a/Latex/design pattern/bjtu-thesis-master/chapters/abstract.tex b/Latex/design pattern/bjtu-thesis-master/chapters/abstract.tex new file mode 100644 index 0000000..7766375 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/chapters/abstract.tex @@ -0,0 +1,5 @@ +\begin{abstract} + [鼠标左键单击选择该段落,输入替换之。内容为小四号宋体。] 中文摘要应将学位论文的内容要点简短明了地表达出来,硕士学位论文一般为500~1000字,博士学位论文一般为1000~2000字。留学生英文版学位论文不少于3000字中文摘要,留学生英文版博士学位论文不少于5000字中文摘要。字体为宋体小四号。内容应包括工作目的、研究方法、成果和结论。要突出本论文的创新点,语言力求精炼。为了便于文献检索,应在本页下方另起一行注明论文的关键词(3-8个),如有可能,尽量采用《汉语主题词表》等词表提供的规范词。图X幅,表X个,参考文献X篇。 + + \keywords{你好;世界} +\end{abstract} \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/chapters/englishabstract.tex b/Latex/design pattern/bjtu-thesis-master/chapters/englishabstract.tex new file mode 100644 index 0000000..692d3d6 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/chapters/englishabstract.tex @@ -0,0 +1,5 @@ +\begin{englishabstract} + English Abstract. + + \englishkeywords{Hello; World} +\end{englishabstract} \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/chapters/thanks.tex b/Latex/design pattern/bjtu-thesis-master/chapters/thanks.tex new file mode 100644 index 0000000..f537507 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/chapters/thanks.tex @@ -0,0 +1,3 @@ +\begin{thanks} +放置在摘要页前,对象包括:1)国家科学基金,资助研究工作的奖学金基金,合同单位,资助或支持的企业、组织或个人。2)协助完成研究工作和提供便利条件的组织或个人。3)在研究工作中提出建议和提供帮助的人。4)给予转载和引用权的资料、图片、文献、研究思想和设想的所有者。5)其他应感谢的组织和个人。 +\end{thanks} \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/demo.bbl b/Latex/design pattern/bjtu-thesis-master/demo.bbl new file mode 100644 index 0000000..46b5da6 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/demo.bbl @@ -0,0 +1,216 @@ +% Generated by BUPTThesis.bst, version: 0.2 (2009/01/25) +\begin{thebibliography}{10} + +\bibitem{a} +刘宁, 郑东霞. +基于UML的多视图软件体系结构描述方法研究~[J]. +计算机应用研究: 173--175. + +\bibitem{Garlan1995Introduction} +Garlan~D, Perry~D~E. +Introduction to the Special Issue on Software Architecture~[M]. +1995. + +\bibitem{ShawSoftware} +Shaw~M, Garlan~D. +Software Architecture : Perspectives on an Emerging Discipline / M. Shaw, D. + Garlan~[J]. + +\bibitem{Allen1994Formalizing} +Allen~R~J, Garlan~D. +Formalizing Architectural Connection~[C]. +In Software Engineering, 1994. Proceedings. ICSE-16., 16th International + Conference on, 1994. + +\bibitem{Ivar1999Unified} +Ivar~J, Grady~B, James~R. +Unified software development process~[J], 1999. + +\bibitem{Kruchten2006The} +Kruchten~P, Obbink~H, Stafford~J. +The Past, Present, and Future for Software Architecture~[J]. +IEEE Software, 2006, 23~(2): 22--30. + +\bibitem{ShawThe} +Shaw~M, Clements~P. +The Golden Age of Software Architecture: A Comprehensive Survey~[J]. + +\bibitem{DashofyA} +Dashofy~E~M, Hoek~A v~d, Taylor~R~N. +A comprehensive approach for the development of modular software architecture + description languages~[J]. +Acm Transactions on Software Engineering \& Methodology: 199--245. + +\bibitem{Mei2002ABC} +Mei~H, Chen~F, Wang~Q, et~al. +ABC/ADL: An ADL Supporting Component Composition~[C]. +In Proceedings of the 4th International Conference on Formal Engineering + Methods: Formal Methods and Software Engineering, 2002. + +\bibitem{Medvidovic2000A} +Medvidovic~N, Taylor~R~N. +A Classification and Comparison Framework for Software Architecture Description + Languages~[C]. +2000. + +\bibitem{Oquendo2004} +Oquendo~F. +\&\#960;-ADL:an Architecture Description Language based on the higher-order typed + \&\#960;-calculus for specifying dynamic and mobile software architectures~[J]. +Acm Sigsoft Software Engineering Notes, 2004. + +\bibitem{Schmuller2004Sams} +Schmuller~J. +Sams Teach Yourself UML in 24 Hours, Complete Starter Kit (3rd Edition)~[M]. +2004. + +\bibitem{b} +孙昌爱, 金茂忠, 刘超. +软件体系结构研究综述~[J]. +软件学报, 2002, 13~(7): 1228--1237. + +\bibitem{c} +梅宏, 申峻嵘. +软件体系结构研究进展~[J]. +软件学报, 2006, 17~(6): 1257--1275. + +\bibitem{d} +朱雪阳. +双重软件体系结构描述框架XYZ/ADL~[J]. +计算机研究与发展, 2007, 44~(9): 1485--1494. + +\bibitem{e} +王晓光, 冯耀东, 梅宏. +ABC/ADL:一种基于XML的软件体系结构描述语言~[J]. +计算机研究与发展, 2004~(9): 1521--1531. + +\bibitem{f} +杨敬中, 戎玫, 张广泉, et~al. +面向方面的软件体系结构描述语言AO-ADL~[J]. +计算机工程, 2008, 34~(10): 80--82. + +\bibitem{g} +毛斐巧, 齐德昱. +软件体系结构风格研究现状及存在的问题~[J]. +计算机应用研究, 2008, 25~(8): 2270--2273. + +\bibitem{h} +李俊娥, 周洞汝. +“平台/插件”软件体系结构风格~[J]. +小型微型计算机系统: 110--115. + +\bibitem{i} +汪保杰, 王如龙. +Customer Relationship Management System Based on Orthogonal Software + Architecture%基于正交软件体系结构的CRM系统~[J]. +计算机工程: 117--120. + +\bibitem{j} +巩绪芳, 周颖, 李必信. +软件体系结构测试技术的现状与思考~[J]: 76--83. + +\bibitem{k} +许慧, 伦立军. +基于π演算的软件体系结构测试技术~[J]. +计算机工程, 2009, 35~(13): 55--57. + +\bibitem{l} +任洪敏, 钱乐秋. +构件组装及其形式化推导研究~[J]. +软件学报: 38--46. + +\bibitem{m} +向俊莲, 杨杰, 梅宏. +基于软件体系结构的构件组装工具ABC-Tool~[J]. +计算机研究与发展, 2004, 41~(6): 956--964. + +\bibitem{apriori} +苗放[1, 2]. +面向数据的软件体系结构初步探讨*~[J]. +计算机科学与探索, 2016~(10). + +\bibitem{la} +王梦佳. +DOA下数据注册方法的初步研究与实现~[D]. +[S.~l.]: 成都理工大学, 2015. + +\bibitem{lb} +李国强. +基于DOA的面向数据的碎片化应用系统构建方法研究~[D]. +[S.~l.]: 成都理工大学, 2015. + +\bibitem{lc} +袁进俊. +DOA下分布式DRC的元数据分级存储模型研究~[D]. +[S.~l.]: 成都理工大学, 2015. + +\bibitem{ld} +刘彬. +分布式数据注册中心数据分区存储策略研究~[D]. +[S.~l.]: 成都理工大学, 2016. + +\bibitem{za} +苗放[1, 2]. +面向数据的软件体系结构初步探讨*~[J]. +计算机科学与探索, 2016~(10). + +\bibitem{zb} +李国强. +基于DOA的面向数据的碎片化应用系统构建方法研究~[D]. +[S.~l.]: 成都理工大学, 2015. + +\bibitem{zc} +谭铁成. +DOA下DAC中用户认证机制及证书授权技术研究~[D]. +[S.~l.]: 成都理工大学, 2015. + +\bibitem{zd} +陈林. +DOA下DAC中数据授权机制及公共密钥基础设施研究~[D]. +[S.~l.]: 成都理工大学, 2015. + +\bibitem{ze} +李晓波, 祝孔强, 贾光宇, et~al. +科学数据共享技术平台构想~[J]. +中国基础科学: 52--57. + +\bibitem{zf} +孙卫, 罗之兰, 张蔚. +科学数据共享平台的数据管理研究~[J]. +科学学与科学技术管理: 34--38. + +\bibitem{DeanMapReduce} +Dean~J, Ghemawat~S. +MapReduce: Simplified Data Processing on Large Clusters~[J]. +Communications of the ACM: p.107--113. + +\bibitem{gamesfromwithin.com} +Noel. +Data-Oriented Design (Or Why You Might Be Shooting Yourself in The Foot With + OOP). +2009. +\url{http://gamesfromwithin.com/data-oriented-design}. + +\bibitem{Hey2009The} +Hey~T, Tansley~S, Tolle~K. +The Fourth Paradigm: Data-Intensive Scientific Discovery~[J]. +Proceedings of the IEEE, 2009, 99~(8): 1334--1337. + +\bibitem{KirkpatrickBig} +Kirkpatrick, Robert. +Big Data for Development~[J]. +Big Data: 3--4. + +\bibitem{tuzipei.baijia.baidu.com} +Zipei~T. +All business digitization: specific ideas of traditional business + transformation. +2015. +\url{http://tuzipei.baijia.baidu.com/article/47068.} + +\bibitem{Labrinidis2012Challenges} +Labrinidis~A, Jagadish~H. +Challenges and opportunities with big data~[J]. +Proceedings of the VLDB Endowment, 2012, 5~(12): 2032--2033. + +\end{thebibliography} diff --git a/Latex/design pattern/bjtu-thesis-master/demo.blg b/Latex/design pattern/bjtu-thesis-master/demo.blg new file mode 100644 index 0000000..6d2e843 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/demo.blg @@ -0,0 +1,92 @@ +This is BibTeX, Version 0.99d (TeX Live 2019/W32TeX) +Capacity: max_strings=100000, hash_size=100000, hash_prime=85009 +The top-level auxiliary file: demo.aux +The style file: GBT7714-2005NLang.bst +Illegal, another \bibstyle command---line 20 of file demo.aux + : \bibstyle + : {unsrt} +I'm skipping whatever remains of this command +Illegal, another \bibstyle command---line 21 of file demo.aux + : \bibstyle + : {unsrt} +I'm skipping whatever remains of this command +Reallocated singl_function (elt_size=4) to 100 items from 50. +Reallocated wiz_functions (elt_size=4) to 6000 items from 3000. +Database file #1: reference/ref.bib +-- BUPTThesis.bst version 0.2 (2009/01/25) by Yu Zhang. +-- http://code.google.com/p/buptthesis/ +-- See the "userguide.pdf" manual for usage information. +Warning--there's neither address nor publisher in Garlan1995Introduction +Warning--empty journal in ShawSoftware +Warning--empty pages in ShawSoftware +Warning--The editor in Allen1994Formalizing is missing. +Warning--empty editor in Allen1994Formalizing +Warning--empty pages in Allen1994Formalizing +Warning--empty journal in Ivar1999Unified +Warning--empty pages in Ivar1999Unified +Warning--empty journal in ShawThe +Warning--empty pages in ShawThe +Warning--The editor in Mei2002ABC is missing. +Warning--empty editor in Mei2002ABC +Warning--empty pages in Mei2002ABC +Warning--empty editor in Medvidovic2000A +Warning--empty booktitle in Medvidovic2000A +Warning--empty pages in Medvidovic2000A +Warning--empty pages in Oquendo2004 +Warning--there's neither address nor publisher in Schmuller2004Sams +Warning--empty journal in j +Warning--empty pages in apriori +Warning--there's a school but no address in la +Warning--there's a school but no address in lb +Warning--there's a school but no address in lc +Warning--there's a school but no address in ld +Warning--empty pages in za +Warning--there's a school but no address in zb +Warning--there's a school but no address in zc +Warning--there's a school but no address in zd +Warning--empty pages in gamesfromwithin.com +Warning--empty pages in tuzipei.baijia.baidu.com + +Done. +You've used 41 entries, + 4577 wiz_defined-function locations, + 1206 strings with 12162 characters, +and the built_in function-call counts, 19123 in all, are: += -- 2216 +> -- 296 +< -- 21 ++ -- 170 +- -- 85 +* -- 1474 +:= -- 2076 +add.period$ -- 121 +call.type$ -- 41 +change.case$ -- 0 +chr.to.int$ -- 0 +cite$ -- 71 +duplicate$ -- 1218 +empty$ -- 2034 +format.name$ -- 85 +if$ -- 4736 +int.to.chr$ -- 0 +int.to.str$ -- 41 +missing$ -- 0 +newline$ -- 207 +num.names$ -- 41 +pop$ -- 153 +preamble$ -- 1 +purify$ -- 0 +quote$ -- 2 +skip$ -- 617 +stack$ -- 0 +substring$ -- 1968 +swap$ -- 387 +text.length$ -- 21 +text.prefix$ -- 0 +top$ -- 5 +type$ -- 469 +warning$ -- 30 +while$ -- 168 +width$ -- 43 +write$ -- 326 +(There were 2 error messages) diff --git a/Latex/design pattern/bjtu-thesis-master/demo.pdf b/Latex/design pattern/bjtu-thesis-master/demo.pdf new file mode 100644 index 0000000..8033dec Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/demo.pdf differ diff --git a/Latex/design pattern/bjtu-thesis-master/demo.tex b/Latex/design pattern/bjtu-thesis-master/demo.tex new file mode 100644 index 0000000..424c01d --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/demo.tex @@ -0,0 +1,408 @@ +\documentclass[article]{BJTU-thesis} +\usepackage{url} +\usepackage{booktabs} +\usepackage{subcaption} +\setcounter{tocdepth}{4} +\setcounter{secnumdepth}{4} +\hypersetup{hidelinks} +\renewcommand\thesection{\arabic {section}} +\renewcommand\thefigure{\arabic {figure}} +%%%%%%%%%%%%%%%填写封面信息%%%%%%%%%%%%%%%%%%%% +%\authora{汤新宇 17301137} +%\authorb{陈嘉琪 17301060} +%\authorc{刘歆怡 17301129} +\authora{{\color{white}哈}唐麒} +\authorb{罗瑶、赵彦阳} +%\authorf{张钰铎 17301145} +%\comment{同{\color{white}哈}等{\color{white}哈}贡{\color{white}哈}献} +%\studentNumber{16121248} +\advisor{尹辉、黄华} +%\advisorTitle{教授} +%\degreeType{学术型} +%\major{机械制造} +%\researchArea{切削力分析} +\title{结构光三维重建软件\\设计模式分析} +\bibliographystyle{unsrt} % BibTex +%\englishtitle{The Path Planning of Blade Machining Tool Based on Cutting Force Analysis.} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%\setmainfont{Times New Roman} +\bibliographystyle{unsrt} % BibTex +\begin{document} + \makecover + + \tableofcontents + \newpage + + \newpage + \setcounter{page}{1} + \section{项目简介} + 近年来,为了适应社会发展的需求,铁路向着高速、重载、高密度运行方向发展,尤其是在高速铁路领域,我国已经成为世界运营里程最长,动车组开行最多的国家。 + + 高铁的轮轨姿态反映了车轮与钢轨之间复杂的动态相互作用和约束关系,掌握他们之间真实接触姿态是保障高速铁路安全运营的重要基础。但仅从二维图像上获取轮轨接触姿态是不精确、不可靠的,需要将轮轨表面的特征点提取出来,重建出一个三维模型,才能更加真实正确地获得轮轨接触姿态。但由于高铁轮轨表面相对光滑且无明显特征点,造成特征不易提取,使得重建精度较差。此外,高铁列车的快速运行速度快也给轮轨表面特征点的提取提出了严峻挑战。 + + 三维重建技术是计算机视觉技术的一个重要分支,是计算机视觉和计算机图像图形学相结合的一个热门研究方向。根据测量时是否与被测物体接触可分为接触式测量与非接触式测量。其中,编码结构光法是一种主动式的非接触式测量方法,具有成本低,精度高,易于实现等优点。 + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.7]{0.png} + \caption{三维重建技术} + \end{figure} + + 编码结构光法利用投影仪投射出的一定模式的编码结构光图案对目标物体进行编码,利用摄像机获取物体图像,通过计算机对所得图像进行解码处理,利用摄像机中的图像点和投影仪中的点对应关系计算物体表面点的空间坐标,获得物体的三维信息,从而还原物体三维形状。 + + \begin{figure}[!htbp] + \centering + \includegraphics{1.png} + \caption{结构光系统} + \end{figure} + + 编码结构光法三维重建技术主要由系统标定、结构光编码、图像获取、结构光解码和三维坐标计算等5个关键技术组成。 + \begin{itemize} + \item 系统标定:结构光系统标定包括摄像机和投影仪的标定,从而获取摄像机和投影仪的内外参数; + \item 结构光编码:通过编码的方式使图像每一点的“身份”可以被识别; + \item 结构光解码:通过一定的解码方案将摄像机采集的投射在目标物体上的结构光图案的二维畸变图像解码; + \item 三维坐标计算:结合标定好的系统参数,由光学三角测距原理获获得物体的三维信息。 + \end{itemize} + + 结构光编码方案依据编码策略主要分为时间编码和空间编码两大类。\textbf{时间编码}结构光法是对目标物体表面投射一系列不同的编码图案,获得一组编码图像序列,标记目标物体上同一点在不同时间点的,经过处理获取这一点的结构光。\textbf{空间编码}结构光法能够通过向目标物体投射一幅编码图案,将获得的编码图像与投影图案对照进行解码,获取物体的三维信息。 + + 空间编码的特点是投影图案只有1幅,图案中每点的码字根据其周围邻近点的信息(如像素值、颜色或几何形状等)得到,适合与动态场景的三维重建。空间编码常用的编码方式主要有基于基于 $De \;Bruijn$ 序列的编码和基于 $M-$ 阵列 的编码。 + + 综上所述,本项目以机器视觉理论和方法为基础,重点研究基于编码结构光的高铁轮轨姿态三维重建方法。通过编码结构光获取轮轨稠密三维点云数据,三维重建高铁轮轨姿态模型,并实现可视化。 + + \section{项目展示} + 近年来,关于编码结构光法三维重建的研究层出不穷。但现有的基于空间编码结构光的重建方法普遍存在计算时间长、点云稠密度低等问题。为了解决现有方案存在的问题,结合本项目的实际运用场景,设计了基于 $De \;Bruijn$ 序列的条纹模式,同时在图像的 V 通道编码了相位信息。在解码的过程中,通过对拍摄获得的图像进行条纹中心点的分析和小波分析,将二者的分析结果相机和,即可提高点云的稠密度,并避免了相位展开引入的误差,在重建速度上也有一定的改善。 + + 在此实验方案的基础上,设计并实现了结构光三维重建软件,根据结构光系统进行三维重建的需求,本软件可分为相机标定、三维重建和点云渲染三个模块,下面分别对三个模块的功能进行介绍。 + \begin{itemize} + \item 系统标定模块 + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{2.png} + \caption{系统标定界面} + \end{figure} + \begin{itemize} + \item[$\blacksquare$] 配置相机和投影仪 + \item[$\blacksquare$] 上传标定图像 + \item[$\blacksquare$] 相机拍摄 + \item[$\blacksquare$] 设置标定板参数 + \item[$\blacksquare$] 相机(相机和投影仪)标定 + \item[$\blacksquare$] 保存标定结果 + \end{itemize} + \newpage + \item 三维重建模块 + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.6]{3.png} + \caption{三维重建界面} + \label{fig:fig1} + \end{figure} + \begin{itemize} + \item[$\blacksquare$] 投影编码图案 + \item[$\blacksquare$] 拍摄投影图像 + \item[$\blacksquare$] 上传本地图像 + \item[$\blacksquare$] 保存拍摄图像 + \item[$\blacksquare$] 进行三维重建 + + \end{itemize} + \item 点云渲染模块 + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.6]{4.png} + \caption{点云渲染界面} + \end{figure} + +\begin{itemize} + \item[$\blacksquare$] 渲染点云 + \item[$\blacksquare$] 改变点云颜色 + \item[$\blacksquare$] 异常点选择和剔除 + \item[$\blacksquare$] 泊松曲面重建 + \item[$\blacksquare$] 导出点云数据 + \item[$\blacksquare$] 使用帮助 + +\end{itemize} + \end{itemize} +  +\section{设计模式的运用} +在软件工程中,设计模式指的是解决软件设计中常见问题的一种通用的,可重用的解决方案,用于详细设计阶段,是为了解决局部的设计问题。设计模式不是一种可以直接转换成代码的集成设计,关注于某一特定的面向对象设计领域的问题,是一种图和解决问题的描述或模板。 + +在本项目中运用了例如单例模式的创建型设计模式\footnote{创建型模式是创建对象,而不是直接实例化对象的模式,可以灵活确定特定情况下创建什么对象。}和代理模式的结构性模式\footnote{结构型模式是将一组对象组合为一个更大的结构体的模式,描述类与对象如何结合组成更大的结构。},在经过分析之后,项目的部分功能实现还可以采用包含责任链模式(一种行为型模式\footnote{行为型模式一种定义系统中对象之间的通信、以及复杂程序中流的控制的模式,行为型模式关心对象之间的通信、流的控制。})在内的其他设计模式,下面对不同的设计模式及其在本项目中的应用进行详细介绍。 +\subsection{单例模式} +  +单例模式是一种创建型模式,他是为了保证一个类只有一个对应的实例被创建,并提供一个指向这一单一实例的全局指针。单例模式的参与者是参与此种模式的类或对象。其类图如下图所示: + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=1]{5.png} + \caption{单例模式类图} + \end{figure} + +\newpage + +参与单例模式的类定义了让用户访问其唯一实例的实例化操作和获取实例方法的操作,其中获取实例方法是一个类操作。此外,这个类还负责创造和维护唯一实例。 + +单例模式有三种实现方式, + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{6.png} + \caption{单例模式实现方法——双重检验锁} +\end{figure} + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{7.png} + \caption{单例模式实现方法——懒汉式,线程不安全} +\end{figure} + + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{8.png} + \caption{单例模式实现方法-静态内部类} +\end{figure} + + 需要注意的是第而中实现方法在多线程的情形下,有可能会创建多个实例。 + + 在本项目中有多处使用单例模式,如类 $Camera$ 和 $Projector$,分别用来初始化、控制相机和投影仪完成标定、拍摄等功能。 + + 正如在上一节所介绍的,本系统由相机、投影仪和计算机三部分组成,软件的部分功能依赖于相机和投影仪,因此需要通过驱动、接口等获得相机、投影仪的实例,从而可以控制相机和投影仪进行拍摄等。 + + 在系统标定模块,投影仪需要在标定板上投影一组图片,相机保持与投影相同的帧率进行拍摄,通过拍摄获得的图片,软件可以进行系统标定,从而获得相机参数(如平移参数、旋转参数、焦距等)。下图或部分拍摄获得的图形。 + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=1]{9.png} + \caption{标定过程拍摄的部分图像} + \end{figure} + + 而在三维重建模块,同样需要投影设计的编码结构光图案(如\ref{fig:fig1}所示),并对经过物体表面调制的图案进行拍摄。因此,在不同的两个模块均需要类 $Camera$ 和 $Projector$ 的实例,而由于在系统标定过程中,对相机的属性进行了改变,标定的结果与这些属性密切相关,如果在三维重建模块重新获得 $Camera$ 的实例进行拍摄,将导致物体三维坐标的计算产生一定的误差。此外,多次对 $Camera$ 和 $Projector$ 两个类进行实例化,也有可能导致异常的发生和资源的浪费。 + + 综上所述,本项目对类 $Camera$ 和 $Projector$ 采用了单例模式,保证相机和投影仪对应的类只有一个对应的实例被创建。 + + 本项目的类图如图\ref{fig:fig5}所示: + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.7]{13.png} + \caption{项目类图} + \label{fig:fig5} + \end{figure} + + 使用单例模式的优劣分别如下: + \begin{itemize} + \item \textbf{优势} + \begin{itemize} + \item[$\blacksquare$] 参与单例模式的类只有一个实例,对单例类的所有实例化得到的都是相同的一个实例。这样就防止其它对象对自己的实例化,确保所有的对象都访问一个实例 + \item[$\blacksquare$] 单例模式具有一定的伸缩性,类自己来控制实例化进程,类就在改变实例化进程上有相应的伸缩性 + \item[$\blacksquare$] 提供了对唯一实例的受控访问 + \item[$\blacksquare$] 由于在系统内存中只存在一个对象,因此可以 节约系统资源,当需要频繁创建和销毁的对象时单例模式无疑可以提高系统的性能 + \item[$\blacksquare$] 避免对共享资源的多重占用。 + \end{itemize} + \item \textbf{劣势} + \begin{itemize} + \item[$\blacksquare$] 单例类的职责过重,在一定程度上违背了“单一职责原则” + \item[$\blacksquare$] 滥用单例将带来一些负面问题,如实例化的对象长时间不被利用,系统会认为是垃圾而被回收,这将导致对象状态的丢失 + \item[$\blacksquare$] 由于单利模式中没有抽象层,因此单例类的扩展有很大的困难 + \end{itemize} + \end{itemize} +\subsection{适配器模式} +适配器模式是一种结构型模式,可以使一个类和接口不匹配的其它类进行交互。适配器将一个类的接口转换为 $Client$ 类期望的另一个接口,让类可以协同工作,否则会因为接口不兼容而无法进行。 + +适配器模式的参与者包括: +\begin{itemize} + \item $Target$:定义 $Client$ 使用的特定于某个域的接口 + \item $Adapter$:将 $Adaptee$ 接口适配到 $get$ 接口 + \item $Adoptee$:定义需要被适配的已有接口 + \item $Client$:与遵循 $Target$ 接口的对象协作 +\end{itemize} + +适配器可以分为两种: +\begin{enumerate} + \item[(1)] \textbf{类适配器:}通过继承实现,从不兼容的类派生出新类并添加我们需要的方法使得派生类满足预期接口 + \item[(2)] \textbf{对象适配器:}通过对象组合实现,新类中包含原始类并且在新类里创建方法以实现调用的转换 +\end{enumerate} + +其类图如图\ref{fig:fig2}和图\ref{fig:fig3}所示: + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{10.png} + \caption{适配器模式类图-类适配器} + \label{fig:fig2} +\end{figure} + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{11.png} + \caption{适配器模式类图-对象适配器} + \label{fig:fig3} +\end{figure} + + + +本项目的用户界面基于 Qt \footnote{Qt 是一个跨平台的 C++ 应用程序开发框架,广泛用于开发 GUI 程序。}开发,相机拍摄的图像将展示在 Qt 开发的用户界面。类 $Camera$ 定义了内部类 $CameraFrame$,包含图像的分辨率(宽度和高度),图像内容和图像信息等,为了将相机视野展示在用户界面上,需要将自定义的 $CameraFrame$ 类转换为 Qt 的图片类 $QImage$。此外,在结构光解码过程中,依赖于 OpenCV\footnote{OpenCV 是一个跨平台的计算机视觉库,可用于开发实时的图像处理、计算机视觉以及模式识别程序。} 对图像进行处理,因此,在对图像进行结构光解码之前,也需要对接口进行转换。 + +本项目主要采用对象适配器,即通过对象组合实现。通过定义新的类 $CVTools$,在新类中包含 $CameraFrame$,$Mat$ 等类的对象,实现不同类型数据对象之间的转换,并定义新的方法提供 $Client$ 类可以调用的转换接口。 + +下面为将 $CameraFrame$ 转换为 OpenCV 中 $Mat$ 的适配器。 + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.8]{12.png} + \caption{CameraFrame-Mat Adapter} +\end{figure} + +其类图如图\ref{fig:fig4}所示: + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{14.png} + \caption{CameraFrame-Mat Adapter} + \label{fig:fig4} +\end{figure} + +其中,$Camera$ 类为相机类,$getFrame()$ 方法控制相机拍摄并获得 $CameraFrame$ 对象,$CoreAlgorithm$ 类为进行结构光解码的类,是 $Client$ 类使用的特定接口,该接口需要 $Mat$ 对象作为输入参数,因此, $CVTools$ 类作为适配器对他们进行匹配,使得其可以协同工作。 + +使用对象适配器的优势在于一个对象适配器可以把多个不同的适配者适配到同一个目标。 +可以适配一个适配者的子类,由于适配器和适配者之间是关联关系,根据“里氏替换原则”,适配者的子类也可通过该适配器进行适配。但与类适配器模式相比,要在适配器中置换适配者类的某些方法比较麻烦。如果一定要置换掉适配者类的一个或多个方法,可以先做一个适配者类的子类,将适配者类的方法置换掉,然后再把适配者类的子类当做真正的适配者进行适配,实现过程较为复杂。 + +\subsection{工厂模式} +工厂模式是一种创建者模式的设计模式,有工厂方法和抽象工厂两种变种。工厂模式的目的在于创建对象的过程中没有暴露对象的初始化逻辑给用户,仅通过一个公共接口引用最新创建的对象。 + +工厂模式适用于当类不能预测要创建哪个类的对象或当类引用其子类去定义要创建的对象的类型以及当对象的创建要局部化三种情形。 + +工厂模式的参与者包括: + +\begin{itemize} + \item Product:定义工厂方法要创建的对象的接口 + \item Concrete Product:实现 Product 接口 + \item Creator:声明工厂方法,返回一个产品类型的对象构造器也可能定义一种缺省的工厂方法,返回一个缺省的 Concrete Product对象 + \item Concrete Creator: 重写工厂方法来获得一个 Concrete Product的实例 +\end{itemize} + +其类图如下图所示: + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{15.png} + \caption{工厂方法类图} +\end{figure} + +点云是在三维重建后获得的物体表面海量点集合,包含点的三维坐标(XYZ)和颜色信息(RGB)。本系统的点云渲染模块主要是对点云的可视化和对用户事件的相应。该模块的开发依赖于PCL\footnote{PCL 是C ++编写的一个开源的点云算法库,支持点云的处理,可用于特征估计,表面重建,模型拟合和分割等}。PCL 中提供的点云对象包括 $PointXYZ$, $PointXYZRGB$, $PointXYZRGBA$, $PointXYZHSV$ 等,目前,项目对点云对象的处理为默认 $PointXYZRGB$ 并提供缺省颜色。其类图如图\ref{fig:fig6}所示。 + +\begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{16.png} + \caption{项目原始类图} + \label{fig:fig6} +\end{figure} + +而通过工厂方法,在载入点云时,可根据点云文件(如$pcd$文件\footnote{PCD全称Point Cloud Data,是一种存储点云数据的文件格式,文件格式头(file format header)说明文件中存储的点云数据的格式。})的头部判断不同的点云对象,从而返回不同类型的点云对象。 + +修改后的类图如图\ref{fig:fig7}所示: + +\begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{17.png} + \caption{项目修改类图} + \label{fig:fig7} +\end{figure} + +其中,$PointCloud$ 是点云对象的接口,定义了修改点云颜色、剔除异常点等方法,$ConcretePointCloud$ 实现了 $PointCloud$ 接口,有不同类型的点云对象。$Loader$ 声明了工厂方法,即从文件中读入点云的方法,$ConcreteLoader$ 重写工厂方法,根据文件中头部声明的不同点云类型来获得不同的 $ConcretePointCloud$ 的实例。 + +在工厂模式下,用户只需要关心所需产品对应的工厂,无须关心创建细节,甚至无须知道具体产品类的类名。使用工厂方法模式的另一个优点是在系统中加入新产品时,无须修改抽象工厂和抽象产品提供的接口,无须修改客户端,也无须修改其他的具体工厂和具体产品,而只要添加一个具体工厂和具体产品就可以了。这样,系统的可扩展性也就变得非常好,完全符合“开闭原则”。但在添加新产品时,需要编写新的具体产品类,而且还要提供与之对应的具体工厂类,系统中类的个数将成对增加,在一定程度上增加了系统的复杂度,有更多的类需要编译和运行,会给系统带来一些额外的开销。 + +\subsection{代理模式} + +代理模式采用代理对象可以给用户提供更好的用户体验(也可以对目标对象的访问进行一定的控制)。例如,当页面还没加载过来的时候,代理对象可以提供一个状态条来显示,页面、图像加载到什么程度。 + +代理模式适用于当需要用简单对象表示复杂对象,或如果一个对象,譬如大的图像,需要很长时间来加载,尤其对象需要通过网络加载,网络负载高时可能很缓慢以及如果对象具有有限访问权限,则代理可以验证该用户的访问权限。 + +代理模式的参与对象包括: +\begin{itemize} + \item Subject:由RealSubject实现的接口并代表其服务 + \item Proxy:维护Proxy访问RealSubject的引用,实现RealSubject实现的相同接口,以便Proxy替代RealSubject, 控制对RealSubject的访问,并可能负责其创建和删除,依赖于代理种类的其他职责 + \item RealSubject:Proxy代表的真实对象 + \end{itemize} +其类图如图\ref{fig:fig8}所示: +\begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{18.png} + \caption{代理模式类图} + \label{fig:fig8} +\end{figure} + +根据第二节的描述,本系统旨在对轮轨表面进行稠密重建,项目进行到现在,已经实现了在半径 95 mm 的球体单表面提取 17 W+ 的点云数据。在三维重建进行坐标计算的过程中或在将这些点云数据导入软件的过程中,由于数据量大而容易造成界面假死。 + +而项目使用代理模式即可解决这一问题。由于数据体量大,加载时间过长,可以在加载的时候辟一个线程,在新的线程中加载,加载完成后通过delegate协议将点云对象传给界面。在加载的过程中,可以通过进度条或加载界面等方式提示用户加载进度等。 + +项目的类图如图\ref{fig:fig9}所示: + +\begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{19.png} + \caption{项目类图} + \label{fig:fig9} +\end{figure} + +使用代理模式可以协调调用者和被调用者,在一定程度上降低了系统的耦合度。远程代理使得客户端可以访问在远程机器上的对象,远程机器可能具有更好的计算性能与处理速度,可以快速响应并处理客户端请求。虚拟代理通过使用一个小对象来代表一个大对象,可以减少系 统资源的消耗,对系统进行优化并提高运行速度。保护代理可以控制对真实对象的使用权限。但由于在客户端和真实主题之间增加了代理对象,因此 有些类型的代理模式可能会造成请求的处理速度变慢。而且实现代理模式需要额外的工作,有些代理模式的实现非常复杂。 + + +\subsection{责任链模式} + 责任链模式通过为多个对象提供处理请求的机会,避免将请求的发送者耦合到其接受者。责任链模式将接收对象链接并沿链传递请求,直到对象处理它。链上的每个对象共享一个公共接口,用于处理请求和访问链上的后继者。 + + 责任链模式适用于当多个对象可以处理请求且事先不知道实际处理对象或当请求遵循“处理或转发”模型,也就说某些请求可在生成的地方处理,而其他请求必须转发到另一个对象处理以及希望能够动态修改可处理请求的对象集。此方法为在对象间分配职责提供了额外的灵活性。 + + 责任链模式的参与者包含: + \begin{itemize} + \item Handler:定义处理请求的接口,实现后继链接 + \item ConcreteHandler:处理他负责的请求,可以访问其继任者,如果 ConcreteHandler 可以处理请求,他会这样做,否则他会将请求转发给其继任者 + \item Client:启动对链上的 ConcreteHandler 对象的请求 + \end{itemize} + + 其类图如图\ref{fig:fig10}所示: + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.45]{20.png} + \caption{责任链模式类图} + \label{fig:fig10} + \end{figure} +\newpage + 在本项目中,导入时读取的点云文件可能有多种文件类型,如 $pcd$, $ply$ 或 $txt$ 等。不同的文件格式需要调用不同的方法,现有项目通过判断文件类型来选择调用的方法,这样的设计不利于系统的扩展,当需要读取新的文件格式时,软件只能以修改源代码的方式满足需求,而不是以扩展的方式,违反了开放封闭原则。 + + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.5]{21.png} + \caption{项目原始类图} + \end{figure} + + 其中,方法 $LoadFromFile()$ 通过 $if-else$ 判断不同的文件类型,调用不同的方法。 + + 而进行重新设计使用责任链模式,链上的每个对象可以对文件类型进行判断,看是否可以进行处理,如果可以处理则将点云从文件中读入,否则将文件传给链上的后继。若最后没有对象可以处理该文件类型,则抛出警告或根据需要对软件进行扩展,添加新的对象处理该文件类型。 + + 修改后的项目类图如下图所示: + \begin{figure}[!htbp] + \centering + \includegraphics[scale=0.4]{22.png} + \caption{项目修改类图} + \end{figure} + + 责任链模式有多种实现方法,本项目的实现拟采用在 Handler 接口中添加接收描述请求类型的修改方法,这种实现方法没有冗余且符合开放封闭原则。 + + 使用责任链模式的优点是链可以动态地修改,即可以根据需要动态地扩展软件处理文件的对象,缺点是必须分别在每个模块中实现链接,发送和转发代码。 + + \section{项目总结} + 通过本文对结构光三维重建软件中已经运用的设计模式和可通过设计模式进行的改进分析,我们发现设计模式的运用可以解决软件设计和实现中存在的一些问题,通过这些可重用的解决方案优化软件的设计与实现。 + + 总体来说,设计模式的运用有以下几点好处: + \begin{enumerate} + \item[(1)] 复用解决方案——通过复用已经公认的设计,我能够在解决问题时取得先发优势,而且避免重蹈前人覆辙。我可以从学习他人的经验中获益,用不着为那些总是会重复出现的问题再次设计解决方案了。 + + \item[(2)] 确立通用术语——开发中的交流和协作都需要共同的词汇基础和对问题的共识。设计模式在项目的分析和设计阶段提供了共同的基准点。 + + \item[(3)] 提高观察高度--模式还为我们提供了观察问题、设计过程和面向对象的更高层次的视角,这将使我们从“过早处理细节”的桎梏中解放出来。 + + \item[(4)] 大多数设计模式还能使软件更容易修改和维护。其原因在于,它们都是久经考验的解决方案。所以,它们的结构都是经过长期发展形成的,比新构思的解决方案更善于应对变化。而且,这些模式所用代码往往更易于理解——从而使代码更易维护。 + \end{enumerate} + + + + +\end{document} \ No newline at end of file diff --git a/Latex/design pattern/bjtu-thesis-master/logo.png b/Latex/design pattern/bjtu-thesis-master/logo.png new file mode 100644 index 0000000..f34193a Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/logo.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/model1.png b/Latex/design pattern/bjtu-thesis-master/model1.png new file mode 100644 index 0000000..2fd74ff Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/model1.png differ diff --git a/Latex/design pattern/bjtu-thesis-master/reference/ref.bib b/Latex/design pattern/bjtu-thesis-master/reference/ref.bib new file mode 100644 index 0000000..f3e38c3 --- /dev/null +++ b/Latex/design pattern/bjtu-thesis-master/reference/ref.bib @@ -0,0 +1,337 @@ +@article{apriori, + title={面向数据的软件体系结构初步探讨*}, + author={苗放[1 and 2]}, + journal={计算机科学与探索}, + number={10}, + year={2016}, +} + +@phdthesis{la, title={DOA下数据注册方法的初步研究与实现}, author={王梦佳}, school={成都理工大学}, year={2015}, } +@phdthesis{lb, title={基于DOA的面向数据的碎片化应用系统构建方法研究}, author={李国强}, school={成都理工大学}, year={2015}, } +@phdthesis{lc, title={DOA下分布式DRC的元数据分级存储模型研究}, author={袁进俊}, school={成都理工大学}, year={2015}, } +@phdthesis{ld, title={分布式数据注册中心数据分区存储策略研究}, author={刘彬}, school={成都理工大学}, year={2016}, } + +@article{a, + title={基于UML的多视图软件体系结构描述方法研究}, + author={刘宁 and 郑东霞}, + journal={计算机应用研究}, + number={11}, + pages={173-175}, +} + +@book{Garlan1995Introduction, + title={Introduction to the Special Issue on Software Architecture}, + author={Garlan, David and Perry, Dewayne E}, + year={1995}, + abstract={Abstract Maintaining the consistency of multiple program representations¿such as abstract syntax trees and program dependence graphs¿in a program manipulation tool is difficult. This paper describes a hybrid software architecture for a meaning-preserving program ...}, +} + +@article{ShawSoftware, + title={Software Architecture : Perspectives on an Emerging Discipline / M. Shaw, D. Garlan}, + author={Shaw, Mary and Garlan, David}, + abstract={Publisher’s description: Shaw and Garland examine the useful abstractions and paradigms of system design as well as key notations and tools. They present an introduction to software architecture that illustrates the current state of the discipline and examines ways in which architectural issues can impact software design.}, +} + +@inproceedings{Allen1994Formalizing, + title={Formalizing Architectural Connection}, + author={Allen, Robert J. and Garlan, David}, + booktitle={Software Engineering, 1994. Proceedings. ICSE-16., 16th International Conference on}, + year={1994}, + abstract={As software systems become more complex the overall system structure - or software architecture - becomes a central design problem. An important step towards an engineering discipline of software is a formal basis for describing and analyzing these designs. We present a theory for one aspect of architectural description, the interactions between components. The key idea is to define architectural connectors as explicit semantic entities. These are specified as a collection of protocols that characterize each of the participant roles in an interaction and how these roles interact. We illustrate how this scheme can be used to define a variety of common architectural connectors. We provide a formal semantics and show how this lends to a sound deductive system in which architectural compatibility can be checked in a way analogous to type checking in programming languages}, +} + +@article{Ivar1999Unified, + title={Unified software development process}, + author={Ivar, Jacobson and Grady, Booch and James, Rumbaugh}, + year={1999}, + abstract={This guide overviews the Unified Process for software development, with a focus on modeling using the Unified Modeling Language (UML). It demonstrates how the notation and process complement on another, using UML models to illustrate the new process in action. The authors describe semantics and notation of the different higher-level constructs used on the models. Constructs such as use cases, actors, subsystems, classes, interfaces, active classes, processes, threads, nodes, and most relations are described in the context of a model. ^^^^ Annotation c. Book News, Inc., Portland, OR (booknews.com) (Book News)}, +} + +@article{Kruchten2006The, + title={The Past, Present, and Future for Software Architecture}, + author={Kruchten, P. and Obbink, H. and Stafford, J.}, + journal={IEEE Software}, + volume={23}, + number={2}, + pages={22-30}, + year={2006}, + abstract={It's been 10 years since David Garlan and Mary Shaw wrote their seminal book Software Architecture Perspective on an Emerging Discipline, since Maarten Boasson edited a special issue of IEEE Software on software architecture, and since the first International Software Architecture Workshop took place. What has happened over these 10 years? What have we learned? Where do we look for information? What's the community around this discipline? And where are we going from here?This article is part of a focus section on software architecture.}, +} + +@article{ShawThe, + title={The Golden Age of Software Architecture: A Comprehensive Survey}, + author={Shaw, Mary and Clements, Paul}, + abstract={Abstract This retrospective on nearly two decades of software architecture research examines the maturation of the software architecture research area by tracing the evolution of research questions and results through their maturation cycle. We show how early qualitative results set the stage for later precision, formality, and automation, how results have built up over time, and how the research results have moved into practice.}, +} + +@article{DashofyA, + title={A comprehensive approach for the development of modular software architecture description languages}, + author={Dashofy, Eric M. and Hoek, André van der and Taylor, Richard N.}, + journal={Acm Transactions on Software Engineering & Methodology}, + volume={14}, + number={2}, + pages={199-245}, + abstract={We have developed an approach that allows for the rapid construction of new architecture description languages (ADLs). Our approach is unique because it encapsulates ADL features in modules that are composed to form ADLs. We achieve this by leveraging the extension mechanisms provided by XML and XML schemas. We have defined a set of generic, reusable ADL modules called xADL 2.0, useful as an ADL by itself, but also extensible to support new applications and domains. To support this extensibility, we have developed a set of reflective syntax-based tools that adapt to language changes automatically, as well as several semantically-aware tools that provide support for advanced features of xADL 2.0. We demonstrate the effectiveness, scalability, and flexibility of our approach through a diverse set of experiences. First, our approach has been applied in industrial contexts, modeling software architectures for aircraft software and spacecraft systems. Second, we show how xADL 2.0 can be extended to support the modeling features found in two different representations for modeling product-line architectures. Finally, we show how our infrastructure has been used to support its own development. The technical contribution of our infrastructure is augmented by several research contributions: the first decomposition of an architecture description language into modules, insights about how to develop new language modules and a process for integrating them, and insights about the roles of different kinds of tools in a modular ADL-based infrastructure}, +} + +@inproceedings{Mei2002ABC, + title={ABC/ADL: An ADL Supporting Component Composition}, + author={Mei, Hong and Chen, Feng and Wang, Qianxiang and Feng, Yao Dong}, + booktitle={Proceedings of the 4th International Conference on Formal Engineering Methods: Formal Methods and Software Engineering}, + year={2002}, + abstract={Architecture Description Language (ADL) is one of the keys to software architecture research, but most attention was paid to the description of software structure and high-level analysis of some syste}, +} + +@inproceedings{Medvidovic2000A, + title={A Classification and Comparison Framework for Software Architecture Description Languages}, + author={Medvidovic, Nenad and Taylor, Richard N.}, + year={2000}, + abstract={Abstract鈥擲oftware architectures shift the focus of developers from lines-of-code to coarser-grained architectural elements and their overall interconnection structure. Architecture description languages (ADLs) have been proposed as modeling notations to support architecture-based development. There is, however, little consensus in the research community on what is an ADL, what aspects of an architecture should be modeled in an ADL, and which of several possible ADLs is best suited for a particular problem. Furthermore, the distinction is rarely made between ADLs on one hand and formal specification, module interconnection, simulation, and programming languages on the other. This paper attempts to provide an answer to these questions. It motivates and presents a definition and a classification framework for ADLs. The utility of the definition is demonstrated by using it to differentiate ADLs from other modeling notations. The framework is used to classify and compare several existing ADLs, enabling us, in the process, to identify key properties of ADLs. The comparison highlights areas where existing ADLs provide extensive support and those in which they are deficient, suggesting a research agenda for the future.}, +} + +@article{Oquendo2004, + title={π-ADL:an Architecture Description Language based on the higher-order typed π-calculus for specifying dynamic and mobile software architectures}, + author={Oquendo, Flavio}, + journal={Acm Sigsoft Software Engineering Notes}, + year={2004}, + abstract={A key aspect of the design of any software system is its architecture. An architecture description, from a runtime perspective, should provide a formal specification of the architecture in terms of components and connectors and how they are composed together. Further, a dynamic or mobile architecture description must provide a specification of how the architecture of the software system can change at runtime. Enabling specification of dynamic and mobile architectures is a large challenge for an Architecture Description Language (ADL). This article describes π-ADL, a novel ADL that has been designed in the ArchWare European Project to address specification of dynamic and mobile architectures. It is a formal, well-founded theoretically language based on the higher-order typed π-calculus. While most ADLs focus on describing software architectures from a structural viewpoint, π-ADL focuses on formally describing architectures encompassing both the structural and behavioural viewpoints. The π-ADL design principles, concepts and notation are presented. How π-ADL can be used for specifying static, dynamic and mobile architectures is illustrated through case studies. The π-ADL toolset is outlined.}, +} + +@book{Schmuller2004Sams, + title={Sams Teach Yourself UML in 24 Hours, Complete Starter Kit (3rd Edition)}, + author={Schmuller, Joseph}, + year={2004}, +} + +@article{b, + title={软件体系结构研究综述}, + author={孙昌爱 and 金茂忠 and 刘超}, + journal={软件学报}, + volume={13}, + number={7}, + pages={1228-1237}, + year={2002}, + abstract={摘 要: 近年来,软件体系结构逐渐成为软件工程领域的研究热点以及大型软件系统与软件产品线开发中的关键技术之一,归纳了软件体系结构技术发展过程及其主要研究方向,在分析了典型的软件体系结构概念之后,给出了软件体系结构的定义,通过总结软件体系结构领域的若干研究活动,提出了软件体系结构研究的两大思路,并从7个方面介绍了软件体系结构研究进展,探讨了软件体系结构研究中的不足之处,并分析其原因,作为总结,给出了软件体系结构领域最有前途的发展趋势。}, +} + +@article{c, + title={软件体系结构研究进展}, + author={梅宏 and 申峻嵘}, + journal={软件学报}, + volume={17}, + number={6}, + pages={1257-1275}, + year={2006}, + abstract={作为控制软件复杂性、提高软件系统质量、支持软件开发和复用的重要手段之一,软件体系结构自提出以来,日益受到软件研究者和实践者的关注,并发展成为软件工程的一个重要的研究领域.如今,软件体系结构的研究也开始超出传统的对软件设计阶段的支持,逐步扩展到整个软件生命周期.基于软件体系结构近十年来的研究进展,综述了在软件生命周期的不同阶段软件体系结构的研究与应用,并探讨了软件体系结构领域的发展与研究方向.}, +} + +@article{d, + title={双重软件体系结构描述框架XYZ/ADL}, + author={朱雪阳}, + journal={计算机研究与发展}, + volume={44}, + number={9}, + pages={1485-1494}, + year={2007}, + abstract={体系结构设计在软件开发过程中扮演着重要角色.工程中常用图形语言为软件体系结构建模,它们有直观、半形式化的优点;但是语义不够精确,难以对它们表示的模型进行分析,在这方面,形式化方法可与之互补.但在工程使用中仅用形式化语言建模又不太现实,所以如何结合二者之长以提高软件的可靠性已成为工业界和学术界共同关心的问题.提出了双重软件体系结构描述框架XYZ/ADL:支持工程中软件体系结构的基本概念,前端用一般的体系结构框图作为结构描述,用UML活动图、状态图作为抽象行为表示;后端用既可表示系统动态语义又可表示系统静态语义的时序逻辑语言XYZ/E作为一致的语义基础.前端的图形语言便于软件工程师的交流和使用,后端的形式语言是进一步的形式化分析验证的基础.}, +} + +@article{e, + title={ABC/ADL:一种基于XML的软件体系结构描述语言}, + author={王晓光 and 冯耀东 and 梅宏}, + journal={计算机研究与发展}, + number={9}, + pages={1521-1531}, + year={2004}, + abstract={摘 要: 作为基于构件的软件开发过程的系统蓝图,软件体系结构(SA)扮演了非常重要的角色,其研究受到越来越多的关注.而软件体系结构描述语言(ADL)是研究和应用SA的基础.提出了一种基于XML的体系结构描述语言--ABC/ADL. ABC/ADL具备大多数ADL描述软件系统高层结构的能力,还支持系统的逐步精化与演化,并支持系统的自动化组装和验证.采用数据互操作标准XML作为元语言,不仅使ABC/ADL具有与其他ADL的互操作性,还有助于实现设计阶段的制品与其他软件生命周期阶段制品之间的可追踪性.}, +} + +@article{f, + title={面向方面的软件体系结构描述语言AO-ADL}, + author={杨敬中 and 戎玫 and 张广泉 and YANGJing-zhong and RONGMei and ZHANGGuang-quan}, + journal={计算机工程}, + volume={34}, + number={10}, + pages={80-82}, + year={2008}, + abstract={分析面向方面编程(AOP)的核心思想及其优越性,将编码阶段的AOP概念进一步提升到软件体系结构层次.在软件体系结构描述语言XYZ/ADL的基础上,通过增加新的元素和相关复合机制,得到一种面向方面的体系结构描述语言AO-ADL,实现了在软件体系结构中横切功能的模块化.}, +} + +@article{g, + title={软件体系结构风格研究现状及存在的问题}, + author={毛斐巧 and 齐德昱}, + journal={计算机应用研究}, + volume={25}, + number={8}, + pages={2270-2273}, + year={2008}, + abstract={摘 要: 针对现有软件体系结构风格定义在客观性和全面性方面存在的不足,从客观角度出发,站在软件工程的高度从多个方面对软件体系结构风格进行定义;同时通过研究分析软件体系结构风格的研究现状,发现并指出其四个重点研究方向及各自存在的问题。}, +} + +@article{h, + title={“平台/插件”软件体系结构风格}, + author={李俊娥 and 周洞汝}, + journal={小型微型计算机系统}, + number={5}, + pages={110-115}, + abstract={体系结构发现是软件体系结构研究领域的一个重要方向.近年出现的“平台+插件”软件设计方法,使得发布后的软件产品可以方便地通过安装插件模块而扩展其功能.然而,迄今为止,未见资料将这种结构从软件体系结构的高度进行提炼和描述.本文提出“平台+插件”的软件设计方法是一种软件体系结构风格,并将其称为“平台/插件(Platform/Plug-in)”风格,简写为“P/P风格”.由于软件体系结构和体系结构风格的概念还没有一个标准的定义,文中首先定义了本文使用的模型和概念;研究了“平台/插件”结构应用程序的特点和分类,分析了该类程序的架构,在本文定义的软件体系结构模型的基础上,用统一建模语言UML描述了P/P体系结构风格及P/P风格软件的开发过程.本文工作为需要动态扩展功能的大型软件开发提供了一种可复用的体系结构风格,可以认为,P/P风格是可扩展和可增量升级软件系统的领域体系结构模型.}, +} + +@article{i, + title={Customer Relationship Management System Based on Orthogonal Software Architecture%基于正交软件体系结构的CRM系统}, + author={汪保杰 and 王如龙}, + journal={计算机工程}, + volume={035}, + number={24}, + pages={117-120}, + abstract={为解决软件体系结构在应用软件领域难以实施的问题,避免软件开发的盲目性,提高软件质量,通过对正交软件体系结构理论的研究,给出其在客户关系管理系统中的运用.事实证明,正交软件体系结构具有结构清晰、易于理解和修改、重用力度大等优点.}, +} + +@article{j, + title={软件体系结构测试技术的现状与思考}, + author={巩绪芳 and 周颖 and 李必信}, + number={8}, + pages={76-83}, + abstract={软件体系结构经过10年的研究和发展取得了一系列可喜的成就.目前,一些有代表性的软件测试策略被研究人员提议用于软件体系结构的测试.但是,传统的软件测试技术和方法不能直接用来解决软件体系结构的测试问题,需要改进传统的软件测试技术和方法,或者开发新的软件体系结构测试技术和方法,使之能够更好地解决软件体系结构测试中存在的问题.本文概述了软件体系结构测试策略的研究现状,剖析了影响软件软件体系结构测试的因素,并讨论了软件体系结构分析与测试的未来研究主题.}, +} + +@article{k, + title={基于π演算的软件体系结构测试技术}, + author={许慧 and 伦立军}, + journal={计算机工程}, + volume={35}, + number={13}, + pages={55-57}, + year={2009}, + abstract={针对目前体系结构描述语言对描述软件系统行为方面的不足而难以生成实时测试路径的问题,提出一种基于π演算的软件体系结构测试方法,该方法包括π演算与Petri网结合、构造体系结构模型及测试路径生成算法。实验证明,该算法能够根据测试覆盖准则生成相应的测试路径,实现体系结构模型的动态性和测试技术的有效性。}, +} + +@article{l, + title={构件组装及其形式化推导研究}, + author={任洪敏 and 钱乐秋}, + journal={软件学报}, + number={6}, + pages={38-46}, + abstract={基于构件的软件工程(component based software engineering,简称CBSE)能够有效地提高软件开发的质量和效率.构件组装和组装推导(compositional reasoning)是CBSE的关键技术.基于软件构件的特点,借鉴进程代数中进程构造的方法,提出6种构件组装机制,能够灵活、简便地集成软件构件,并主张在构件组装的同时进行接口组装,通过生成功能更强、抽象级别更高的复合接口,提高构件组装的抽象级别和粒度.同时,基于Wright的形式化规约软件体系结构的研究,给出了复合构件和复合接口的组装推导算法,为系统行为的形式化分析、验证和仿真奠定了基础.}, +} + +@article{m, + title={基于软件体系结构的构件组装工具ABC-Tool}, + author={向俊莲 and 杨杰 and 梅宏}, + journal={计算机研究与发展}, + volume={41}, + number={6}, + pages={956-964}, + year={2004}, + abstract={摘 要: 软件朝着越来越复杂和庞大的趋势发展,因此对更有效的软件开发技术的需求十分迫切.近年来,软件体系结构、构件技术和软件复用技术等开始在软件开发中发挥重要作用,成为软件工程领域研究的热点.在基于构件复用的开发方法中,构件组装技术是关键,而且一直以来也是难点所在.ABC(architecture-based component composition)是一种基于软件体系结构、面向构件的软件开发方法.介绍了为ABC方法提供有效支持的工具ABC-Tool,ABC-Tool以软件体系结构为设计蓝图,以构件为基本开发单元,在不修改构件源代码的前提下,通过可视化的图形建模方式,从体系结构的高层设计逐层映射到底层实现,将可运行或可部署的构件组装为最终的可正确运行的系统.}, +} + +@article{za, + title={面向数据的软件体系结构初步探讨*}, + author={苗放[1 and 2]}, + journal={计算机科学与探索}, + number={10}, + year={2016}, +} + +@phdthesis{zb, + title={基于DOA的面向数据的碎片化应用系统构建方法研究}, + author={李国强}, + school={成都理工大学}, + year={2015}, + } + +@phdthesis{zc, + title={DOA下DAC中用户认证机制及证书授权技术研究}, + author={谭铁成}, + school={成都理工大学}, + year={2015}, +} + +@phdthesis{zd, + title={DOA下DAC中数据授权机制及公共密钥基础设施研究}, + author={陈林}, + school={成都理工大学}, + year={2015}, +} + +@Misc{ + gamesfromwithin.com, + author = "Noel", + title = "Data-Oriented Design (Or Why You Might Be Shooting Yourself in The Foot With OOP)", + howpublished = "Website", + year = {2009}, + note = {\url{http://gamesfromwithin.com/data-oriented-design}} +} + +@Misc{ + tuzipei.baijia.baidu.com, + author = "Tu Zipei", + title = "All business digitization: specific ideas of traditional business transformation", + howpublished = "Website", + year = {2015}, + note = {\url{http://tuzipei.baijia.baidu.com/article/47068.}} +} + +@article{ze, + title={科学数据共享技术平台构想}, + author={李晓波 and 祝孔强 and 贾光宇 and 徐枫 and 李集明}, + journal={中国基础科学}, + number={01}, + pages={52-57}, + abstract={进入21世纪的信息时代,科学数据对于社会和经济发展以及国家安全保障的作用更加显著,特别是科技创新直接源于科学数据的积累与应用。然而,科学数据作为一种新的战略资源和财富,只有被更多的人所共享,才能显示出其宝贵的价值。}, +} + +@article{zf, + title={科学数据共享平台的数据管理研究}, + author={孙卫 and 罗之兰 and 张蔚}, + journal={科学学与科学技术管理}, + number={12}, + pages={34-38}, + abstract={运用公共经济学等相关理论对科学数据共享平台的数据进行了分类,提出了以数据付费管理、数据标准化管理和数据收费管理为核心内容的平台数据管理框架,建立了付费管理、数据标准化管理和数据收费管理的方法体系,为我国科学数据共享平台建设的不断推进和有效的数据管理提供了重要的思路和政策参考。}, +} + +@article{DeanMapReduce, + title={MapReduce: Simplified Data Processing on Large Clusters}, + author={Dean, Jeffrey and Ghemawat, Sanjay}, + journal={Communications of the ACM}, + volume={51}, + number={1}, + pages={p.107-113}, + abstract={MapReduce is a programming model and an associated implementation for processing and generating large datasets that is amenable to a broad variety of real-world tasks. Users specify the computation in terms of a map and a reduce function, and the underlying runtime system automatically parallelizes the computation across large-scale clusters of machines, handles machine failures, and schedules inter-machine communication to make efficient use of the network and disks. Programmers find the system easy to use: more than ten thousand distinct MapReduce programs have been implemented internally at Google over the past four years, and an average of one hundred thousand MapReduce jobs are executed on Google's clusters every day, processing a total of more than twenty petabytes of data per day.}, +} + +@article{KirkpatrickBig, + title={Big Data for Development}, + author={Kirkpatrick and Robert}, + journal={Big Data}, + volume={1}, + number={1}, + pages={3-4}, + abstract={where mobile phone use goes be- yond phone calls to trade and ``OUR WORK IS FOCUSED ON As promising as this work has banking. In those countries, mo- bile data can certainly tell compa- nies what types of bank products are most popular with users. ThatTHE EXPLOSION OF BIG DATA,ESPECIALLY IN THE PLACESWHERE THE U.N. DOES ITSbeen, however, significant ques-tions remain about how big dataanalysis can be practically inte-grated into UN systems. We know, same data could also hold infor-MOST CRUCIAL WORK.''for example, that the real-time na- mation about the well-being ofture of big data will definitely im- the vulnerable populations the UNprove development programs. In a serves.world of fast-moving, global shocks like the recent financialrecession, traditional data collection methods like door-to- Consider that in recent years, MIT researchers have founddoor household surveys have become woefully inadequate. evidence that changes in mobile phone calling patterns can be used to detect flu outbreaks.1 In addition, a Telefo麓 nica Re-What we at Global Pulse are still not sure about is exactly search team has demonstrated that calling patterns can bewhat types of digital data sources would be most useful to the}, +} + +@article{Hey2009The, + title={The Fourth Paradigm: Data-Intensive Scientific Discovery}, + author={Hey, Tony and Tansley, Stewart and Tolle, Kristin}, + journal={Proceedings of the IEEE}, + volume={99}, + number={8}, + pages={1334-1337}, + year={2009}, + abstract={This book presents the first broad look at the rapidly emerging field of data-intensive science, with the goal of influencing the worldwide scientific and computing research communities and inspiring the next generation of scientists. Increasingly, scientific breakthroughs will be powered by advanced computing capabilities that help researchers manipulate and explore massive datasets. The speed at which any given scientific discipline advances will depend on how well its researchers collaborate with one another, and with technologists, in areas of eScience such as databases, workflow management, visualization, and cloud-computing technologies. This collection of essays expands on the vision of pioneering computer scientist Jim Gray for a new, fourth paradigm of discovery based on data-intensive science and offers insights into how it can be fully realized.}, +} + +@article{Labrinidis2012Challenges, + title={Challenges and opportunities with big data}, + author={Labrinidis, Alexandros and H.V. Jagadish}, + journal={Proceedings of the VLDB Endowment}, + volume={5}, + number={12}, + pages={2032-2033}, + year={2012}, + abstract={The promise of data-driven decision-making is now being recognized broadly, and there is growing enthusiasm for the notion of ``Big Data.鈥欌While the promise of Big Data is real -- for example, it is estimated that Google alone contributed 54 billion dollars to the US economy in 2009 -- there is currently a wide gap between its potential and its realization.Heterogeneity, scale, timeliness, complexity, and privacy problems with Big Data impede progress at all phases of the pipeline that can create value from data. The problems start right away during data acquisition, when the data tsunami requires us to make decisions, currently in an ad hoc manner, about what data to keep and what to discard, and how to store what we keep reliably with the right metadata. Much data today is not natively in structured format; for example, tweets and blogs are weakly structured pieces of text, while images and video are structured for storage and display, but not for semantic content and search: transforming such content into a structured format for later analysis is a major challenge. The value of data explodes when it can be linked with other data, thus data integration is a major creator of value. Since most data is directly generated in digital format today, we have the opportunity and the challenge both to influence the creation to facilitate later linkage and to automatically link previously created data. Data analysis, organization, retrieval, and modeling are other foundational challenges. Data analysis is a clear bottleneck in many applications, both due to lack of scalability of the underlying algorithms and due to the complexity of the data that needs to be analyzed. Finally, presentation of the results and its interpretation by non-technical domain experts is crucial to extracting actionable knowledge.During the last 35 years, data management principles such as physical and logical independence, declarative querying and cost-based optimization have led, during the last 35 years, to a multi-billion dollar industry. More importantly, these technical advances have enabled the first round of business intelligence applications and laid the foundation for managing and analyzing Big Data today. The many novel challenges and opportunities associated with Big Data necessitate rethinking many aspects of these data management platforms, while retaining other desirable aspects. We believe that appropriate investment in Big Data will lead to a new wave of fundamental technological advances that will be embodied in the next generations of}, +} + + + diff --git a/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学博士、硕士学位论文撰写规范.doc b/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学博士、硕士学位论文撰写规范.doc new file mode 100644 index 0000000..b1aff24 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学博士、硕士学位论文撰写规范.doc differ diff --git a/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学学术硕士、博士学位论文模板.doc b/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学学术硕士、博士学位论文模板.doc new file mode 100644 index 0000000..fc59b62 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学学术硕士、博士学位论文模板.doc differ diff --git a/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学工程硕士专业学位论文模板.doc b/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学工程硕士专业学位论文模板.doc new file mode 100644 index 0000000..8be55b4 Binary files /dev/null and b/Latex/design pattern/bjtu-thesis-master/word-version/北京交通大学工程硕士专业学位论文模板.doc differ diff --git a/Latex/design pattern/img/0.png b/Latex/design pattern/img/0.png new file mode 100644 index 0000000..7b968d3 Binary files /dev/null and b/Latex/design pattern/img/0.png differ diff --git a/Latex/design pattern/img/1.eddx b/Latex/design pattern/img/1.eddx new file mode 100644 index 0000000..587b0f5 Binary files /dev/null and b/Latex/design pattern/img/1.eddx differ diff --git a/Latex/design pattern/img/1.png b/Latex/design pattern/img/1.png new file mode 100644 index 0000000..5896743 Binary files /dev/null and b/Latex/design pattern/img/1.png differ diff --git a/Latex/design pattern/img/2.eddx b/Latex/design pattern/img/2.eddx new file mode 100644 index 0000000..4f77673 Binary files /dev/null and b/Latex/design pattern/img/2.eddx differ diff --git a/Latex/design pattern/img/2.png b/Latex/design pattern/img/2.png new file mode 100644 index 0000000..50da055 Binary files /dev/null and b/Latex/design pattern/img/2.png differ diff --git a/Latex/design pattern/img/3.eddx b/Latex/design pattern/img/3.eddx new file mode 100644 index 0000000..3bd9a4c Binary files /dev/null and b/Latex/design pattern/img/3.eddx differ diff --git a/Latex/design pattern/img/3.png b/Latex/design pattern/img/3.png new file mode 100644 index 0000000..223dfa7 Binary files /dev/null and b/Latex/design pattern/img/3.png differ diff --git a/Latex/design pattern/新建Microsoft Visio Drawing.vsdx b/Latex/design pattern/新建Microsoft Visio Drawing.vsdx new file mode 100644 index 0000000..264ac8a Binary files /dev/null and b/Latex/design pattern/新建Microsoft Visio Drawing.vsdx differ