diff --git a/Abstract.tex b/Abstract.tex new file mode 100644 index 0000000..db2713a --- /dev/null +++ b/Abstract.tex @@ -0,0 +1,34 @@ +\documentclass[12pt,letterpaper]{report} +\usepackage[fancyhdr]{UMCCsThesis} % Thesis style +\usepackage{setspace} +\usepackage{myowndef} +\linespread{1.67} % Linespacing for entire thesis +\newlength{\defbaselineskip} +\setlength{\defbaselineskip}{\baselineskip} +\newcommand{\setlinespacing}[1]% + {\setlength{\baselineskip}{#1 \defbaselineskip}} +\renewcommand{\doublespacing}{\setlength{\baselineskip}% + {1.0 \defbaselineskip}} +\renewcommand{\singlespacing}{\setlength{\baselineskip}{\defbaselineskip}} + +%========= Document start +\begin {document} + +\thispagestyle{empty} +\smalltitle +\vspace{20pt} +\begin{center} +Ryan J. Calhoun +\end{center} + +\vspace{10pt} +\begin{center} +Dr. Jeffrey Uhlmann, Thesis Supervisor +\end{center} +\vspace{5pt} +\section*{\centering ABSTRACT} +\vspace{40pt} + +\input{chapters/abstract_text} +\thispagestyle{empty} +\end{document} diff --git a/IEEEtran.bst b/IEEEtran.bst new file mode 100644 index 0000000..70af79c --- /dev/null +++ b/IEEEtran.bst @@ -0,0 +1,2369 @@ +%% +%% IEEEtran.bst +%% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted) +%% Version 1.11 (2003/04/02) +%% +%% Copyright (c) 2003 Michael Shell +%% +%% Original starting code base and algorithms obtained from the output of +%% Patrick W. Daly's makebst package as well as from prior versions of +%% IEEE BibTeX styles: +%% +%% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988) +%% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993) +%% +%% +%% See: +%% http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/ +%% for latest version and current contact information. +%% +%% For use with BibTeX version 0.99a or later +%% +%% This is a numerical citation style. +%% +%%********************************************************************** +%% Legal Notice: +%% This code is offered as-is without any warranty either expressed or +%% implied; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE! +%% User assumes all risk. +%% In no event shall IEEE or any contributor to this code be liable for +%% any damages or losses, including, but not limited to, incidental, +%% consequential, or any other damages, resulting from the use or misuse +%% of any information contained here. +%% +%% This code is distributed under the Perl Artistic License +%% ( http://language.perl.com/misc/Artistic.html ) +%% and may be freely used, distributed and modified - subject to the +%% constraints therein. +%% Retain all contribution notices, credits and disclaimers. +%% +%% All comments are the opinions of their respective authors and are not +%% necessarily endorsed by the IEEE. +%%********************************************************************** +% +% +% Changelog: +% +% 1.00 (2002/08/13) Initial release +% +% 1.10 (2002/09/27) +% 1. Corrected minor bug for improperly formed warning message when a +% book was not given a title. Thanks to Ming Kin Lai for reporting this. +% 2. Added support for CTLname_format_string and CTLname_latex_cmd fields +% in the BST control entry type. +% +% 1.11 (2003/04/02) +% 1. Fixed bug with URLs containing underscores when using url.sty. Thanks +% to Ming Kin Lai for reporting this. + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% These are the defaults for the user adjustable controls. The values used +% here can be overridden by the user via IEEEtranBSTCTL entry type. + +% NOTE: The recommended LaTeX command to invoke a control entry type is: +% +%\makeatletter +%\def\bstctlcite#1{\@bsphack +% \@for\@citeb:=#1\do{% +% \edef\@citeb{\expandafter\@firstofone\@citeb}% +% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi}% +% \@esphack} +%\makeatother +% +% It is called at the start of the document, before the first \cite, like: +% \bstctlcite{IEEEexample:BSTcontrol} +% +% IEEEtran.cls V1.6 and later does provide this command. + + + +% #0 turns off the display of the number for articles. +% #1 enables +FUNCTION {default.is.use.number.for.article} { #1 } + + +% #0 turns off the display of the paper and type fields in @inproceedings. +% #1 enables +FUNCTION {default.is.use.paper} { #1 } + + +% #0 turns off the forced use of "et al." +% #1 enables +FUNCTION {default.is.forced.et.al} { #0 } + +% The maximum number of names that can be present beyond which an "et al." +% usage is forced. Be sure that num.names.shown.with.forced.et.al (below) +% is not greater than this value! +% Note: There are many instances of references in IEEE journals which have +% a very large number of authors as well as instances in which "et al." is +% used profusely. +FUNCTION {default.max.num.names.before.forced.et.al} { #10 } + +% The number of names that will be shown with a forced "et al.". +% Must be less than or equal to max.num.names.before.forced.et.al +FUNCTION {default.num.names.shown.with.forced.et.al} { #1 } + + +% #0 turns off the alternate interword spacing for entries with URLs. +% #1 enables +FUNCTION {default.is.use.alt.interword.spacing} { #1 } + +% If alternate interword spacing for entries with URLs is enabled, this is +% the interword spacing stretch factor that will be used. For example, the +% default "4" here means that the interword spacing in entries with URLs can +% stretch to four times normal. Does not have to be an integer. Note that +% the value specified here can be overridden by the user in their LaTeX +% code via a command such as: +% "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to +% that via the IEEEtranBSTCTL entry type. +FUNCTION {default.ALTinterwordstretchfactor} { "4" } + + +% #0 turns off the "dashification" of repeated (i.e., identical to those +% of the previous entry) names. IEEE normally does this. +% #1 enables +FUNCTION {default.is.dash.repeated.names} { #1 } + + +% The default name format control string. +FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" } + + +% The default LaTeX font command for the names. +FUNCTION {default.name.latex.cmd}{ "" } + + +% Other controls that cannot be accessed via IEEEtranBSTCTL entry type. + +% #0 turns off the terminal startup banner/completed message so as to +% operate more quietly. +% #1 enables +FUNCTION {is.print.banners.to.terminal} { #1 } + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% FILE VERSION AND BANNER %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION{bst.file.version} { "1.11" } +FUNCTION{bst.file.date} { "2003/04/02" } +FUNCTION{bst.file.website} { "http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/" } + +FUNCTION {banner.message} +{ is.print.banners.to.terminal + { "-- IEEEtran.bst version" " " * bst.file.version * + " (" * bst.file.date * ") " * "by Michael Shell." * + top$ + "-- " bst.file.website * + top$ + "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." * + top$ + } + { skip$ } + if$ +} + +FUNCTION {completed.message} +{ is.print.banners.to.terminal + { "" + top$ + "Done." + top$ + } + { skip$ } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%%%% +%% STRING CONSTANTS %% +%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {bbl.and}{ "and" } +FUNCTION {bbl.etal}{ "et~al." } +FUNCTION {bbl.editors}{ "eds." } +FUNCTION {bbl.editor}{ "ed." } +FUNCTION {bbl.edition}{ "ed." } +FUNCTION {bbl.volume}{ "vol." } +FUNCTION {bbl.of}{ "of" } +FUNCTION {bbl.number}{ "no." } +FUNCTION {bbl.in}{ "in" } +FUNCTION {bbl.pages}{ "pp." } +FUNCTION {bbl.page}{ "p." } +FUNCTION {bbl.chapter}{ "ch." } +FUNCTION {bbl.paper}{ "paper" } +FUNCTION {bbl.part}{ "pt." } +FUNCTION {bbl.patent}{ "Patent" } +FUNCTION {bbl.patentUS}{ "U.S." } +FUNCTION {bbl.revision}{ "Rev." } +FUNCTION {bbl.series}{ "ser." } +FUNCTION {bbl.standard}{ "Std." } +FUNCTION {bbl.techrep}{ "Tech. Rep." } +FUNCTION {bbl.mthesis}{ "Master's thesis" } +FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" } +FUNCTION {bbl.urlprefix}{ "[Online]. Available:" } +FUNCTION {bbl.st}{ "st" } +FUNCTION {bbl.nd}{ "nd" } +FUNCTION {bbl.rd}{ "rd" } +FUNCTION {bbl.th}{ "th" } + + +% This is the LaTeX spacer that is used when a larger than normal space +% is called for (such as just before the address:publisher). +FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " } + +% The LaTeX code for dashes that are used to represent repeated names. +% Note: Some older IEEE journals used something like +% "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along +% the baseline. However, IEEE now uses a thinner, above baseline, +% six dash long sequence. +FUNCTION {repeated.name.dashes} { "------" } + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% PREDEFINED STRING MACROS %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +MACRO {jan} {"Jan."} +MACRO {feb} {"Feb."} +MACRO {mar} {"Mar."} +MACRO {apr} {"Apr."} +MACRO {may} {"May"} +MACRO {jun} {"June"} +MACRO {jul} {"July"} +MACRO {aug} {"Aug."} +MACRO {sep} {"Sept."} +MACRO {oct} {"Oct."} +MACRO {nov} {"Nov."} +MACRO {dec} {"Dec."} + + + +%%%%%%%%%%%%%%%%%% +%% ENTRY FIELDS %% +%%%%%%%%%%%%%%%%%% + +ENTRY + { address + assignee + author + booktitle + chapter + day + dayfiled + edition + editor + howpublished + institution + intype + journal + key + language + month + monthfiled + nationality + note + number + organization + pages + paper + publisher + school + series + revision + title + type + url + volume + year + yearfiled + CTLuse_article_number + CTLuse_paper + CTLuse_forced_etal + CTLmax_names_forced_etal + CTLnames_show_etal + CTLuse_alt_spacing + CTLalt_stretch_factor + CTLdash_repeated_names + CTLname_format_string + CTLname_latex_cmd + } + {} + { label } + + + + +%%%%%%%%%%%%%%%%%%%%%%% +%% INTEGER VARIABLES %% +%%%%%%%%%%%%%%%%%%%%%%% + +INTEGERS { prev.status.punct this.status.punct punct.std + punct.no punct.comma punct.period + prev.status.space this.status.space space.std + space.no space.normal space.large + prev.status.quote this.status.quote quote.std + quote.no quote.close + prev.status.nline this.status.nline nline.std + nline.no nline.newblock + status.cap cap.std + cap.no cap.yes} + +INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames } + +INTEGERS { is.use.number.for.article + is.use.paper + is.forced.et.al + max.num.names.before.forced.et.al + num.names.shown.with.forced.et.al + is.use.alt.interword.spacing + is.dash.repeated.names} + + +%%%%%%%%%%%%%%%%%%%%%% +%% STRING VARIABLES %% +%%%%%%%%%%%%%%%%%%%%%% + +STRINGS { bibinfo + longest.label + oldname + s + t + ALTinterwordstretchfactor + name.format.string + name.latex.cmd} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOW LEVEL FUNCTIONS %% +%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {initialize.controls} +{ default.is.use.number.for.article 'is.use.number.for.article := + default.is.use.paper 'is.use.paper := + default.is.forced.et.al 'is.forced.et.al := + default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al := + default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al := + default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing := + default.is.dash.repeated.names 'is.dash.repeated.names := + default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor := + default.name.format.string 'name.format.string := + default.name.latex.cmd 'name.latex.cmd := +} + + +% This IEEEtran.bst features a very powerful and flexible mechanism for +% controlling the capitalization, punctuation, spacing, quotation, and +% newlines of the formatted entry fields. (Note: IEEEtran.bst does not need +% or use the newline/newblock feature, but it has been implemented for +% possible future use.) The output states of IEEEtran.bst consist of +% multiple independent attributes and, as such, can be thought of as being +% vectors, rather than the simple scalar values ("before.all", +% "mid.sentence", etc.) used in most other .bst files. +% +% The more flexible and complex design used here was motivated in part by +% IEEE's rather unusual bibliography style. For example, IEEE ends the +% previous field item with a period and large space prior to the publisher +% address; the @electronic entry types use periods as inter-item punctuation +% rather than the commas used by the other entry types; and URLs are never +% followed by periods even though they are the last item in the entry. +% Although it is possible to accommodate these features with the conventional +% output state system, the seemingly endless exceptions make for convoluted, +% unreliable and difficult to maintain code. +% +% IEEEtran.bst's output state system can be easily understood via a simple +% illustration of two most recently formatted entry fields (on the stack): +% +% CURRENT_ITEM +% "PREVIOUS_ITEM +% +% which, in this example, is to eventually appear in the bibliography as: +% +% "PREVIOUS_ITEM," CURRENT_ITEM +% +% It is the job of the output routine to take the previous item off of the +% stack (while leaving the current item at the top of the stack), apply its +% trailing punctuation (including closing quote marks) and spacing, and then +% to write the result to BibTeX's output buffer: +% +% "PREVIOUS_ITEM," +% +% Punctuation (and spacing) between items is often determined by both of the +% items rather than just the first one. The presence of quotation marks +% further complicates the situation because, in standard English, trailing +% punctuation marks are supposed to be contained within the quotes. +% +% IEEEtran.bst maintains two output state (aka "status") vectors which +% correspond to the previous and current (aka "this") items. Each vector +% consists of several independent attributes which track punctuation, +% spacing, quotation, and newlines. Capitalization status is handled by a +% separate scalar because the format routines, not the output routine, +% handle capitalization and, therefore, there is no need to maintain the +% capitalization attribute for both the "previous" and "this" items. +% +% When a format routine adds a new item, it copies the current output status +% vector to the previous output status vector and (usually) resets the +% current (this) output status vector to a "standard status" vector. Using a +% "standard status" vector in this way allows us to redefine what we mean by +% "standard status" at the start of each entry handler and reuse the same +% format routines under the various inter-item separation schemes. For +% example, the standard status vector for the @book entry type may use +% commas for item separators, while the @electronic type may use periods, +% yet both entry handlers exploit many of the exact same format routines. +% +% Because format routines have write access to the output status vector of +% the previous item, they can override the punctuation choices of the +% previous format routine! Therefore, it becomes trivial to implement rules +% such as "Always use a period and a large space before the publisher." By +% pushing the generation of the closing quote mark to the output routine, we +% avoid all the problems caused by having to close a quote before having all +% the information required to determine what the punctuation should be. +% +% The IEEEtran.bst output state system can easily be expanded if needed. +% For instance, it is easy to add a "space.tie" attribute value if the +% bibliography rules mandate that two items have to be joined with an +% unbreakable space. + +FUNCTION {initialize.status.constants} +{ #0 'punct.no := + #1 'punct.comma := + #2 'punct.period := + #0 'space.no := + #1 'space.normal := + #2 'space.large := + #0 'quote.no := + #1 'quote.close := + #0 'cap.no := + #1 'cap.yes := + #0 'nline.no := + #1 'nline.newblock := +} + +FUNCTION {std.status.using.comma} +{ punct.comma 'punct.std := + space.normal 'space.std := + quote.no 'quote.std := + nline.no 'nline.std := + cap.no 'cap.std := +} + +FUNCTION {std.status.using.period} +{ punct.period 'punct.std := + space.normal 'space.std := + quote.no 'quote.std := + nline.no 'nline.std := + cap.yes 'cap.std := +} + +FUNCTION {initialize.prev.this.status} +{ punct.no 'prev.status.punct := + space.no 'prev.status.space := + quote.no 'prev.status.quote := + nline.no 'prev.status.nline := + punct.no 'this.status.punct := + space.no 'this.status.space := + quote.no 'this.status.quote := + nline.no 'this.status.nline := + cap.yes 'status.cap := +} + +FUNCTION {this.status.std} +{ punct.std 'this.status.punct := + space.std 'this.status.space := + quote.std 'this.status.quote := + nline.std 'this.status.nline := +} + +FUNCTION {cap.status.std}{ cap.std 'status.cap := } + +FUNCTION {this.to.prev.status} +{ this.status.punct 'prev.status.punct := + this.status.space 'prev.status.space := + this.status.quote 'prev.status.quote := + this.status.nline 'prev.status.nline := +} + + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ { skip$ } + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + { skip$ } + if$ +} + + +% 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$ +} + + +% pushes true if the single char string on the stack is in the +% range of "0" to "9" +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +% multiplies the integer on the stack by a factor of 10 +FUNCTION {bump.int.mag} +{ #0 'multiresult := + { duplicate$ #0 > } + { #1 - + multiresult #10 + + 'multiresult := + } + while$ +pop$ +multiresult +} + +% converts a single character string on the stack to an integer +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 + } + if$ +} + +% converts a string on the stack to an integer +FUNCTION {string.to.integer} +{ duplicate$ text.length$ 'namesleft := + #1 'nameptr := + #0 'numnames := + { nameptr namesleft > not } + { duplicate$ nameptr #1 substring$ + char.to.integer numnames bump.int.mag + + 'numnames := + nameptr #1 + + 'nameptr := + } + while$ +pop$ +numnames +} + + + + +% The output routines write out the *next* to the top (previous) item on the +% stack, adding punctuation and such as needed. Since IEEEtran.bst maintains +% the output status for the top two items on the stack, these output +% routines have to consider the previous output status (which corresponds to +% the item that is being output). Full independent control of punctuation, +% closing quote marks, spacing, and newblock is provided. +% +% "output.nonnull" does not check for the presence of a previous empty +% item. +% +% "output" does check for the presence of a previous empty item and will +% remove an empty item rather than outputing it. +% +% "output.warn" is like "output", but will issue a warning if it detects +% an empty item. + +FUNCTION {output.nonnull} +{ swap$ + prev.status.punct punct.comma = + { "," * } + { skip$ } + if$ + prev.status.punct punct.period = + { add.period$ } + { skip$ } + if$ + prev.status.quote quote.close = + { "''" * } + { skip$ } + if$ + prev.status.space space.normal = + { " " * } + { skip$ } + if$ + prev.status.space space.large = + { large.space * } + { skip$ } + if$ + write$ + prev.status.nline nline.newblock = + { newline$ "\newblock " write$ } + { skip$ } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.warn} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +% "fin.entry" is the output routine that handles the last item of the entry +% (which will be on the top of the stack when "fin.entry" is called). + +FUNCTION {fin.entry} +{ this.status.punct punct.no = + { skip$ } + { add.period$ } + if$ + this.status.quote quote.close = + { "''" * } + { skip$ } + if$ +write$ +newline$ +} + + +FUNCTION {is.last.char.not.punct} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {is.multiple.pages} +{ '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 {capitalize}{ "u" change.case$ "t" change.case$ } + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} + +FUNCTION {do.name.latex.cmd} +{ name.latex.cmd + empty$ + { skip$ } + { name.latex.cmd "{" * swap$ * "}" * } + if$ +} + +% IEEEtran.bst uses its own \BIBforeignlanguage command which directly +% invokes the TeX hyphenation patterns without the need of the Babel +% package. Babel does a lot more than switch hyphenation patterns and +% its loading can cause unintended effects in many class files (such as +% IEEEtran.cls). +FUNCTION {select.language} +{ duplicate$ empty$ 'pop$ + { language empty$ 'skip$ + { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {space.word}{ " " swap$ * " " * } + + +% Field Conditioners, Converters, Checkers and External Interfaces + +FUNCTION {empty.field.to.null.string} +{ duplicate$ empty$ + { pop$ "" } + { skip$ } + if$ +} + +FUNCTION {either.or.check} +{ empty$ + { pop$ } + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {empty.entry.warn} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ url empty$ + and and and and and and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + + +% The bibinfo system provides a way for the electronic parsing/acquisition +% of a bibliography's contents as is done by ReVTeX. For example, a field +% could be entered into the bibliography as: +% \bibinfo{volume}{2} +% Only the "2" would show up in the document, but the LaTeX \bibinfo command +% could do additional things with the information. IEEEtran.bst does provide +% a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is +% currently not used as the bogus bibinfo functions defined here output the +% entry values directly without the \bibinfo wrapper. The bibinfo functions +% themselves (and the calls to them) are retained for possible future use. +% +% bibinfo.check avoids acting on missing fields while bibinfo.warn will +% issue a warning message if a missing field is detected. Prior to calling +% the bibinfo functions, the user should push the field value and then its +% name string, in that order. + +FUNCTION {bibinfo.check} +{ swap$ duplicate$ missing$ + { pop$ pop$ "" } + { duplicate$ empty$ + { swap$ pop$ } + { swap$ pop$ } + if$ + } + if$ +} + +FUNCTION {bibinfo.warn} +{ swap$ duplicate$ missing$ + { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" } + { duplicate$ empty$ + { swap$ "empty " swap$ * " in " * cite$ * warning$ } + { swap$ pop$ } + if$ + } + if$ +} + + +% IEEE separates large numbers with more than 4 digits into groups of +% three. IEEE uses a small space to separate these number groups. +% Typical applications include patent and page numbers. + +% number of consecutive digits required to trigger the group separation. +FUNCTION {large.number.trigger}{ #5 } + +% For numbers longer than the trigger, this is the blocksize of the groups. +% The blocksize must be less than the trigger threshold, and 2 * blocksize +% must be greater than the trigger threshold (can't do more than one +% separation on the initial trigger). +FUNCTION {large.number.blocksize}{ #3 } + +% What is actually inserted between the number groups. +FUNCTION {large.number.separator}{ "\," } + +% So as to save on integer variables by reusing existing ones, numnames +% holds the current number of consecutive digits read and nameptr holds +% the number that will trigger an inserted space. +FUNCTION {large.number.separate} +{ 't := + "" + #0 'numnames := + large.number.trigger 'nameptr := + { t empty$ not } + { t #-1 #1 substring$ is.num + { numnames #1 + 'numnames := } + { #0 'numnames := + large.number.trigger 'nameptr := + } + if$ + t #-1 #1 substring$ swap$ * + t #-2 global.max$ substring$ 't := + numnames nameptr = + { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$ + nameptr large.number.blocksize - #1 + global.max$ substring$ + large.number.separator swap$ * * + nameptr large.number.blocksize - 'numnames := + large.number.blocksize #1 + 'nameptr := + } + { skip$ } + if$ + } + while$ +} + +% Converts all single dashes "-" to double dashes "--". +FUNCTION {n.dashify} +{ large.number.separate + '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$ +} + + +% This function detects entries with names that are identical to that of +% the previous entry and replaces the repeated names with dashes (if the +% "is.dash.repeated.names" user control is nonzero). +FUNCTION {name.or.dash} +{ 's := + oldname empty$ + { s 'oldname := s } + { s oldname = + { is.dash.repeated.names + { repeated.name.dashes } + { s 'oldname := s } + if$ + } + { s 'oldname := s } + if$ + } + if$ +} + +% Converts the number string on the top of the stack to +% "numerical ordinal form" (e.g., "7" to "7th"). There is +% no artificial limit to the upper bound of the numbers as the +% least significant digit always determines the ordinal form. +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$ +} + +% If the string on the top of the stack begins with a number, +% (e.g., 11th) then replace the string with the leading number +% it contains. Otherwise retain the string as-is. s holds the +% extracted number, t holds the part of the string that remains +% to be scanned. +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +% Converts the word number string on the top of the stack to +% Arabic string form. Will be successful up to "tenth". +FUNCTION {word.to.num} +{ duplicate$ "l" change.case$ 's := + s "first" = + { pop$ "1" } + { skip$ } + if$ + s "second" = + { pop$ "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$ +} + + +% Converts the string on the top of the stack to numerical +% ordinal (e.g., "11th") form. +FUNCTION {convert.edition} +{ duplicate$ empty$ 'skip$ + { duplicate$ #1 #1 substring$ is.num + { extract.num + num.to.ordinal + } + { word.to.num + duplicate$ #1 #1 substring$ is.num + { num.to.ordinal } + { "edition ordinal word " quote$ * edition * quote$ * + " may be too high (or improper) for conversion" * " in " * cite$ * warning$ + } + if$ + } + if$ + } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LATEX BIBLIOGRAPHY CODE %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {start.entry} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + initialize.prev.this.status +} + +% Here we write out all the LaTeX code that we will need. The most involved +% code sequences are those that control the alternate interword spacing and +% foreign language hyphenation patterns. The heavy use of \providecommand +% gives users a way to override the defaults. Special thanks to Javier Bezos, +% Johannes Braams, Robin Fairburns, Heiko Oberdiek, Donald Arseneau and all +% the other gurus on comp.text.tex for their help and advice on the topic of +% \selectlanguage, Babel and BibTeX. +FUNCTION {begin.bib} +{ preamble$ empty$ 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * + write$ newline$ + "\providecommand{\url}[1]{#1}" + write$ newline$ + "\csname url@rmstyle\endcsname" + write$ newline$ + "\providecommand{\newblock}{\relax}" + write$ newline$ + "\providecommand{\bibinfo}[2]{#2}" + write$ newline$ + "\providecommand\BIBentrySTDinterwordspacing{\spaceskip=0pt\relax}" + write$ newline$ + "\providecommand\BIBentryALTinterwordstretchfactor{" + ALTinterwordstretchfactor * "}" * + write$ newline$ + "\providecommand\BIBentryALTinterwordspacing{\spaceskip=\fontdimen2\font plus " + write$ newline$ + "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}" + write$ newline$ + "\providecommand\BIBforeignlanguage[2]{{%" + write$ newline$ + "\expandafter\ifx\csname l@#1\endcsname\relax" + write$ newline$ + "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%" + write$ newline$ + "\typeout{** loaded for the language `#1'. Using the pattern for}%" + write$ newline$ + "\typeout{** the default language instead.}%" + write$ newline$ + "\else" + write$ newline$ + "\language=\csname l@#1\endcsname" + write$ newline$ + "\fi" + write$ newline$ + "#2}}" + write$ newline$ +} + +FUNCTION {end.bib} +{ newline$ "\end{thebibliography}" write$ newline$ } + +FUNCTION {if.url.alt.interword.spacing} +{ is.use.alt.interword.spacing + {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$} + { skip$ } + if$ +} + +FUNCTION {if.url.std.interword.spacing} +{ is.use.alt.interword.spacing + {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$} + { skip$ } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%%%%%% +%% LONGEST LABEL PASS %% +%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +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$ +} + + + + +%%%%%%%%%%%%%%%%%%%%% +%% FORMAT HANDLERS %% +%%%%%%%%%%%%%%%%%%%%% + +%% Lower Level Formats (used by higher level formats) + +FUNCTION {format.address.org.or.pub.date} +{ 't := + "" + year empty$ + { "empty year in " cite$ * warning$ } + { skip$ } + if$ + address empty$ t empty$ and + year empty$ and month empty$ and + { skip$ } + { this.to.prev.status + this.status.std + cap.status.std + address "address" bibinfo.check * + t empty$ + { skip$ } + { punct.period 'prev.status.punct := + space.large 'prev.status.space := + address empty$ + { skip$ } + { ": " * } + if$ + t * + } + if$ + year empty$ month empty$ and + { skip$ } + { t empty$ address empty$ and + { skip$ } + { ", " * } + if$ + month empty$ + { year empty$ + { skip$ } + { year "year" bibinfo.check * } + if$ + } + { month "month" bibinfo.check * + year empty$ + { skip$ } + { " " * year "year" bibinfo.check * } + if$ + } + if$ + } + if$ + } + if$ +} + + +FUNCTION {format.names} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + this.to.prev.status + this.status.std + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + name.format.string + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { nameptr num.names.shown.with.forced.et.al #1 + = + numnames max.num.names.before.forced.et.al > + is.forced.et.al and and + { "others" 't := + #1 'namesleft := + } + { skip$ } + if$ + namesleft #1 > + { ", " * t do.name.latex.cmd * } + { + numnames #2 > + { "," * } + 'skip$ + if$ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal emphasize * + } + { + bbl.and + space.word * t do.name.latex.cmd * + } + if$ + } + if$ + } + { t do.name.latex.cmd } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + cap.status.std + } if$ +} + + + + +%% Higher Level Formats + +%% addresses/locations + +FUNCTION {format.address} +{ address duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + + + +%% author/editor names + +FUNCTION {format.authors}{ author "author" format.names } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { ", " * + get.bbl.editor + capitalize + * + } + if$ +} + + + +%% date + +FUNCTION {format.date} +{ + month "month" bibinfo.check duplicate$ empty$ + year "year" bibinfo.check duplicate$ empty$ + { swap$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + "there's a month but no year in " cite$ * warning$ } + if$ + * + } + { this.to.prev.status + this.status.std + cap.status.std + swap$ 'skip$ + { + swap$ + " " * swap$ + } + if$ + * + } + if$ +} + +FUNCTION {format.date.electronic} +{ month "month" bibinfo.check duplicate$ empty$ + year "year" bibinfo.check duplicate$ empty$ + { swap$ + { pop$ } + { "there's a month but no year in " cite$ * warning$ + pop$ ")" * "(" swap$ * + this.to.prev.status + punct.no 'this.status.punct := + space.normal 'this.status.space := + quote.no 'this.status.quote := + cap.yes 'status.cap := + } + if$ + } + { swap$ + { swap$ pop$ ")" * "(" swap$ * } + { "(" swap$ * ", " * swap$ * ")" * } + if$ + this.to.prev.status + punct.no 'this.status.punct := + space.normal 'this.status.space := + quote.no 'this.status.quote := + cap.yes 'status.cap := + } + if$ +} + + + +%% edition/title + +% Note: IEEE considers the edition to be closely associated with +% the title of a book. So, in IEEEtran.bst the edition is normally handled +% within the formatting of the title. The format.edition function is +% retained here for possible future use. +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + convert.edition + status.cap + { "t" } + { "l" } + if$ change.case$ + "edition" bibinfo.check + "~" * bbl.edition * + cap.status.std + } + if$ +} + +% This is used to format the booktitle of a conference proceedings. +% Here we use the "intype" field to provide the user a way to +% override the word "in" (e.g., with things like "presented at") +% Use of intype stops the emphasis of the booktitle to indicate that +% we no longer mean the written conference proceedings, but the +% conference itself. +FUNCTION {format.in.booktitle} +{ booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + select.language + intype missing$ + { emphasize + bbl.in " " * + } + { intype " " * } + if$ + swap$ * + cap.status.std + } + if$ +} + +% This is used to format the booktitle of collection. +% Here the "intype" field is not supported, but "edition" is. +FUNCTION {format.in.booktitle.edition} +{ booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + select.language + emphasize + edition empty$ 'skip$ + { ", " * + edition + convert.edition + "l" change.case$ + * "~" * bbl.edition * + } + if$ + bbl.in " " * swap$ * + cap.status.std + } + if$ +} + +FUNCTION {format.article.title} +{ title duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + "t" change.case$ + } + if$ + "title" bibinfo.check + duplicate$ empty$ 'skip$ + { quote.close 'this.status.quote := + is.last.char.not.punct + { punct.std 'this.status.punct := } + { punct.no 'this.status.punct := } + if$ + select.language + "``" swap$ * + cap.status.std + } + if$ +} + +FUNCTION {format.article.title.electronic} +{ title duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + "t" change.case$ + } + if$ + "title" bibinfo.check + duplicate$ empty$ + { skip$ } + { select.language } + if$ +} + +FUNCTION {format.book.title.edition} +{ title "title" bibinfo.check + duplicate$ empty$ + { "empty title in " cite$ * warning$ } + { this.to.prev.status + this.status.std + select.language + emphasize + edition empty$ 'skip$ + { ", " * + edition + convert.edition + status.cap + { "t" } + { "l" } + if$ + change.case$ + * "~" * bbl.edition * + } + if$ + cap.status.std + } + if$ +} + +FUNCTION {format.book.title} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + select.language + emphasize + } + if$ +} + + + +%% journal + +FUNCTION {format.journal} +{ journal duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + select.language + emphasize + } + if$ +} + + + +%% how published + +FUNCTION {format.howpublished} +{ howpublished duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + + + +%% institutions/organization/publishers/school + +FUNCTION {format.institution} +{ institution duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + +FUNCTION {format.organization} +{ organization duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + +FUNCTION {format.address.publisher.date} +{ publisher "publisher" bibinfo.warn format.address.org.or.pub.date } + +FUNCTION {format.address.publisher.date.nowarn} +{ publisher "publisher" bibinfo.check format.address.org.or.pub.date } + +FUNCTION {format.address.organization.date} +{ organization "organization" bibinfo.check format.address.org.or.pub.date } + +FUNCTION {format.school} +{ school duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + + + +%% volume/number/series/chapter/pages + +FUNCTION {format.volume} +{ volume empty.field.to.null.string + duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + bbl.volume + status.cap + { capitalize } + { skip$ } + if$ + swap$ tie.or.space.prefix + "volume" bibinfo.check + * * + cap.status.std + } + if$ +} + +FUNCTION {format.number} +{ number empty.field.to.null.string + duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + status.cap + { bbl.number capitalize } + { bbl.number } + if$ + swap$ tie.or.space.prefix + "number" bibinfo.check + * * + cap.status.std + } + if$ +} + +FUNCTION {format.number.if.use.for.article} +{ is.use.number.for.article + { format.number } + { "" } + if$ +} + +% IEEE does not seem to tie the series so closely with the volume +% and number as is done in other bibliography styles. Instead the +% series is treated somewhat like an extension of the title. +FUNCTION {format.series} +{ series empty$ + { "" } + { this.to.prev.status + this.status.std + bbl.series " " * + series "series" bibinfo.check * + cap.status.std + } + if$ +} + + +FUNCTION {format.chapter} +{ chapter empty$ + { "" } + { this.to.prev.status + this.status.std + type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + cap.status.std + } + if$ +} + + +% The intended use of format.paper is for paper numbers of inproceedings. +% The paper type can be overridden via the type field. +% We allow the type to be displayed even if the paper number is absent +% for things like "postdeadline paper" +FUNCTION {format.paper} +{ is.use.paper + { paper empty$ + { type empty$ + { "" } + { this.to.prev.status + this.status.std + type "type" bibinfo.check + cap.status.std + } + if$ + } + { this.to.prev.status + this.status.std + type empty$ + { bbl.paper } + { type "type" bibinfo.check } + if$ + " " * paper + "paper" bibinfo.check + * + cap.status.std + } + if$ + } + { "" } + if$ +} + + +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + duplicate$ is.multiple.pages + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + cap.status.std + } + if$ +} + + + +%% technical report number + +FUNCTION {format.tech.report.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ + this.to.prev.status + this.status.std + cap.status.std + bbl.techrep + } + { skip$ } + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ } + { this.to.prev.status + this.status.std + cap.status.std + tie.or.space.prefix * * } + if$ +} + + + +%% note + +FUNCTION {format.note} +{ note empty$ + { "" } + { this.to.prev.status + this.status.std + punct.period 'this.status.punct := + note #1 #1 substring$ + duplicate$ "{" = + { skip$ } + { status.cap + { "u" } + { "l" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + cap.yes 'status.cap := + } + if$ +} + + + +%% patent + +FUNCTION {format.patent.date} +{ this.to.prev.status + this.status.std + year empty$ + { monthfiled duplicate$ empty$ + { "monthfiled" bibinfo.check pop$ "" } + { "monthfiled" bibinfo.check } + if$ + dayfiled duplicate$ empty$ + { "dayfiled" bibinfo.check pop$ "" * } + { "dayfiled" bibinfo.check + monthfiled empty$ + { "dayfiled without a monthfiled in " cite$ * warning$ + * + } + { " " swap$ * * } + if$ + } + if$ + yearfiled empty$ + { "no year or yearfiled in " cite$ * warning$ } + { yearfiled "yearfiled" bibinfo.check + swap$ + duplicate$ empty$ + { pop$ } + { ", " * swap$ * } + if$ + } + if$ + } + { month duplicate$ empty$ + { "month" bibinfo.check pop$ "" } + { "month" bibinfo.check } + if$ + day duplicate$ empty$ + { "day" bibinfo.check pop$ "" * } + { "day" bibinfo.check + month empty$ + { "day without a month in " cite$ * warning$ + * + } + { " " swap$ * * } + if$ + } + if$ + year "year" bibinfo.check + swap$ + duplicate$ empty$ + { pop$ } + { ", " * swap$ * } + if$ + } + if$ + cap.status.std +} + +FUNCTION {format.patent.nationality.type.number} +{ this.to.prev.status + this.status.std + nationality duplicate$ empty$ + { "nationality" bibinfo.warn pop$ "" } + { "nationality" bibinfo.check + duplicate$ "l" change.case$ "united states" = + { pop$ bbl.patentUS } + { skip$ } + if$ + " " * + } + if$ + type empty$ + { bbl.patent "type" bibinfo.check } + { type "type" bibinfo.check } + if$ + * + number duplicate$ empty$ + { "number" bibinfo.warn pop$ } + { "number" bibinfo.check + large.number.separate + swap$ " " * swap$ * + } + if$ + cap.status.std +} + + + +%% standard + +FUNCTION {format.organization.institution.standard.type.number} +{ this.to.prev.status + this.status.std + organization duplicate$ empty$ + { pop$ + institution duplicate$ empty$ + { "institution" bibinfo.warn } + { "institution" bibinfo.warn " " * } + if$ + } + { "organization" bibinfo.warn " " * } + if$ + type empty$ + { bbl.standard "type" bibinfo.check } + { type "type" bibinfo.check } + if$ + * + number duplicate$ empty$ + { "number" bibinfo.check pop$ } + { "number" bibinfo.check + large.number.separate + swap$ " " * swap$ * + } + if$ + cap.status.std +} + +FUNCTION {format.revision} +{ revision empty$ + { "" } + { this.to.prev.status + this.status.std + bbl.revision + revision tie.or.space.prefix + "revision" bibinfo.check + * * + cap.status.std + } + if$ +} + + +%% thesis + +FUNCTION {format.master.thesis.type} +{ this.to.prev.status + this.status.std + type empty$ + { + bbl.mthesis + } + { + type "type" bibinfo.check + } + if$ +cap.status.std +} + +FUNCTION {format.phd.thesis.type} +{ this.to.prev.status + this.status.std + type empty$ + { + bbl.phdthesis + } + { + type "type" bibinfo.check + } + if$ +cap.status.std +} + + + +%% URL + +FUNCTION {format.url} +{ url empty$ + { "" } + { this.to.prev.status + this.status.std + cap.yes 'status.cap := + bbl.urlprefix " " * + "\url{" * url * "}" * + punct.no 'this.status.punct := + punct.period 'prev.status.punct := + space.normal 'this.status.space := + space.normal 'prev.status.space := + quote.no 'this.status.quote := + } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%% +%% ENTRY HANDLERS %% +%%%%%%%%%%%%%%%%%%%% + + +% Note: In many journals, IEEE (or the authors) tend not to show the number +% for articles, so the display of the number is controlled here by the +% switch "is.use.number.for.article" +FUNCTION {article} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.journal "journal" bibinfo.check "journal" output.warn + format.volume output + format.number.if.use.for.article output + format.pages output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {book} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + author empty$ + { format.editors "author and editor" output.warn } + { format.authors output.nonnull } + if$ + name.or.dash + format.book.title.edition output + format.series output + author empty$ + { skip$ } + { format.editors output } + if$ + format.address.publisher.date output + format.volume output + format.number output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {booklet} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.article.title "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.date output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {electronic} +{ std.status.using.period + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.date.electronic output + format.article.title.electronic output + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.note output + format.url output + fin.entry + empty.entry.warn + if.url.std.interword.spacing +} + +FUNCTION {inbook} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + author empty$ + { format.editors "author and editor" output.warn } + { format.authors output.nonnull } + if$ + name.or.dash + format.book.title.edition output + format.series output + format.address.publisher.date output + format.volume output + format.number output + format.chapter output + format.pages output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {incollection} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.in.booktitle.edition "booktitle" output.warn + format.series output + format.editors output + format.address.publisher.date.nowarn output + format.volume output + format.number output + format.chapter output + format.pages output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {inproceedings} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.in.booktitle "booktitle" output.warn + format.series output + format.editors output + format.volume output + format.number output + publisher empty$ + { format.address.organization.date output } + { format.organization "organization" bibinfo.check output + format.address.publisher.date output + } + if$ + format.paper output + format.pages output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {manual} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.book.title.edition "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.date output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {mastersthesis} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.master.thesis.type output.nonnull + format.school "school" bibinfo.warn output + format.address "address" bibinfo.check output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {misc} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.article.title output + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.pages output + format.date output + format.note output + format.url output + fin.entry + empty.entry.warn + if.url.std.interword.spacing +} + +FUNCTION {patent} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.article.title output + format.patent.nationality.type.number output + format.patent.date output + format.note output + format.url output + fin.entry + empty.entry.warn + if.url.std.interword.spacing +} + +FUNCTION {periodical} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.editors output + name.or.dash + format.book.title "title" output.warn + format.series output + format.volume output + format.number output + format.organization "organization" bibinfo.check output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {phdthesis} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.phd.thesis.type output.nonnull + format.school "school" bibinfo.warn output + format.address "address" bibinfo.check output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {proceedings} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.editors output + name.or.dash + format.book.title "title" output.warn + format.series output + format.volume output + format.number output + publisher empty$ + { format.address.organization.date output } + { format.organization "organization" bibinfo.check output + format.address.publisher.date output + } + if$ + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {standard} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.book.title "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.organization.institution.standard.type.number output + format.revision output + format.date output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {techreport} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.institution "institution" bibinfo.warn output + format.address "address" bibinfo.check output + format.tech.report.number output.nonnull + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {unpublished} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.date output + format.note "note" output.warn + format.url output + fin.entry + if.url.std.interword.spacing +} + + +% The special entry type which provides the user interface to the +% BST controls +FUNCTION {IEEEtranBSTCTL} +{ is.print.banners.to.terminal + { "** IEEEtran 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$ + 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_format_string + empty$ + { skip$ } + { CTLname_format_string + 'name.format.string := + } + if$ + CTLname_latex_cmd + empty$ + { skip$ } + { CTLname_latex_cmd + 'name.latex.cmd := + } + 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$ +} + + +%%%%%%%%%%%%%%%%%%% +%% ENTRY ALIASES %% +%%%%%%%%%%%%%%%%%%% +FUNCTION {conference}{inproceedings} +FUNCTION {online}{electronic} +FUNCTION {internet}{electronic} +FUNCTION {webpage}{electronic} +FUNCTION {default.type}{misc} + + + +%%%%%%%%%%%%%%%%%% +%% MAIN PROGRAM %% +%%%%%%%%%%%%%%%%%% + +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} + + +%% That's all folks, mds. diff --git a/IEEEtran.sty b/IEEEtran.sty new file mode 100644 index 0000000..6e7fff4 --- /dev/null +++ b/IEEEtran.sty @@ -0,0 +1,105 @@ +% \PARstart +% Definition for the big two line drop cap letter at the beginning of the +% first paragraph of journal papers. The first argument is the first letter +% of the first word, the second argument is the remaining letters of the +% first word which will be rendered in upper case. +% In V1.6 this has been completely rewritten to: +% +% 1. no longer have problems when the user begins an environment +% within the paragraph that uses \PARstart. +% 2. auto-detect and use the current font family +% 3. revise handling of the space at the end of the first word so that +% interword glue will now work as normal. +% 4. produce correctly aligned edges for the (two) indented lines. +% +% We generalize things via control macros - playing with these is fun too. +% +% the number of lines that are indented to clear it +\def\@IEEEPARstartDROPLINES{2} +% minimum number of lines left on a page to allow a \@PARstart +% Does not take into consideration rubber shrink, so it tends to +% be overly cautious +\def\@IEEEPARstartMINPAGELINES{2} +% the depth the letter is lowered below the baseline +% the height (and size) of the letter is determined by the sum +% of this value and the height of a capital "T" in the current +% font. It is a good idea to set this value in terms of the baselineskip +% so that it can respond to changes therein. +\def\@IEEEPARstartDROPDEPTH{1.1\baselineskip} +% This is the separation distance from the drop letter to the main text. +% Lengths that depend on the font (i.e., ex, em, etc.) will be referenced +% to the font that is active when PARstart is called. +\def\@IEEEPARstartSEP{0.15em} + + +% definition of \PARstart +% THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES +% +% The token \@IEEEPARstartfont will be globally defined after the first use +% of \PARstart and will be a font command which creates the big letter +% The first argument is the first letter of the first word and the second +% argument is the rest of the first word(s). +\def\PARstart#1#2{\par{% +% if this page does not have enough space, break it and lets start +% on a new one +\@IEEEtranneedspace{\@IEEEPARstartMINPAGELINES\baselineskip}{\relax}% +% calculate the desired height of the big letter +% it extends from the top of a capital "T" in the current font +% down to \@IEEEPARstartDROPDEPTH below the current baseline +\settoheight{\@IEEEtrantmpdimenA}{T}% +\addtolength{\@IEEEtrantmpdimenA}{\@IEEEPARstartDROPDEPTH}% +% extract the name of the current font in bold +% and place it in \@IEEEPARstartFONTNAME +\def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}% +{\bfseries% +\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}% +\xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}% +% define a font based on this name with a point size equal to the desired +% height of the drop letter +\font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax% +% save this value as a counter (integer) value (sp points) +\@IEEEtrantmpcountA=\@IEEEtrantmpdimenA% +% now get the height of the actual letter produced by this font size +\settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\MakeUppercase{#1}}% +% If something bogus happens like the first argument is empty or the +% current font is strange, do not allow a zero height. +\ifdim\@IEEEtrantmpdimenB=0pt\relax% +\typeout{** WARNING: PARstart drop letter has zero height! (line \the\inputlineno)}% +\typeout{ Forcing the drop letter font size to 10pt.}% +\@IEEEtrantmpdimenB=10pt% +\fi% +% and store it as a counter +\@IEEEtrantmpcountB=\@IEEEtrantmpdimenB% +% Since a font size doesn't exactly correspond to the height of the capital +% letters in that font, the actual height of the letter, \@IEEEtrantmpcountB, +% will be less than that desired, \@IEEEtrantmpcountA +% we need to raise the font size, \@IEEEtrantmpdimenA +% by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB +% But, TeX doesn't have floating point division, so we have to use integer +% division. Hence the use of the counters. +% We need to reduce the denominator so that the loss of the remainder will +% have minimal affect on the accuracy of the result +\divide\@IEEEtrantmpcountB by 200% +\divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB% +% Then reequalize things when we use TeX's ability to multiply by +% floating point values +\@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA% +\multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA% +% \@IEEEPARstartfont is globaly set to the calculated font of the big letter +% We need to carry this out of the local calculation area to to create the +% big letter. +\global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB% +% Now set \@IEEEtrantmpdimenA to the width of the big letter +% We need to carry this out of the local calculation area to set the +% hanging indent +\settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont\MakeUppercase{#1}}}% +% end of the isolated calculation environment +% add in the extra clearance we want +\advance\@IEEEtrantmpdimenA by \@IEEEPARstartSEP% +% \@IEEEtrantmpdimenA has the width of the big letter plus the +% separation space and \@IEEEPARstartfont is the font we need to use +% Now, we make the letter and issue the hanging indent command +% The letter is placed in a box of zero width and height so that other +% text won't be displaced by it. +\noindent\hangindent\@IEEEtrantmpdimenA\hangafter=-\@IEEEPARstartDROPLINES% +\makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}\raisebox{-\@IEEEPARstartDROPDEPTH}[0pt][0pt]{\@IEEEPARstartfont\MakeUppercase{#1}}}\MakeUppercase{#2}} diff --git a/IEEEtranS.bst b/IEEEtranS.bst new file mode 100644 index 0000000..412347e --- /dev/null +++ b/IEEEtranS.bst @@ -0,0 +1,2550 @@ +%% +%% IEEEtranS.bst +%% BibTeX Bibliography Style file +%% Sorting version of IEEEtran.bst +%% *** Not for use with work to be submitted to the IEEE *** +%% Version 1.11 (2003/04/02) +%% +%% Copyright (c) 2003 Michael Shell +%% +%% Original starting code base and algorithms obtained from the output of +%% Patrick W. Daly's makebst package as well as from prior versions of +%% IEEE BibTeX styles: +%% +%% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988) +%% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993) +%% +%% Added sorting code is from plain.bst. +%% +%% See: +%% http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/ +%% for latest version and current contact information. +%% +%% For use with BibTeX version 0.99a or later +%% +%% This is a numerical citation style. +%% +%%********************************************************************** +%% Legal Notice: +%% This code is offered as-is without any warranty either expressed or +%% implied; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE! +%% User assumes all risk. +%% In no event shall IEEE or any contributor to this code be liable for +%% any damages or losses, including, but not limited to, incidental, +%% consequential, or any other damages, resulting from the use or misuse +%% of any information contained here. +%% +%% This code is distributed under the Perl Artistic License +%% ( http://language.perl.com/misc/Artistic.html ) +%% and may be freely used, distributed and modified - subject to the +%% constraints therein. +%% Retain all contribution notices, credits and disclaimers. +%% +%% All comments are the opinions of their respective authors and are not +%% necessarily endorsed by the IEEE. +%%********************************************************************** +% +% +% Changelog: +% +% 1.10 (2002/09/27) Initial release +% +% 1.11 (2003/04/02) +% 1. Fixed bug with URLs containing underscores when using url.sty. Thanks +% to Ming Kin Lai for reporting this. + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% These are the defaults for the user adjustable controls. The values used +% here can be overridden by the user via IEEEtranBSTCTL entry type. + +% NOTE: The recommended LaTeX command to invoke a control entry type is: +% +%\makeatletter +%\def\bstctlcite#1{\@bsphack +% \@for\@citeb:=#1\do{% +% \edef\@citeb{\expandafter\@firstofone\@citeb}% +% \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi}% +% \@esphack} +%\makeatother +% +% It is called at the start of the document, before the first \cite, like: +% \bstctlcite{IEEEexample:BSTcontrol} +% +% IEEEtran.cls V1.6 and later does provide this command. + + + +% #0 turns off the display of the number for articles. +% #1 enables +FUNCTION {default.is.use.number.for.article} { #1 } + + +% #0 turns off the display of the paper and type fields in @inproceedings. +% #1 enables +FUNCTION {default.is.use.paper} { #1 } + + +% #0 turns off the forced use of "et al." +% #1 enables +FUNCTION {default.is.forced.et.al} { #0 } + +% The maximum number of names that can be present beyond which an "et al." +% usage is forced. Be sure that num.names.shown.with.forced.et.al (below) +% is not greater than this value! +% Note: There are many instances of references in IEEE journals which have +% a very large number of authors as well as instances in which "et al." is +% used profusely. +FUNCTION {default.max.num.names.before.forced.et.al} { #10 } + +% The number of names that will be shown with a forced "et al.". +% Must be less than or equal to max.num.names.before.forced.et.al +FUNCTION {default.num.names.shown.with.forced.et.al} { #1 } + + +% #0 turns off the alternate interword spacing for entries with URLs. +% #1 enables +FUNCTION {default.is.use.alt.interword.spacing} { #1 } + +% If alternate interword spacing for entries with URLs is enabled, this is +% the interword spacing stretch factor that will be used. For example, the +% default "4" here means that the interword spacing in entries with URLs can +% stretch to four times normal. Does not have to be an integer. Note that +% the value specified here can be overridden by the user in their LaTeX +% code via a command such as: +% "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to +% that via the IEEEtranBSTCTL entry type. +FUNCTION {default.ALTinterwordstretchfactor} { "4" } + + +% #0 turns off the "dashification" of repeated (i.e., identical to those +% of the previous entry) names. IEEE normally does this. +% #1 enables +FUNCTION {default.is.dash.repeated.names} { #1 } + + +% The default name format control string. +FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" } + + +% The default LaTeX font command for the names. +FUNCTION {default.name.latex.cmd}{ "" } + + +% Other controls that cannot be accessed via IEEEtranBSTCTL entry type. + +% #0 turns off the terminal startup banner/completed message so as to +% operate more quietly. +% #1 enables +FUNCTION {is.print.banners.to.terminal} { #1 } + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% FILE VERSION AND BANNER %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION{bst.file.version} { "1.11" } +FUNCTION{bst.file.date} { "2003/04/02" } +FUNCTION{bst.file.website} { "http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/" } + +FUNCTION {banner.message} +{ is.print.banners.to.terminal + { "-- IEEEtranS.bst version" " " * bst.file.version * + " (" * bst.file.date * ") " * "by Michael Shell." * + top$ + "-- " bst.file.website * + top$ + "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." * + top$ + "** Sorting version - not for use with work to be submitted to the IEEE." + top$ + } + { skip$ } + if$ +} + +FUNCTION {completed.message} +{ is.print.banners.to.terminal + { "" + top$ + "Done." + top$ + } + { skip$ } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%%%% +%% STRING CONSTANTS %% +%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {bbl.and}{ "and" } +FUNCTION {bbl.etal}{ "et~al." } +FUNCTION {bbl.editors}{ "eds." } +FUNCTION {bbl.editor}{ "ed." } +FUNCTION {bbl.edition}{ "ed." } +FUNCTION {bbl.volume}{ "vol." } +FUNCTION {bbl.of}{ "of" } +FUNCTION {bbl.number}{ "no." } +FUNCTION {bbl.in}{ "in" } +FUNCTION {bbl.pages}{ "pp." } +FUNCTION {bbl.page}{ "p." } +FUNCTION {bbl.chapter}{ "ch." } +FUNCTION {bbl.paper}{ "paper" } +FUNCTION {bbl.part}{ "pt." } +FUNCTION {bbl.patent}{ "Patent" } +FUNCTION {bbl.patentUS}{ "U.S." } +FUNCTION {bbl.revision}{ "Rev." } +FUNCTION {bbl.series}{ "ser." } +FUNCTION {bbl.standard}{ "Std." } +FUNCTION {bbl.techrep}{ "Tech. Rep." } +FUNCTION {bbl.mthesis}{ "Master's thesis" } +FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" } +FUNCTION {bbl.urlprefix}{ "[Online]. Available:" } +FUNCTION {bbl.st}{ "st" } +FUNCTION {bbl.nd}{ "nd" } +FUNCTION {bbl.rd}{ "rd" } +FUNCTION {bbl.th}{ "th" } + + +% This is the LaTeX spacer that is used when a larger than normal space +% is called for (such as just before the address:publisher). +FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " } + +% The LaTeX code for dashes that are used to represent repeated names. +% Note: Some older IEEE journals used something like +% "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along +% the baseline. However, IEEE now uses a thinner, above baseline, +% six dash long sequence. +FUNCTION {repeated.name.dashes} { "------" } + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% PREDEFINED STRING MACROS %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +MACRO {jan} {"Jan."} +MACRO {feb} {"Feb."} +MACRO {mar} {"Mar."} +MACRO {apr} {"Apr."} +MACRO {may} {"May"} +MACRO {jun} {"June"} +MACRO {jul} {"July"} +MACRO {aug} {"Aug."} +MACRO {sep} {"Sept."} +MACRO {oct} {"Oct."} +MACRO {nov} {"Nov."} +MACRO {dec} {"Dec."} + + + +%%%%%%%%%%%%%%%%%% +%% ENTRY FIELDS %% +%%%%%%%%%%%%%%%%%% + +ENTRY + { address + assignee + author + booktitle + chapter + day + dayfiled + edition + editor + howpublished + institution + intype + journal + key + language + month + monthfiled + nationality + note + number + organization + pages + paper + publisher + school + series + revision + title + type + url + volume + year + yearfiled + CTLuse_article_number + CTLuse_paper + CTLuse_forced_etal + CTLmax_names_forced_etal + CTLnames_show_etal + CTLuse_alt_spacing + CTLalt_stretch_factor + CTLdash_repeated_names + CTLname_format_string + CTLname_latex_cmd + } + {} + { label } + + + + +%%%%%%%%%%%%%%%%%%%%%%% +%% INTEGER VARIABLES %% +%%%%%%%%%%%%%%%%%%%%%%% + +INTEGERS { prev.status.punct this.status.punct punct.std + punct.no punct.comma punct.period + prev.status.space this.status.space space.std + space.no space.normal space.large + prev.status.quote this.status.quote quote.std + quote.no quote.close + prev.status.nline this.status.nline nline.std + nline.no nline.newblock + status.cap cap.std + cap.no cap.yes} + +INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames } + +INTEGERS { is.use.number.for.article + is.use.paper + is.forced.et.al + max.num.names.before.forced.et.al + num.names.shown.with.forced.et.al + is.use.alt.interword.spacing + is.dash.repeated.names} + + +%%%%%%%%%%%%%%%%%%%%%% +%% STRING VARIABLES %% +%%%%%%%%%%%%%%%%%%%%%% + +STRINGS { bibinfo + longest.label + oldname + s + t + ALTinterwordstretchfactor + name.format.string + name.latex.cmd} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOW LEVEL FUNCTIONS %% +%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {initialize.controls} +{ default.is.use.number.for.article 'is.use.number.for.article := + default.is.use.paper 'is.use.paper := + default.is.forced.et.al 'is.forced.et.al := + default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al := + default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al := + default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing := + default.is.dash.repeated.names 'is.dash.repeated.names := + default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor := + default.name.format.string 'name.format.string := + default.name.latex.cmd 'name.latex.cmd := +} + + +% This IEEEtran.bst features a very powerful and flexible mechanism for +% controlling the capitalization, punctuation, spacing, quotation, and +% newlines of the formatted entry fields. (Note: IEEEtran.bst does not need +% or use the newline/newblock feature, but it has been implemented for +% possible future use.) The output states of IEEEtran.bst consist of +% multiple independent attributes and, as such, can be thought of as being +% vectors, rather than the simple scalar values ("before.all", +% "mid.sentence", etc.) used in most other .bst files. +% +% The more flexible and complex design used here was motivated in part by +% IEEE's rather unusual bibliography style. For example, IEEE ends the +% previous field item with a period and large space prior to the publisher +% address; the @electronic entry types use periods as inter-item punctuation +% rather than the commas used by the other entry types; and URLs are never +% followed by periods even though they are the last item in the entry. +% Although it is possible to accommodate these features with the conventional +% output state system, the seemingly endless exceptions make for convoluted, +% unreliable and difficult to maintain code. +% +% IEEEtran.bst's output state system can be easily understood via a simple +% illustration of two most recently formatted entry fields (on the stack): +% +% CURRENT_ITEM +% "PREVIOUS_ITEM +% +% which, in this example, is to eventually appear in the bibliography as: +% +% "PREVIOUS_ITEM," CURRENT_ITEM +% +% It is the job of the output routine to take the previous item off of the +% stack (while leaving the current item at the top of the stack), apply its +% trailing punctuation (including closing quote marks) and spacing, and then +% to write the result to BibTeX's output buffer: +% +% "PREVIOUS_ITEM," +% +% Punctuation (and spacing) between items is often determined by both of the +% items rather than just the first one. The presence of quotation marks +% further complicates the situation because, in standard English, trailing +% punctuation marks are supposed to be contained within the quotes. +% +% IEEEtran.bst maintains two output state (aka "status") vectors which +% correspond to the previous and current (aka "this") items. Each vector +% consists of several independent attributes which track punctuation, +% spacing, quotation, and newlines. Capitalization status is handled by a +% separate scalar because the format routines, not the output routine, +% handle capitalization and, therefore, there is no need to maintain the +% capitalization attribute for both the "previous" and "this" items. +% +% When a format routine adds a new item, it copies the current output status +% vector to the previous output status vector and (usually) resets the +% current (this) output status vector to a "standard status" vector. Using a +% "standard status" vector in this way allows us to redefine what we mean by +% "standard status" at the start of each entry handler and reuse the same +% format routines under the various inter-item separation schemes. For +% example, the standard status vector for the @book entry type may use +% commas for item separators, while the @electronic type may use periods, +% yet both entry handlers exploit many of the exact same format routines. +% +% Because format routines have write access to the output status vector of +% the previous item, they can override the punctuation choices of the +% previous format routine! Therefore, it becomes trivial to implement rules +% such as "Always use a period and a large space before the publisher." By +% pushing the generation of the closing quote mark to the output routine, we +% avoid all the problems caused by having to close a quote before having all +% the information required to determine what the punctuation should be. +% +% The IEEEtran.bst output state system can easily be expanded if needed. +% For instance, it is easy to add a "space.tie" attribute value if the +% bibliography rules mandate that two items have to be joined with an +% unbreakable space. + +FUNCTION {initialize.status.constants} +{ #0 'punct.no := + #1 'punct.comma := + #2 'punct.period := + #0 'space.no := + #1 'space.normal := + #2 'space.large := + #0 'quote.no := + #1 'quote.close := + #0 'cap.no := + #1 'cap.yes := + #0 'nline.no := + #1 'nline.newblock := +} + +FUNCTION {std.status.using.comma} +{ punct.comma 'punct.std := + space.normal 'space.std := + quote.no 'quote.std := + nline.no 'nline.std := + cap.no 'cap.std := +} + +FUNCTION {std.status.using.period} +{ punct.period 'punct.std := + space.normal 'space.std := + quote.no 'quote.std := + nline.no 'nline.std := + cap.yes 'cap.std := +} + +FUNCTION {initialize.prev.this.status} +{ punct.no 'prev.status.punct := + space.no 'prev.status.space := + quote.no 'prev.status.quote := + nline.no 'prev.status.nline := + punct.no 'this.status.punct := + space.no 'this.status.space := + quote.no 'this.status.quote := + nline.no 'this.status.nline := + cap.yes 'status.cap := +} + +FUNCTION {this.status.std} +{ punct.std 'this.status.punct := + space.std 'this.status.space := + quote.std 'this.status.quote := + nline.std 'this.status.nline := +} + +FUNCTION {cap.status.std}{ cap.std 'status.cap := } + +FUNCTION {this.to.prev.status} +{ this.status.punct 'prev.status.punct := + this.status.space 'prev.status.space := + this.status.quote 'prev.status.quote := + this.status.nline 'prev.status.nline := +} + + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ { skip$ } + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + { skip$ } + if$ +} + + +% 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$ +} + + +% pushes true if the single char string on the stack is in the +% range of "0" to "9" +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +% multiplies the integer on the stack by a factor of 10 +FUNCTION {bump.int.mag} +{ #0 'multiresult := + { duplicate$ #0 > } + { #1 - + multiresult #10 + + 'multiresult := + } + while$ +pop$ +multiresult +} + +% converts a single character string on the stack to an integer +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 + } + if$ +} + +% converts a string on the stack to an integer +FUNCTION {string.to.integer} +{ duplicate$ text.length$ 'namesleft := + #1 'nameptr := + #0 'numnames := + { nameptr namesleft > not } + { duplicate$ nameptr #1 substring$ + char.to.integer numnames bump.int.mag + + 'numnames := + nameptr #1 + + 'nameptr := + } + while$ +pop$ +numnames +} + + + + +% The output routines write out the *next* to the top (previous) item on the +% stack, adding punctuation and such as needed. Since IEEEtran.bst maintains +% the output status for the top two items on the stack, these output +% routines have to consider the previous output status (which corresponds to +% the item that is being output). Full independent control of punctuation, +% closing quote marks, spacing, and newblock is provided. +% +% "output.nonnull" does not check for the presence of a previous empty +% item. +% +% "output" does check for the presence of a previous empty item and will +% remove an empty item rather than outputing it. +% +% "output.warn" is like "output", but will issue a warning if it detects +% an empty item. + +FUNCTION {output.nonnull} +{ swap$ + prev.status.punct punct.comma = + { "," * } + { skip$ } + if$ + prev.status.punct punct.period = + { add.period$ } + { skip$ } + if$ + prev.status.quote quote.close = + { "''" * } + { skip$ } + if$ + prev.status.space space.normal = + { " " * } + { skip$ } + if$ + prev.status.space space.large = + { large.space * } + { skip$ } + if$ + write$ + prev.status.nline nline.newblock = + { newline$ "\newblock " write$ } + { skip$ } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.warn} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +% "fin.entry" is the output routine that handles the last item of the entry +% (which will be on the top of the stack when "fin.entry" is called). + +FUNCTION {fin.entry} +{ this.status.punct punct.no = + { skip$ } + { add.period$ } + if$ + this.status.quote quote.close = + { "''" * } + { skip$ } + if$ +write$ +newline$ +} + + +FUNCTION {is.last.char.not.punct} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {is.multiple.pages} +{ '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 {capitalize}{ "u" change.case$ "t" change.case$ } + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} + +FUNCTION {do.name.latex.cmd} +{ name.latex.cmd + empty$ + { skip$ } + { name.latex.cmd "{" * swap$ * "}" * } + if$ +} + +% IEEEtran.bst uses its own \BIBforeignlanguage command which directly +% invokes the TeX hyphenation patterns without the need of the Babel +% package. Babel does a lot more than switch hyphenation patterns and +% its loading can cause unintended effects in many class files (such as +% IEEEtran.cls). +FUNCTION {select.language} +{ duplicate$ empty$ 'pop$ + { language empty$ 'skip$ + { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * } + if$ + } + if$ +} + +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {space.word}{ " " swap$ * " " * } + + +% Field Conditioners, Converters, Checkers and External Interfaces + +FUNCTION {empty.field.to.null.string} +{ duplicate$ empty$ + { pop$ "" } + { skip$ } + if$ +} + +FUNCTION {either.or.check} +{ empty$ + { pop$ } + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {empty.entry.warn} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ url empty$ + and and and and and and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + + +% The bibinfo system provides a way for the electronic parsing/acquisition +% of a bibliography's contents as is done by ReVTeX. For example, a field +% could be entered into the bibliography as: +% \bibinfo{volume}{2} +% Only the "2" would show up in the document, but the LaTeX \bibinfo command +% could do additional things with the information. IEEEtran.bst does provide +% a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is +% currently not used as the bogus bibinfo functions defined here output the +% entry values directly without the \bibinfo wrapper. The bibinfo functions +% themselves (and the calls to them) are retained for possible future use. +% +% bibinfo.check avoids acting on missing fields while bibinfo.warn will +% issue a warning message if a missing field is detected. Prior to calling +% the bibinfo functions, the user should push the field value and then its +% name string, in that order. + +FUNCTION {bibinfo.check} +{ swap$ duplicate$ missing$ + { pop$ pop$ "" } + { duplicate$ empty$ + { swap$ pop$ } + { swap$ pop$ } + if$ + } + if$ +} + +FUNCTION {bibinfo.warn} +{ swap$ duplicate$ missing$ + { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" } + { duplicate$ empty$ + { swap$ "empty " swap$ * " in " * cite$ * warning$ } + { swap$ pop$ } + if$ + } + if$ +} + + +% IEEE separates large numbers with more than 4 digits into groups of +% three. IEEE uses a small space to separate these number groups. +% Typical applications include patent and page numbers. + +% number of consecutive digits required to trigger the group separation. +FUNCTION {large.number.trigger}{ #5 } + +% For numbers longer than the trigger, this is the blocksize of the groups. +% The blocksize must be less than the trigger threshold, and 2 * blocksize +% must be greater than the trigger threshold (can't do more than one +% separation on the initial trigger). +FUNCTION {large.number.blocksize}{ #3 } + +% What is actually inserted between the number groups. +FUNCTION {large.number.separator}{ "\," } + +% So as to save on integer variables by reusing existing ones, numnames +% holds the current number of consecutive digits read and nameptr holds +% the number that will trigger an inserted space. +FUNCTION {large.number.separate} +{ 't := + "" + #0 'numnames := + large.number.trigger 'nameptr := + { t empty$ not } + { t #-1 #1 substring$ is.num + { numnames #1 + 'numnames := } + { #0 'numnames := + large.number.trigger 'nameptr := + } + if$ + t #-1 #1 substring$ swap$ * + t #-2 global.max$ substring$ 't := + numnames nameptr = + { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$ + nameptr large.number.blocksize - #1 + global.max$ substring$ + large.number.separator swap$ * * + nameptr large.number.blocksize - 'numnames := + large.number.blocksize #1 + 'nameptr := + } + { skip$ } + if$ + } + while$ +} + +% Converts all single dashes "-" to double dashes "--". +FUNCTION {n.dashify} +{ large.number.separate + '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$ +} + + +% This function detects entries with names that are identical to that of +% the previous entry and replaces the repeated names with dashes (if the +% "is.dash.repeated.names" user control is nonzero). +FUNCTION {name.or.dash} +{ 's := + oldname empty$ + { s 'oldname := s } + { s oldname = + { is.dash.repeated.names + { repeated.name.dashes } + { s 'oldname := s } + if$ + } + { s 'oldname := s } + if$ + } + if$ +} + +% Converts the number string on the top of the stack to +% "numerical ordinal form" (e.g., "7" to "7th"). There is +% no artificial limit to the upper bound of the numbers as the +% least significant digit always determines the ordinal form. +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$ +} + +% If the string on the top of the stack begins with a number, +% (e.g., 11th) then replace the string with the leading number +% it contains. Otherwise retain the string as-is. s holds the +% extracted number, t holds the part of the string that remains +% to be scanned. +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +% Converts the word number string on the top of the stack to +% Arabic string form. Will be successful up to "tenth". +FUNCTION {word.to.num} +{ duplicate$ "l" change.case$ 's := + s "first" = + { pop$ "1" } + { skip$ } + if$ + s "second" = + { pop$ "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$ +} + + +% Converts the string on the top of the stack to numerical +% ordinal (e.g., "11th") form. +FUNCTION {convert.edition} +{ duplicate$ empty$ 'skip$ + { duplicate$ #1 #1 substring$ is.num + { extract.num + num.to.ordinal + } + { word.to.num + duplicate$ #1 #1 substring$ is.num + { num.to.ordinal } + { "edition ordinal word " quote$ * edition * quote$ * + " may be too high (or improper) for conversion" * " in " * cite$ * warning$ + } + if$ + } + if$ + } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LATEX BIBLIOGRAPHY CODE %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {start.entry} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + initialize.prev.this.status +} + +% Here we write out all the LaTeX code that we will need. The most involved +% code sequences are those that control the alternate interword spacing and +% foreign language hyphenation patterns. The heavy use of \providecommand +% gives users a way to override the defaults. Special thanks to Javier Bezos, +% Johannes Braams, Robin Fairburns, Heiko Oberdiek, Donald Arseneau and all +% the other gurus on comp.text.tex for their help and advice on the topic of +% \selectlanguage, Babel and BibTeX. +FUNCTION {begin.bib} +{ preamble$ empty$ 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * + write$ newline$ + "\providecommand{\url}[1]{#1}" + write$ newline$ + "\csname url@rmstyle\endcsname" + write$ newline$ + "\providecommand{\newblock}{\relax}" + write$ newline$ + "\providecommand{\bibinfo}[2]{#2}" + write$ newline$ + "\providecommand\BIBentrySTDinterwordspacing{\spaceskip=0pt\relax}" + write$ newline$ + "\providecommand\BIBentryALTinterwordstretchfactor{" + ALTinterwordstretchfactor * "}" * + write$ newline$ + "\providecommand\BIBentryALTinterwordspacing{\spaceskip=\fontdimen2\font plus " + write$ newline$ + "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}" + write$ newline$ + "\providecommand\BIBforeignlanguage[2]{{%" + write$ newline$ + "\expandafter\ifx\csname l@#1\endcsname\relax" + write$ newline$ + "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%" + write$ newline$ + "\typeout{** loaded for the language `#1'. Using the pattern for}%" + write$ newline$ + "\typeout{** the default language instead.}%" + write$ newline$ + "\else" + write$ newline$ + "\language=\csname l@#1\endcsname" + write$ newline$ + "\fi" + write$ newline$ + "#2}}" + write$ newline$ +} + +FUNCTION {end.bib} +{ newline$ "\end{thebibliography}" write$ newline$ } + +FUNCTION {if.url.alt.interword.spacing} +{ is.use.alt.interword.spacing + {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$} + { skip$ } + if$ +} + +FUNCTION {if.url.std.interword.spacing} +{ is.use.alt.interword.spacing + {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$} + { skip$ } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%%%%%% +%% LONGEST LABEL PASS %% +%%%%%%%%%%%%%%%%%%%%%%%% + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +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$ +} + + + + +%%%%%%%%%%%%%%%%%%%%% +%% FORMAT HANDLERS %% +%%%%%%%%%%%%%%%%%%%%% + +%% Lower Level Formats (used by higher level formats) + +FUNCTION {format.address.org.or.pub.date} +{ 't := + "" + year empty$ + { "empty year in " cite$ * warning$ } + { skip$ } + if$ + address empty$ t empty$ and + year empty$ and month empty$ and + { skip$ } + { this.to.prev.status + this.status.std + cap.status.std + address "address" bibinfo.check * + t empty$ + { skip$ } + { punct.period 'prev.status.punct := + space.large 'prev.status.space := + address empty$ + { skip$ } + { ": " * } + if$ + t * + } + if$ + year empty$ month empty$ and + { skip$ } + { t empty$ address empty$ and + { skip$ } + { ", " * } + if$ + month empty$ + { year empty$ + { skip$ } + { year "year" bibinfo.check * } + if$ + } + { month "month" bibinfo.check * + year empty$ + { skip$ } + { " " * year "year" bibinfo.check * } + if$ + } + if$ + } + if$ + } + if$ +} + + +FUNCTION {format.names} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + this.to.prev.status + this.status.std + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + name.format.string + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { nameptr num.names.shown.with.forced.et.al #1 + = + numnames max.num.names.before.forced.et.al > + is.forced.et.al and and + { "others" 't := + #1 'namesleft := + } + { skip$ } + if$ + namesleft #1 > + { ", " * t do.name.latex.cmd * } + { + numnames #2 > + { "," * } + 'skip$ + if$ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal emphasize * + } + { + bbl.and + space.word * t do.name.latex.cmd * + } + if$ + } + if$ + } + { t do.name.latex.cmd } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + cap.status.std + } if$ +} + + + + +%% Higher Level Formats + +%% addresses/locations + +FUNCTION {format.address} +{ address duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + + + +%% author/editor names + +FUNCTION {format.authors}{ author "author" format.names } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { ", " * + get.bbl.editor + capitalize + * + } + if$ +} + + + +%% date + +FUNCTION {format.date} +{ + month "month" bibinfo.check duplicate$ empty$ + year "year" bibinfo.check duplicate$ empty$ + { swap$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + "there's a month but no year in " cite$ * warning$ } + if$ + * + } + { this.to.prev.status + this.status.std + cap.status.std + swap$ 'skip$ + { + swap$ + " " * swap$ + } + if$ + * + } + if$ +} + +FUNCTION {format.date.electronic} +{ month "month" bibinfo.check duplicate$ empty$ + year "year" bibinfo.check duplicate$ empty$ + { swap$ + { pop$ } + { "there's a month but no year in " cite$ * warning$ + pop$ ")" * "(" swap$ * + this.to.prev.status + punct.no 'this.status.punct := + space.normal 'this.status.space := + quote.no 'this.status.quote := + cap.yes 'status.cap := + } + if$ + } + { swap$ + { swap$ pop$ ")" * "(" swap$ * } + { "(" swap$ * ", " * swap$ * ")" * } + if$ + this.to.prev.status + punct.no 'this.status.punct := + space.normal 'this.status.space := + quote.no 'this.status.quote := + cap.yes 'status.cap := + } + if$ +} + + + +%% edition/title + +% Note: IEEE considers the edition to be closely associated with +% the title of a book. So, in IEEEtran.bst the edition is normally handled +% within the formatting of the title. The format.edition function is +% retained here for possible future use. +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + convert.edition + status.cap + { "t" } + { "l" } + if$ change.case$ + "edition" bibinfo.check + "~" * bbl.edition * + cap.status.std + } + if$ +} + +% This is used to format the booktitle of a conference proceedings. +% Here we use the "intype" field to provide the user a way to +% override the word "in" (e.g., with things like "presented at") +% Use of intype stops the emphasis of the booktitle to indicate that +% we no longer mean the written conference proceedings, but the +% conference itself. +FUNCTION {format.in.booktitle} +{ booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + select.language + intype missing$ + { emphasize + bbl.in " " * + } + { intype " " * } + if$ + swap$ * + cap.status.std + } + if$ +} + +% This is used to format the booktitle of collection. +% Here the "intype" field is not supported, but "edition" is. +FUNCTION {format.in.booktitle.edition} +{ booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + select.language + emphasize + edition empty$ 'skip$ + { ", " * + edition + convert.edition + "l" change.case$ + * "~" * bbl.edition * + } + if$ + bbl.in " " * swap$ * + cap.status.std + } + if$ +} + +FUNCTION {format.article.title} +{ title duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + "t" change.case$ + } + if$ + "title" bibinfo.check + duplicate$ empty$ 'skip$ + { quote.close 'this.status.quote := + is.last.char.not.punct + { punct.std 'this.status.punct := } + { punct.no 'this.status.punct := } + if$ + select.language + "``" swap$ * + cap.status.std + } + if$ +} + +FUNCTION {format.article.title.electronic} +{ title duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + "t" change.case$ + } + if$ + "title" bibinfo.check + duplicate$ empty$ + { skip$ } + { select.language } + if$ +} + +FUNCTION {format.book.title.edition} +{ title "title" bibinfo.check + duplicate$ empty$ + { "empty title in " cite$ * warning$ } + { this.to.prev.status + this.status.std + select.language + emphasize + edition empty$ 'skip$ + { ", " * + edition + convert.edition + status.cap + { "t" } + { "l" } + if$ + change.case$ + * "~" * bbl.edition * + } + if$ + cap.status.std + } + if$ +} + +FUNCTION {format.book.title} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + select.language + emphasize + } + if$ +} + + + +%% journal + +FUNCTION {format.journal} +{ journal duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + select.language + emphasize + } + if$ +} + + + +%% how published + +FUNCTION {format.howpublished} +{ howpublished duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + + + +%% institutions/organization/publishers/school + +FUNCTION {format.institution} +{ institution duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + +FUNCTION {format.organization} +{ organization duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + +FUNCTION {format.address.publisher.date} +{ publisher "publisher" bibinfo.warn format.address.org.or.pub.date } + +FUNCTION {format.address.publisher.date.nowarn} +{ publisher "publisher" bibinfo.check format.address.org.or.pub.date } + +FUNCTION {format.address.organization.date} +{ organization "organization" bibinfo.check format.address.org.or.pub.date } + +FUNCTION {format.school} +{ school duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + cap.status.std + } + if$ +} + + + +%% volume/number/series/chapter/pages + +FUNCTION {format.volume} +{ volume empty.field.to.null.string + duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + bbl.volume + status.cap + { capitalize } + { skip$ } + if$ + swap$ tie.or.space.prefix + "volume" bibinfo.check + * * + cap.status.std + } + if$ +} + +FUNCTION {format.number} +{ number empty.field.to.null.string + duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + status.cap + { bbl.number capitalize } + { bbl.number } + if$ + swap$ tie.or.space.prefix + "number" bibinfo.check + * * + cap.status.std + } + if$ +} + +FUNCTION {format.number.if.use.for.article} +{ is.use.number.for.article + { format.number } + { "" } + if$ +} + +% IEEE does not seem to tie the series so closely with the volume +% and number as is done in other bibliography styles. Instead the +% series is treated somewhat like an extension of the title. +FUNCTION {format.series} +{ series empty$ + { "" } + { this.to.prev.status + this.status.std + bbl.series " " * + series "series" bibinfo.check * + cap.status.std + } + if$ +} + + +FUNCTION {format.chapter} +{ chapter empty$ + { "" } + { this.to.prev.status + this.status.std + type empty$ + { bbl.chapter } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + cap.status.std + } + if$ +} + + +% The intended use of format.paper is for paper numbers of inproceedings. +% The paper type can be overridden via the type field. +% We allow the type to be displayed even if the paper number is absent +% for things like "postdeadline paper" +FUNCTION {format.paper} +{ is.use.paper + { paper empty$ + { type empty$ + { "" } + { this.to.prev.status + this.status.std + type "type" bibinfo.check + cap.status.std + } + if$ + } + { this.to.prev.status + this.status.std + type empty$ + { bbl.paper } + { type "type" bibinfo.check } + if$ + " " * paper + "paper" bibinfo.check + * + cap.status.std + } + if$ + } + { "" } + if$ +} + + +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { this.to.prev.status + this.status.std + duplicate$ is.multiple.pages + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + cap.status.std + } + if$ +} + + + +%% technical report number + +FUNCTION {format.tech.report.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ + this.to.prev.status + this.status.std + cap.status.std + bbl.techrep + } + { skip$ } + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ } + { this.to.prev.status + this.status.std + cap.status.std + tie.or.space.prefix * * } + if$ +} + + + +%% note + +FUNCTION {format.note} +{ note empty$ + { "" } + { this.to.prev.status + this.status.std + punct.period 'this.status.punct := + note #1 #1 substring$ + duplicate$ "{" = + { skip$ } + { status.cap + { "u" } + { "l" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + cap.yes 'status.cap := + } + if$ +} + + + +%% patent + +FUNCTION {format.patent.date} +{ this.to.prev.status + this.status.std + year empty$ + { monthfiled duplicate$ empty$ + { "monthfiled" bibinfo.check pop$ "" } + { "monthfiled" bibinfo.check } + if$ + dayfiled duplicate$ empty$ + { "dayfiled" bibinfo.check pop$ "" * } + { "dayfiled" bibinfo.check + monthfiled empty$ + { "dayfiled without a monthfiled in " cite$ * warning$ + * + } + { " " swap$ * * } + if$ + } + if$ + yearfiled empty$ + { "no year or yearfiled in " cite$ * warning$ } + { yearfiled "yearfiled" bibinfo.check + swap$ + duplicate$ empty$ + { pop$ } + { ", " * swap$ * } + if$ + } + if$ + } + { month duplicate$ empty$ + { "month" bibinfo.check pop$ "" } + { "month" bibinfo.check } + if$ + day duplicate$ empty$ + { "day" bibinfo.check pop$ "" * } + { "day" bibinfo.check + month empty$ + { "day without a month in " cite$ * warning$ + * + } + { " " swap$ * * } + if$ + } + if$ + year "year" bibinfo.check + swap$ + duplicate$ empty$ + { pop$ } + { ", " * swap$ * } + if$ + } + if$ + cap.status.std +} + +FUNCTION {format.patent.nationality.type.number} +{ this.to.prev.status + this.status.std + nationality duplicate$ empty$ + { "nationality" bibinfo.warn pop$ "" } + { "nationality" bibinfo.check + duplicate$ "l" change.case$ "united states" = + { pop$ bbl.patentUS } + { skip$ } + if$ + " " * + } + if$ + type empty$ + { bbl.patent "type" bibinfo.check } + { type "type" bibinfo.check } + if$ + * + number duplicate$ empty$ + { "number" bibinfo.warn pop$ } + { "number" bibinfo.check + large.number.separate + swap$ " " * swap$ * + } + if$ + cap.status.std +} + + + +%% standard + +FUNCTION {format.organization.institution.standard.type.number} +{ this.to.prev.status + this.status.std + organization duplicate$ empty$ + { pop$ + institution duplicate$ empty$ + { "institution" bibinfo.warn } + { "institution" bibinfo.warn " " * } + if$ + } + { "organization" bibinfo.warn " " * } + if$ + type empty$ + { bbl.standard "type" bibinfo.check } + { type "type" bibinfo.check } + if$ + * + number duplicate$ empty$ + { "number" bibinfo.check pop$ } + { "number" bibinfo.check + large.number.separate + swap$ " " * swap$ * + } + if$ + cap.status.std +} + +FUNCTION {format.revision} +{ revision empty$ + { "" } + { this.to.prev.status + this.status.std + bbl.revision + revision tie.or.space.prefix + "revision" bibinfo.check + * * + cap.status.std + } + if$ +} + + +%% thesis + +FUNCTION {format.master.thesis.type} +{ this.to.prev.status + this.status.std + type empty$ + { + bbl.mthesis + } + { + type "type" bibinfo.check + } + if$ +cap.status.std +} + +FUNCTION {format.phd.thesis.type} +{ this.to.prev.status + this.status.std + type empty$ + { + bbl.phdthesis + } + { + type "type" bibinfo.check + } + if$ +cap.status.std +} + + + +%% URL + +FUNCTION {format.url} +{ url empty$ + { "" } + { this.to.prev.status + this.status.std + cap.yes 'status.cap := + bbl.urlprefix " " * + "\url{" * url * "}" * + punct.no 'this.status.punct := + punct.period 'prev.status.punct := + space.normal 'this.status.space := + space.normal 'prev.status.space := + quote.no 'this.status.quote := + } + if$ +} + + + + +%%%%%%%%%%%%%%%%%%%% +%% ENTRY HANDLERS %% +%%%%%%%%%%%%%%%%%%%% + + +% Note: In many journals, IEEE (or the authors) tend not to show the number +% for articles, so the display of the number is controlled here by the +% switch "is.use.number.for.article" +FUNCTION {article} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.journal "journal" bibinfo.check "journal" output.warn + format.volume output + format.number.if.use.for.article output + format.pages output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {book} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + author empty$ + { format.editors "author and editor" output.warn } + { format.authors output.nonnull } + if$ + name.or.dash + format.book.title.edition output + format.series output + author empty$ + { skip$ } + { format.editors output } + if$ + format.address.publisher.date output + format.volume output + format.number output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {booklet} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.article.title "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.date output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {electronic} +{ std.status.using.period + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.date.electronic output + format.article.title.electronic output + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.note output + format.url output + fin.entry + empty.entry.warn + if.url.std.interword.spacing +} + +FUNCTION {inbook} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + author empty$ + { format.editors "author and editor" output.warn } + { format.authors output.nonnull } + if$ + name.or.dash + format.book.title.edition output + format.series output + format.address.publisher.date output + format.volume output + format.number output + format.chapter output + format.pages output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {incollection} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.in.booktitle.edition "booktitle" output.warn + format.series output + format.editors output + format.address.publisher.date.nowarn output + format.volume output + format.number output + format.chapter output + format.pages output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {inproceedings} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.in.booktitle "booktitle" output.warn + format.series output + format.editors output + format.volume output + format.number output + publisher empty$ + { format.address.organization.date output } + { format.organization "organization" bibinfo.check output + format.address.publisher.date output + } + if$ + format.paper output + format.pages output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {manual} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.book.title.edition "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.date output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {mastersthesis} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.master.thesis.type output.nonnull + format.school "school" bibinfo.warn output + format.address "address" bibinfo.check output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {misc} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.article.title output + format.howpublished "howpublished" bibinfo.check output + format.organization "organization" bibinfo.check output + format.address "address" bibinfo.check output + format.pages output + format.date output + format.note output + format.url output + fin.entry + empty.entry.warn + if.url.std.interword.spacing +} + +FUNCTION {patent} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.article.title output + format.patent.nationality.type.number output + format.patent.date output + format.note output + format.url output + fin.entry + empty.entry.warn + if.url.std.interword.spacing +} + +FUNCTION {periodical} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.editors output + name.or.dash + format.book.title "title" output.warn + format.series output + format.volume output + format.number output + format.organization "organization" bibinfo.check output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {phdthesis} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.phd.thesis.type output.nonnull + format.school "school" bibinfo.warn output + format.address "address" bibinfo.check output + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {proceedings} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.editors output + name.or.dash + format.book.title "title" output.warn + format.series output + format.volume output + format.number output + publisher empty$ + { format.address.organization.date output } + { format.organization "organization" bibinfo.check output + format.address.publisher.date output + } + if$ + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {standard} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors output + name.or.dash + format.book.title "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.organization.institution.standard.type.number output + format.revision output + format.date output + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {techreport} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.howpublished "howpublished" bibinfo.check output + format.institution "institution" bibinfo.warn output + format.address "address" bibinfo.check output + format.tech.report.number output.nonnull + format.date "year" output.warn + format.note output + format.url output + fin.entry + if.url.std.interword.spacing +} + +FUNCTION {unpublished} +{ std.status.using.comma + start.entry + if.url.alt.interword.spacing + format.authors "author" output.warn + name.or.dash + format.article.title "title" output.warn + format.date output + format.note "note" output.warn + format.url output + fin.entry + if.url.std.interword.spacing +} + + +% The special entry type which provides the user interface to the +% BST controls +FUNCTION {IEEEtranBSTCTL} +{ is.print.banners.to.terminal + { "** IEEEtran 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$ + 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_format_string + empty$ + { skip$ } + { CTLname_format_string + 'name.format.string := + } + if$ + CTLname_latex_cmd + empty$ + { skip$ } + { CTLname_latex_cmd + 'name.latex.cmd := + } + 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$ +} + + +%%%%%%%%%%%%%%%%%%% +%% ENTRY ALIASES %% +%%%%%%%%%%%%%%%%%%% +FUNCTION {conference}{inproceedings} +FUNCTION {online}{electronic} +FUNCTION {internet}{electronic} +FUNCTION {webpage}{electronic} +FUNCTION {default.type}{misc} + + + +%%%%%%%%%%%%%%%%%% +%% MAIN PROGRAM %% +%%%%%%%%%%%%%%%%%% + +READ + +EXECUTE {initialize.controls} +EXECUTE {initialize.status.constants} +EXECUTE {banner.message} + + + +% BEGIN sort code based on that of plain.bst + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + { s } + if$ +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + { skip$ } + if$ + s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ "" } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ "" } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ "" } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ "" } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {author.organization.institution.sort} +{ author empty$ + { organization empty$ + { institution empty$ + { key empty$ + { "to sort, need author, organization, institution or key in " cite$ * warning$ "" } + { key sortify } + if$ + } + { "The " #4 institution chop.word sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + + +FUNCTION {presort} +{ type$ "ieeetranbstctl" = + { key empty$ + { "_" } + { key sortify } + if$ + } + { type$ "book" = + type$ "inbook" = + or + { author.editor.sort } + { type$ "proceedings" = + type$ "periodical" = + or + { editor.organization.sort } + { type$ "manual" = + type$ "electronic" = + type$ "misc" = + or or + { author.organization.sort } + { type$ "standard" = + { author.organization.institution.sort } + { author.sort } + if$ + } + if$ + } + if$ + } + if$ + " " + * + year empty.field.to.null.string sortify + * + " " + * + title empty.field.to.null.string + sort.format.title + * + } + if$ + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +SORT + +% END sort code based on that of plain.bst + + + +EXECUTE {initialize.longest.label} +ITERATE {longest.label.pass} + +EXECUTE {begin.bib} +ITERATE {call.type$} +EXECUTE {end.bib} + +EXECUTE{completed.message} + + +%% That's all folks, mds. diff --git a/IEEEtrantools.sty b/IEEEtrantools.sty new file mode 100644 index 0000000..c5dec9d --- /dev/null +++ b/IEEEtrantools.sty @@ -0,0 +1,1754 @@ +%% +%% IEEEtrantools.sty 2002/11/18 version V1.1 +%% +%% NOTE: This text file uses UNIX line feed conventions. When (human) +%% reading this file on other platforms, you may have to use a text +%% editor that can handle lines terminated by the UNIX line feed +%% character (0x0A). +%% +%% +%% This package provides several popular and unique commands from the +%% IEEEtran.cls class (version 1.6b) file. +%% +%% The provided commands include \PARstart, \IEEEitemize, \IEEEenumerate, +%% \IEEEdescription as well as the \IEEEeqnarray, \IEEEeqnarraybox family +%% of commands including support commands such as \IEEEstrut. +%% Also provides the \bstctlcite command for the control entry types of +%% IEEEtran.bst V1.00 and later. +%% +%% IEEEtrantools.sty should not be used with IEEEtran.cls. +%% +%% The latest version and documentation of IEEEtrantools can be obtained at: +%% http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/ +%% +%% +%% Copyright (c) 2002 by Michael Shell +%% mshell@ece.gatech.edu +%% See the CTAN website above +%% for current contact information. +%% +%%********************************************************************** +%% Legal Notice: +%% This code is offered as-is without any warranty either +%% expressed or implied; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE! +%% User assumes all risk. +%% In no event shall IEEE or any contributor to this code +%% be liable for any damages or losses, including, but not limited to, +%% incidental, consequential, or any other damages, resulting from the +%% use or misuse of any information contained here. +%% +%% All comments are the opinions of their respective authors and are not +%% necessarily endorsed by the IEEE. +%% +%% This code is distributed under the Perl Artistic License +%% ( http://language.perl.com/misc/Artistic.html ) +%% and may be freely used, distributed and modified. +%% Please retain the contribution notices and credits. +%% +%%********************************************************************** +%% +%% +%% +%% Available package options (e.g., \usepackage[retainorgcmds]{IEEEtrantools} +%% +%% retainorgcmds +%% Prevents IEEEtrantools from overriding existing LaTeX commands. +%% Currently, the only effect is to preserve the original definitions +%% of itemize, enumerate and description. The IEEEtran versions are +%% always available as IEEEitemize, IEEEenumerate and IEEEdescription. +%% +%%******* +% 11/2002 V1.1 (v1.6b of IEEEtran.cls) changes: +% +% 1) In addition to the IEEE IED lists, the original LaTeX IED style list +% environments are now preserved as LaTeXitemize, LaTeXenumerate, and +% LaTeXdescription. Also, users can now redefine \makelabel within +% IEEE IED list controls. There may be some use for these in specialized +% applications. Thanks to Eli Barzilay for suggesting this feature. +% +%%********************************************************************** + + +\ProvidesPackage{IEEEtrantools}[2002/11/18 revision V1.1 by Michael Shell] +\typeout{-- See the "IEEEtrantools_doc.txt" manual for usage information.} +\NeedsTeXFormat{LaTeX2e} + + +% If IEEEtran.cls is detected, error. +{\@ifundefined{IEEEtransversionmajor}{\relax}{% +\PackageError{IEEEtrantools}{IEEEtrantools is not for use with the\MessageBreak + IEEEtran class}% + {Do not load IEEEtrantools - you don't need it.}% +}} + + +% define new needed flags to indicate document options +% and set a few "failsafe" defaults +\newif\if@retainorgcmds +\global\@retainorgcmdsfalse + + + +% IEEEtran class scratch pad registers +% dimen +\newdimen\@IEEEtrantmpdimenA +\newdimen\@IEEEtrantmpdimenB +% count +\newcount\@IEEEtrantmpcountA +\newcount\@IEEEtrantmpcountB +% token list +\newtoks\@IEEEtrantmptoksA + + +% declare the options +\DeclareOption{retainorgcmds}{\@retainorgcmdstrue} + +% get and process any supplied options +\ProcessOptions + + + +% store the normalsize baselineskip +\newskip\normalsizebaselineskip +{\normalsize \global\normalsizebaselineskip\baselineskip\relax} +% store the nominal value of jot +\newskip\normaljot +\normaljot\jot\relax + + + + + +% Itemize, Enumerate and Description (IED) List Controls +% *************************** +% +% IEEE seems to use at least two different values by +% which ITEMIZED list labels are indented to the right +% For The Journal of Lightwave Technology (JLT) and The Journal +% on Selected Areas in Communications (JSAC), they tend to use +% an indention equal to \parindent. For Transactions on Communications +% they tend to indent ITEMIZED lists a little more--- 1.3\parindent. +% We'll provide both values here for you so that you can choose +% which one you like in your document using a command such as: +% setlength{\IEEEilabelindent}{\IEEEilabelindentB} +\newdimen\IEEEilabelindentA +\IEEEilabelindentA \parindent + +\newdimen\IEEEilabelindentB +\IEEEilabelindentB 1.3\parindent +% However, we'll default to using \parindent +% which makes more sense to me +\newdimen\IEEEilabelindent +\IEEEilabelindent \IEEEilabelindentA + + +% This controls the default amount the enumerated list labels +% are indented to the right. +% Normally, this is the same as the paragraph indention +\newdimen\IEEEelabelindent +\IEEEelabelindent \parindent + +% This controls the default amount the description list labels +% are indented to the right. +% Normally, this is the same as the paragraph indention +\newdimen\IEEEdlabelindent +\IEEEdlabelindent \parindent + +% This is the value actually used within the IED lists. +% The IED environments automatically set its value to +% one of the three values above, so global changes do +% not have any effect +\newdimen\labelindent +\labelindent \parindent + +% The actual amount labels will be indented is +% \labelindent multiplied by the factor below +% corresponding to the level of nesting depth +% This provides a means by which the user can +% alter the effective \labelindent for deeper +% levels +% There may not be such a thing as correct "standard IEEE" +% values. What IEEE actually does may depend on the specific +% circumstances. +% The first list level almost always has full indention. +% The second levels I've seen have only 75% of the normal indentation +% Three level or greater nestings are very rare. I am guessing +% that they don't use any indentation. +\def\IEEElabelindentfactori{1.0} % almost always one +\def\IEEElabelindentfactorii{0.75} % 0.0 or 1.0 may be used in some cases +\def\IEEElabelindentfactoriii{0.0} % 0.75? 0.5? 0.0? +\def\IEEElabelindentfactoriv{0.0} +\def\IEEElabelindentfactorv{0.0} +\def\IEEElabelindentfactorvi{0.0} + +% value actually used within IED lists, it is auto +% set to one of the 6 values above +% global changes here have no effect +\def\labelindentfactor{1.0} + +% This controls the default spacing between the end of the IED +% list labels and the list text, when normal text is used for +% the labels. +\newdimen\IEEEiednormlabelsep +\IEEEiednormlabelsep 0.6em + +% This controls the default spacing between the end of the IED +% list labels and the list text, when math symbols are used for +% the labels (nomenclature lists). IEEE usually increases the +% spacing in these cases +\newdimen\IEEEiedmathlabelsep +\IEEEiedmathlabelsep 1.2em + +% This controls the extra vertical separation put above and +% below each IED list. IEEE usually puts a little extra spacing +% around each list. However, this spacing is barely noticeable. +\newskip\IEEEiedtopsep +\IEEEiedtopsep 2pt plus 1pt minus 1pt + + +% This command is executed within each IED list environment +% at the beginning of the list. You can use this to set the +% parameters for some/all your IED list(s) without disturbing +% global parameters that affect things other than lists. +% i.e., renewcommand{\iedlistdecl}{\setlength{\labelsep}{5em}} +% will alter the \labelsep for the next list(s) until +% \iedlistdecl is redefined. +\def\iedlistdecl{\relax} + +% This command provides an easy way to set \leftmargin based +% on the \labelwidth, \labelsep and the argument \labelindent +% Usage: \calcleftmargin{width-to-indent-the-label} +% output is in the \leftmargin variable, i.e., effectively: +% \leftmargin = argument + \labelwidth + \labelsep +% Note controlled spacing here, shield end of lines with % +\def\calcleftmargin#1{\setlength{\leftmargin}{#1}% +\addtolength{\leftmargin}{\labelwidth}% +\addtolength{\leftmargin}{\labelsep}} + +% This command provides an easy way to set \labelwidth to the +% width of the given text. It is the same as +% \settowidth{\labelwidth}{label-text} +% and useful as a shorter alternative. +% Typically used to set \labelwidth to be the width +% of the longest label in the list +\def\setlabelwidth#1{\settowidth{\labelwidth}{#1}} + +% When this command is executed, IED lists will use the +% IEEEiedmathlabelsep label separation rather than the normal +% spacing. To have an effect, this command must be executed via +% the \iedlistdecl or within the option of the IED list +% environments. +\def\usemathlabelsep{\setlength{\labelsep}{\IEEEiedmathlabelsep}} + +% A flag which controls whether the IED lists automatically +% calculate \leftmargin from \labelindent, \labelwidth and \labelsep +% Useful if you want to specify your own \leftmargin +% This flag must be set (\nocalcleftmargintrue or \nocalcleftmarginfalse) +% via the \iedlistdecl or within the option of the IED list +% environments to have an effect. +\newif\ifnocalcleftmargin +\nocalcleftmarginfalse + +% A flag which controls whether \labelindent is multiplied by +% the \labelindentfactor for each list level. +% This flag must be set via the \iedlistdecl or within the option +% of the IED list environments to have an effect. +\newif\ifnolabelindentfactor +\nolabelindentfactorfalse + + +% internal variable to indicate type of IED label +% justification +% 0 - left; 1 - center; 2 - right +\def\@iedjustify{0} + + +% commands to allow the user to control IED +% label justifications. Use these commands within +% the IED environment option or in the \iedlistdecl +% Note that changing the normal list justifications +% is nonstandard and IEEE may not like it if you do so! +% I include these commands as they may be helpful to +% those who are using these enhanced list controls for +% other non-IEEE related LaTeX work. +% itemize and enumerate automatically default to right +% justification, description defaults to left. +\def\iedlabeljustifyl{\def\@iedjustify{0}}%left +\def\iedlabeljustifyc{\def\@iedjustify{1}}%center +\def\iedlabeljustifyr{\def\@iedjustify{2}}%right + + + + +% commands to save to and restore from the list parameter copies +% this allows us to set all the list parameters within +% the list_decl and prevent \list (and its \@list) +% from overriding any of our parameters +% use \edefs instead of dimen's to conserve dimen registers +% Note controlled spacing here, shield end of lines with % +\def\@IEEEsavelistparams{\edef\@IEEEiedtopsep{\the\topsep}% +\edef\@IEEEiedlabelwidth{\the\labelwidth}% +\edef\@IEEEiedlabelsep{\the\labelsep}% +\edef\@IEEEiedleftmargin{\the\leftmargin}% +\edef\@IEEEiedpartopsep{\the\partopsep}% +\edef\@IEEEiedparsep{\the\parsep}% +\edef\@IEEEieditemsep{\the\itemsep}% +\edef\@IEEEiedrightmargin{\the\rightmargin}% +\edef\@IEEEiedlistparindent{\the\listparindent}% +\edef\@IEEEieditemindent{\the\itemindent}} + +% Note controlled spacing here, shield end of lines with % +\def\@IEEErestorelistparams{\topsep\@IEEEiedtopsep\relax% +\labelwidth\@IEEEiedlabelwidth\relax% +\labelsep\@IEEEiedlabelsep\relax% +\leftmargin\@IEEEiedleftmargin\relax% +\partopsep\@IEEEiedpartopsep\relax% +\parsep\@IEEEiedparsep\relax% +\itemsep\@IEEEieditemsep\relax% +\rightmargin\@IEEEiedrightmargin\relax% +\listparindent\@IEEEiedlistparindent\relax% +\itemindent\@IEEEieditemindent\relax} + + +% v1.6b provide original LaTeX IED list environments +% note that latex.ltx defines \itemize and \enumerate, but not \description +% which must be created by the base classes +% save original LaTeX itemize and enumerate +\let\LaTeXitemize\itemize +\let\endLaTeXitemize\enditemize +\let\LaTeXenumerate\enumerate +\let\endLaTeXenumerate\endenumerate +% base class should define \description +\let\LaTeXdescription\description +\let\endLaTeXdescription\enddescription + + +% override LaTeX's default IED lists, unless the user requested they be retained +\if@retainorgcmds\relax\else +\def\itemize{\@IEEEitemize} +\def\enditemize{\@endIEEEitemize} +\def\enumerate{\@IEEEenumerate} +\def\endenumerate{\@endIEEEenumerate} +\def\description{\@IEEEdescription} +\def\enddescription{\@endIEEEdescription} +\fi + + +% provide the user with the IEEE IED commands +\def\IEEEitemize{\@IEEEitemize} +\def\endIEEEitemize{\@endIEEEitemize} +\def\IEEEenumerate{\@IEEEenumerate} +\def\endIEEEenumerate{\@endIEEEenumerate} +\def\IEEEdescription{\@IEEEdescription} +\def\endIEEEdescription{\@endIEEEdescription} + + +% V1.6 we want to keep the IEEEtran IED list definitions as our own internal +% commands so they are protected against redefinition +\def\@IEEEitemize{\@ifnextchar[{\@@IEEEitemize}{\@@IEEEitemize[\relax]}} +\def\@IEEEenumerate{\@ifnextchar[{\@@IEEEenumerate}{\@@IEEEenumerate[\relax]}} +\def\@IEEEdescription{\@ifnextchar[{\@@IEEEdescription}{\@@IEEEdescription[\relax]}} +\def\@endIEEEitemize{\endlist} +\def\@endIEEEenumerate{\endlist} +\def\@endIEEEdescription{\endlist} + + +% DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS +% AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS +% IEEEtran itemized list MDS 1/2001 +% Note controlled spacing here, shield end of lines with % +\def\@@IEEEitemize[#1]{% + \ifnum\@itemdepth>3\relax\@toodeep\else% + \ifnum\@listdepth>5\relax\@toodeep\else% + \advance\@itemdepth\@ne% + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% + % get the labelindentfactor for this level + \advance\@listdepth\@ne% we need to know what the level WILL be + \edef\labelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% + \advance\@listdepth-\@ne% undo our increment + \def\@iedjustify{2}% right justified labels are default + % set other defaults + \nocalcleftmarginfalse% + \nolabelindentfactorfalse% + \topsep\IEEEiedtopsep% + \labelindent\IEEEilabelindent% + \labelsep\IEEEiednormlabelsep% + \partopsep 0ex% + \parsep 0ex% + \itemsep 0ex% + \rightmargin 0em% + \listparindent 0em% + \itemindent 0em% + % calculate the label width + % the user can override this later if + % they specified a \labelwidth + \settowidth{\labelwidth}{\csname labelitem\romannumeral\the\@itemdepth\endcsname}% + \@IEEEsavelistparams% save our list parameters + \list{\csname\@itemitem\endcsname}{% + \@IEEErestorelistparams% override any list{} changes + % to our globals + \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel + \iedlistdecl% let user alter parameters + #1\relax% + % If the user has requested not to use the + % labelindent factor, don't revise \labelindent + \ifnolabelindentfactor\relax% + \else\labelindent=\labelindentfactor\labelindent% + \fi% + % Unless the user has requested otherwise, + % calculate our left margin based + % on \labelindent, \labelwidth and + % \labelsep + \ifnocalcleftmargin\relax% + \else\calcleftmargin{\labelindent}% + \fi}\fi\fi}% + + +% DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS +% AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS +% IEEEtran enumerate list MDS 1/2001 +% Note controlled spacing here, shield end of lines with % +\def\@@IEEEenumerate[#1]{% + \ifnum\@enumdepth>3\relax\@toodeep\else% + \ifnum\@listdepth>5\relax\@toodeep\else% + \advance\@enumdepth\@ne% + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% + % get the labelindentfactor for this level + \advance\@listdepth\@ne% we need to know what the level WILL be + \edef\labelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% + \advance\@listdepth-\@ne% undo our increment + \def\@iedjustify{2}% right justified labels are default + % set other defaults + \nocalcleftmarginfalse% + \nolabelindentfactorfalse% + \topsep\IEEEiedtopsep% + \labelindent\IEEEelabelindent% + \labelsep\IEEEiednormlabelsep% + \partopsep 0ex% + \parsep 0ex% + \itemsep 0ex% + \rightmargin 0em% + \listparindent 0em% + \itemindent 0em% + % calculate the label width + % We'll set it to the width suitable for all labels using + % normalfont 1) to 9) + % The user can override this later + \settowidth{\labelwidth}{9)}% + \@IEEEsavelistparams% save our list parameters + \list{\csname label\@enumctr\endcsname}{\usecounter{\@enumctr}% + \@IEEErestorelistparams% override any list{} changes + % to our globals + \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel + \iedlistdecl% let user alter parameters + #1\relax% + % If the user has requested not to use the + % labelindent factor, don't revise \labelindent + \ifnolabelindentfactor\relax% + \else\labelindent=\labelindentfactor\labelindent% + \fi% + % Unless the user has requested otherwise, + % calculate our left margin based + % on \labelindent, \labelwidth and + % \labelsep + \ifnocalcleftmargin\relax% + \else\calcleftmargin{\labelindent}% + \fi}\fi\fi}% + + +% DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS +% AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS +% IEEEtran description list MDS 1/2001 +% Note controlled spacing here, shield end of lines with % +\def\@@IEEEdescription[#1]{% + \ifnum\@listdepth>5\relax\@toodeep\else% + % get the labelindentfactor for this level + \advance\@listdepth\@ne% we need to know what the level WILL be + \edef\labelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% + \advance\@listdepth-\@ne% undo our increment + \def\@iedjustify{0}% left justified labels are default + % set other defaults + \nocalcleftmarginfalse% + \nolabelindentfactorfalse% + \topsep\IEEEiedtopsep% + \labelindent\IEEEdlabelindent% + % assume normal labelsep + \labelsep\IEEEiednormlabelsep% + \partopsep 0ex% + \parsep 0ex% + \itemsep 0ex% + \rightmargin 0em% + \listparindent 0em% + \itemindent 0em% + % Bogus label width in case the user forgets + % to set it. + % TIP: If you want to see what a variable's width is you + % can use the TeX command \showthe\width-variable to + % display it on the screen during compilation + % (This might be helpful to know when you need to find out + % which label is the widest) + \settowidth{\labelwidth}{Hello}% + \@IEEEsavelistparams% save our list parameters + \list{}{\@IEEErestorelistparams% override any list{} changes + % to our globals + \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel + \iedlistdecl% let user alter parameters + #1\relax% + % If the user has requested not to use the + % labelindent factor, don't revise \labelindent + \ifnolabelindentfactor\relax% + \else\labelindent=\labelindentfactor\labelindent% + \fi% + % Unless the user has requested otherwise, + % calculate our left margin based + % on \labelindent, \labelwidth and + % \labelsep + \ifnocalcleftmargin\relax% + \else\calcleftmargin{\labelindent}\relax% + \fi}\fi} + +% v1.6b we use one makelabel that does justification as needed. +\def\@IEEEiedmakelabel#1{\relax\if\@iedjustify 0\relax +\makebox[\labelwidth][l]{\normalfont #1}\else +\if\@iedjustify 1\relax +\makebox[\labelwidth][c]{\normalfont #1}\else +\makebox[\labelwidth][r]{\normalfont #1}\fi\fi} + + + + + +% used only by IEEEtran's IEEEeqnarray as other packages may +% have their own, different, implementations +\newcounter{IEEEsubequation}[equation] + +% e.g., "1a" (used only by IEEEtran's IEEEeqnarray) +\def\theIEEEsubequation{\theequation\alph{IEEEsubequation}} +% just like LaTeX2e's \@eqnnum +\def\theequationdis{{\normalfont \normalcolor (\theequation)}}% (1) +% IEEEsubequation used only by IEEEtran's IEEEeqnarray +\def\theIEEEsubequationdis{{\normalfont \normalcolor (\theIEEEsubequation)}}% (1a) + + + + +%% +%% START OF IEEEeqnarry DEFINITIONS +%% +%% Inspired by the concepts, examples, and previous works of LaTeX +%% coders and developers such as Donald Arseneau, Fred Bartlett, +%% David Carlisle, Tony Liu, Frank Mittelbach, Piet van Oostrum, +%% Roland Winkler and Mark Wooding. +%% I don't make the claim that my work here is even near their calibre. ;) + + +% hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting +\def\@IEEEclspkgerror{\PackageError{IEEEtran}} + +\newif\if@IEEEeqnarraystarform% flag to indicate if the environment was called as the star form +\@IEEEeqnarraystarformfalse + +\newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter +% allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray +% used by IEEEeqnarraymulticol so that it can work properly in both +\@advanceIEEEeqncolcnttrue + +\newcount\@IEEEeqnnumcols % tracks how many IEEEeqnarray cols are defined +\newcount\@IEEEeqncolcnt % tracks how many IEEEeqnarray cols the user actually used + + +% The default math style used by the columns +\def\IEEEeqnarraymathstyle{\displaystyle} +% The default text style used by the columns +% default to using the current font +\def\IEEEeqnarraytextstyle{\relax} + +% like the iedlistdecl but for \IEEEeqnarray +\def\IEEEeqnarraydecl{\relax} +\def\IEEEeqnarrayboxdecl{\relax} + +% \yesnumber is the opposite of \nonumber +% a novel concept with the same def as the equationarray package +% However, we give IEEE versions too since some LaTeX packages such as +% the MDWtools mathenv.sty redefine \nonumber to something else. +\providecommand{\yesnumber}{\global\@eqnswtrue} +\def\IEEEyesnumber{\global\@eqnswtrue} +\def\IEEEnonumber{\global\@eqnswfalse} + + +\def\IEEEyessubnumber{\global\@IEEEissubequationtrue\global\@eqnswtrue% +\if@IEEEeqnarrayISinner% only do something inside an IEEEeqnarray +\if@IEEElastlinewassubequation\addtocounter{equation}{-1}\else\setcounter{IEEEsubequation}{1}\fi% +\def\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\fi} + +% flag to indicate that an equation is a sub equation +\newif\if@IEEEissubequation% +\@IEEEissubequationfalse + +% allows users to "push away" equations that get too close to the equation numbers +\def\IEEEeqnarraynumspace{\hphantom{\if@IEEEissubequation\theIEEEsubequationdis\else\theequationdis\fi}} + +% provides a way to span multiple columns within IEEEeqnarray environments +% will consider \if@advanceIEEEeqncolcnt before globally advancing the +% column counter - so as to work within \IEEEeqnarraybox +% usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text} +\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}% +% check if column is defined +\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined% +\csname @IEEEeqnarraycolPRE#2\endcsname#3\relax\relax\relax\relax\relax% +\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST#2\endcsname% +\else% if not, error and use default type +\@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak +Using a default centering column instead}% +{You must define IEEEeqnarray column types before use.}% +\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname#3\relax\relax\relax\relax\relax% +\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname% +\fi% +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi} + +% like \omit, but maintains track of the column counter for \IEEEeqnarray +\def\IEEEeqnarrayomit{\omit\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by 1\relax\fi} + + +% provides a way to define a letter referenced column type +% usage: \IEEEeqnarraydefcol{col. type letter/name}{pre insertion text}{post insertion text} +\def\IEEEeqnarraydefcol#1#2#3{\expandafter\def\csname @IEEEeqnarraycolPRE#1\endcsname{#2}% +\expandafter\def\csname @IEEEeqnarraycolPOST#1\endcsname{#3}% +\expandafter\def\csname @IEEEeqnarraycolDEF#1\endcsname{1}} + + +% provides a way to define a numerically referenced inter-column glue types +% usage: \IEEEeqnarraydefcolsep{col. glue number}{glue definition} +\def\IEEEeqnarraydefcolsep#1#2{\expandafter\def\csname @IEEEeqnarraycolSEP\romannumeral #1\endcsname{#2}% +\expandafter\def\csname @IEEEeqnarraycolSEPDEF\romannumeral #1\endcsname{1}} + + +\def\@IEEEeqnarraycolisdefined{1}% just a macro for 1, used for checking undefined column types + + +% expands and appends the given argument to the \@IEEEtrantmptoksA token list +% used to build up the \halign preamble +\def\@IEEEappendtoksA#1{\edef\@@IEEEappendtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA #1}}% +\@@IEEEappendtoksA} + +% also appends to \@IEEEtrantmptoksA, but does not expand the argument +% uses \toks8 as a scratchpad register +\def\@IEEEappendNOEXPANDtoksA#1{\toks8={#1}% +\edef\@@IEEEappendNOEXPANDtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA\the\toks8}}% +\@@IEEEappendNOEXPANDtoksA} + +% define some common column types for the user +% math +\IEEEeqnarraydefcol{l}{$\IEEEeqnarraymathstyle}{$\hfil} +\IEEEeqnarraydefcol{c}{\hfil$\IEEEeqnarraymathstyle}{$\hfil} +\IEEEeqnarraydefcol{r}{\hfil$\IEEEeqnarraymathstyle}{$} +\IEEEeqnarraydefcol{L}{$\IEEEeqnarraymathstyle{}}{{}$\hfil} +\IEEEeqnarraydefcol{C}{\hfil$\IEEEeqnarraymathstyle{}}{{}$\hfil} +\IEEEeqnarraydefcol{R}{\hfil$\IEEEeqnarraymathstyle{}}{{}$} +% text +\IEEEeqnarraydefcol{s}{\IEEEeqnarraytextstyle}{\hfil} +\IEEEeqnarraydefcol{t}{\hfil\IEEEeqnarraytextstyle}{\hfil} +\IEEEeqnarraydefcol{u}{\hfil\IEEEeqnarraytextstyle}{} + +% vertical rules +\IEEEeqnarraydefcol{v}{}{\vrule width\arrayrulewidth} +\IEEEeqnarraydefcol{vv}{\vrule width\arrayrulewidth\hfil}{\hfil\vrule width\arrayrulewidth} +\IEEEeqnarraydefcol{V}{}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth} +\IEEEeqnarraydefcol{VV}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth\hfil}% +{\hfil\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth} + +% horizontal rules +\IEEEeqnarraydefcol{h}{}{\leaders\hrule height\arrayrulewidth\hfil} +\IEEEeqnarraydefcol{H}{}{\leaders\vbox{\hrule width\arrayrulewidth\vskip\doublerulesep\hrule width\arrayrulewidth}\hfil} + +% plain +\IEEEeqnarraydefcol{x}{}{} +\IEEEeqnarraydefcol{X}{$}{$} + +% the default column type to use in the event a column type is not defined +\IEEEeqnarraydefcol{@IEEEdefault}{\hfil$\IEEEeqnarraymathstyle}{$\hfil} + + +% a zero tabskip (used for "-" col types) +\def\@IEEEeqnarraycolSEPzero{0pt plus 0pt minus 0pt} +% a centering tabskip (used for "+" col types) +\def\@IEEEeqnarraycolSEPcenter{1000pt plus 0pt minus 1000pt} + +% top level default tabskip glues for the start, end, and inter-column +% may be reset within environments not always at the top level, e.g., \IEEEeqnarraybox +\edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPcenter}% default start glue +\edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPcenter}% default end glue +\edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue + + + +% creates a vertical rule that extends from the bottom to the top a a cell +% Provided in case other packages redefine \vline some other way. +% usage: \IEEEeqnarrayvrule[rule thickness] +% If no argument is provided, \arrayrulewidth will be used for the rule thickness. +\newcommand\IEEEeqnarrayvrule[1][\arrayrulewidth]{\vrule\@width#1\relax} + +% creates a blank separator row +% usage: \IEEEeqnarrayseprow[separation length][font size commands] +% default is \IEEEeqnarrayseprow[0.25\normalbaselineskip][\relax] +% blank arguments inherit the default values +% uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers +\def\IEEEeqnarrayseprow{\relax\@ifnextchar[{\@IEEEeqnarrayseprow}{\@IEEEeqnarrayseprow[0.25\normalbaselineskip]}} +\def\@IEEEeqnarrayseprow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprow[#1]}{\@@IEEEeqnarrayseprow[#1][\relax]}} +\def\@@IEEEeqnarrayseprow[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}% +\ifx\@IEEEeqnarrayseprowARGONE\@empty% +% get the skip value, based on the font commands +% use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3 +% assign within a bogus box to confine the font changes +{\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}% +\else% +{\setbox0=\hbox{#2\relax\global\skip5=#1}}% +\fi% +\@IEEEeqnarrayhoptolastcolumn\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax} + +% creates a blank separator row, but omits all the column templates +% usage: \IEEEeqnarrayseprowcut[separation length][font size commands] +% default is \IEEEeqnarrayseprowcut[0.25\normalbaselineskip][\relax] +% blank arguments inherit the default values +% uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers +\def\IEEEeqnarrayseprowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% +\@ifnextchar[{\@IEEEeqnarrayseprowcut}{\@IEEEeqnarrayseprowcut[0.25\normalbaselineskip]}} +\def\@IEEEeqnarrayseprowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprowcut[#1]}{\@@IEEEeqnarrayseprowcut[#1][\relax]}} +\def\@@IEEEeqnarrayseprowcut[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}% +\ifx\@IEEEeqnarrayseprowARGONE\@empty% +% get the skip value, based on the font commands +% use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3 +% assign within a bogus box to confine the font changes +{\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}% +\else% +{\setbox0=\hbox{#2\relax\global\skip5=#1}}% +\fi% +\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax} + + + +% draws a single rule across all the columns optional +% argument determines the rule width, \arrayrulewidth is the default +% updates column counter as needed and turns off struts +% usage: \IEEEeqnarrayrulerow[rule line thickness] +\def\IEEEeqnarrayrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% +\@ifnextchar[{\@IEEEeqnarrayrulerow}{\@IEEEeqnarrayrulerow[\arrayrulewidth]}} +\def\@IEEEeqnarrayrulerow[#1]{\leaders\hrule height#1\hfil\relax% put in our rule +% turn off any struts +\IEEEeqnarraystrutsize{0pt}{0pt}[\relax]\relax} + + +% draws a double rule by using a single rule row, a separator row, and then +% another single rule row +% first optional argument determines the rule thicknesses, \arrayrulewidth is the default +% second optional argument determines the rule spacing, \doublerulesep is the default +% usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing] +\def\IEEEeqnarraydblrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% +\@ifnextchar[{\@IEEEeqnarraydblrulerow}{\@IEEEeqnarraydblrulerow[\arrayrulewidth]}} +\def\@IEEEeqnarraydblrulerow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerow[#1]}% +{\@@IEEEeqnarraydblrulerow[#1][\doublerulesep]}} +\def\@@IEEEeqnarraydblrulerow[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}% +% we allow the user to say \IEEEeqnarraydblrulerow[][] +\ifx\@IEEEeqnarraydblrulerowARG\@empty% +\@IEEEeqnarrayrulerow[\arrayrulewidth]% +\else% +\@IEEEeqnarrayrulerow[#1]\relax% +\fi% +\def\@IEEEeqnarraydblrulerowARG{#2}% +\ifx\@IEEEeqnarraydblrulerowARG\@empty% +\\\IEEEeqnarrayseprow[\doublerulesep][\relax]% +\else% +\\\IEEEeqnarrayseprow[#2][\relax]% +\fi% +\\\multispan{\@IEEEeqnnumcols}% +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% +\def\@IEEEeqnarraydblrulerowARG{#1}% +\ifx\@IEEEeqnarraydblrulerowARG\@empty% +\@IEEEeqnarrayrulerow[\arrayrulewidth]% +\else% +\@IEEEeqnarrayrulerow[#1]% +\fi% +} + +% draws a double rule by using a single rule row, a separator (cutting) row, and then +% another single rule row +% first optional argument determines the rule thicknesses, \arrayrulewidth is the default +% second optional argument determines the rule spacing, \doublerulesep is the default +% usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing] +\def\IEEEeqnarraydblrulerowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% +\@ifnextchar[{\@IEEEeqnarraydblrulerowcut}{\@IEEEeqnarraydblrulerowcut[\arrayrulewidth]}} +\def\@IEEEeqnarraydblrulerowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerowcut[#1]}% +{\@@IEEEeqnarraydblrulerowcut[#1][\doublerulesep]}} +\def\@@IEEEeqnarraydblrulerowcut[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}% +% we allow the user to say \IEEEeqnarraydblrulerow[][] +\ifx\@IEEEeqnarraydblrulerowARG\@empty% +\@IEEEeqnarrayrulerow[\arrayrulewidth]% +\else% +\@IEEEeqnarrayrulerow[#1]% +\fi% +\def\@IEEEeqnarraydblrulerowARG{#2}% +\ifx\@IEEEeqnarraydblrulerowARG\@empty% +\\\IEEEeqnarrayseprowcut[\doublerulesep][\relax]% +\else% +\\\IEEEeqnarrayseprowcut[#2][\relax]% +\fi% +\\\multispan{\@IEEEeqnnumcols}% +% advance column counter only if the IEEEeqnarray environment wants it +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% +\def\@IEEEeqnarraydblrulerowARG{#1}% +\ifx\@IEEEeqnarraydblrulerowARG\@empty% +\@IEEEeqnarrayrulerow[\arrayrulewidth]% +\else% +\@IEEEeqnarrayrulerow[#1]% +\fi% +} + + + +% inserts a full row's worth of &'s +% relies on \@IEEEeqnnumcols to provide the correct number of columns +% uses \@IEEEtrantmptoksA, \count0 as scratch registers +\def\@IEEEeqnarrayhoptolastcolumn{\@IEEEtrantmptoksA={}\count0=1\relax% +\loop% add cols if the user did not use them all +\ifnum\count0<\@IEEEeqnnumcols\relax% +\@IEEEappendtoksA{&}% +\advance\count0 by 1\relax% update the col count +\repeat% +\the\@IEEEtrantmptoksA%execute the &'s +} + + + +\newif\if@IEEEeqnarrayISinner % flag to indicate if we are within the lines +\@IEEEeqnarrayISinnerfalse % of an IEEEeqnarray - after the IEEEeqnarraydecl + +\edef\@IEEEeqnarrayTHEstrutheight{0pt} % height and depth of IEEEeqnarray struts +\edef\@IEEEeqnarrayTHEstrutdepth{0pt} + +\edef\@IEEEeqnarrayTHEmasterstrutheight{0pt} % default height and depth of +\edef\@IEEEeqnarrayTHEmasterstrutdepth{0pt} % struts within an IEEEeqnarray + +\edef\@IEEEeqnarrayTHEmasterstrutHSAVE{0pt} % saved master strut height +\edef\@IEEEeqnarrayTHEmasterstrutDSAVE{0pt} % and depth + +\newif\if@IEEEeqnarrayusemasterstrut % flag to indicate that the master strut value +\@IEEEeqnarrayusemasterstruttrue % is to be used + + + +% saves the strut height and depth of the master strut +\def\@IEEEeqnarraymasterstrutsave{\relax% +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% +% remove stretchability +\dimen0\skip0\relax% +\dimen2\skip2\relax% +% save values +\edef\@IEEEeqnarrayTHEmasterstrutHSAVE{\the\dimen0}% +\edef\@IEEEeqnarrayTHEmasterstrutDSAVE{\the\dimen2}} + +% restores the strut height and depth of the master strut +\def\@IEEEeqnarraymasterstrutrestore{\relax% +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutHSAVE\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutDSAVE\relax% +% remove stretchability +\dimen0\skip0\relax% +\dimen2\skip2\relax% +% restore values +\edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}} + + +% globally restores the strut height and depth to the +% master values and sets the master strut flag to true +\def\@IEEEeqnarraystrutreset{\relax% +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% +% remove stretchability +\dimen0\skip0\relax% +\dimen2\skip2\relax% +% restore values +\xdef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% +\xdef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% +\global\@IEEEeqnarrayusemasterstruttrue} + + +% if the master strut is not to be used, make the current +% values of \@IEEEeqnarrayTHEstrutheight, \@IEEEeqnarrayTHEstrutdepth +% and the use master strut flag, global +% this allows user strut commands issued in the last column to be carried +% into the isolation/strut column +\def\@IEEEeqnarrayglobalizestrutstatus{\relax% +\if@IEEEeqnarrayusemasterstrut\else% +\xdef\@IEEEeqnarrayTHEstrutheight{\@IEEEeqnarrayTHEstrutheight}% +\xdef\@IEEEeqnarrayTHEstrutdepth{\@IEEEeqnarrayTHEstrutdepth}% +\global\@IEEEeqnarrayusemasterstrutfalse% +\fi} + + + +% usage: \IEEEeqnarraystrutsize{height}{depth}[font size commands] +% If called outside the lines of an IEEEeqnarray, sets the height +% and depth of both the master and local struts. If called inside +% an IEEEeqnarray line, sets the height and depth of the local strut +% only and sets the flag to indicate the use of the local strut +% values. If the height or depth is left blank, 0.7\normalbaselineskip +% and 0.3\normalbaselineskip will be used, respectively. +% The optional argument can be used to evaluate the lengths under +% a different font size and styles. If none is specified, the current +% font is used. +% uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2 +\def\IEEEeqnarraystrutsize#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsize{#1}{#2}}{\@IEEEeqnarraystrutsize{#1}{#2}[\relax]}} +\def\@IEEEeqnarraystrutsize#1#2[#3]{\def\@IEEEeqnarraystrutsizeARG{#1}% +\ifx\@IEEEeqnarraystrutsizeARG\@empty% +{\setbox0=\hbox{#3\relax\global\skip3=0.7\normalbaselineskip}}% +\skip0=\skip3\relax% +\else% arg one present +{\setbox0=\hbox{#3\relax\global\skip3=#1\relax}}% +\skip0=\skip3\relax% +\fi% if null arg +\def\@IEEEeqnarraystrutsizeARG{#2}% +\ifx\@IEEEeqnarraystrutsizeARG\@empty% +{\setbox0=\hbox{#3\relax\global\skip3=0.3\normalbaselineskip}}% +\skip2=\skip3\relax% +\else% arg two present +{\setbox0=\hbox{#3\relax\global\skip3=#2\relax}}% +\skip2=\skip3\relax% +\fi% if null arg +% remove stretchability, just to be safe +\dimen0\skip0\relax% +\dimen2\skip2\relax% +% dimen0 = height, dimen2 = depth +\if@IEEEeqnarrayISinner% inner does not touch master strut size +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% +\@IEEEeqnarrayusemasterstrutfalse% do not use master +\else% outer, have to set master strut too +\edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}% +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% +\@IEEEeqnarrayusemasterstruttrue% use master strut +\fi} + + +% usage: \IEEEeqnarraystrutsizeadd{added height}{added depth}[font size commands] +% If called outside the lines of an IEEEeqnarray, adds the given height +% and depth to both the master and local struts. +% If called inside an IEEEeqnarray line, adds the given height and depth +% to the local strut only and sets the flag to indicate the use +% of the local strut values. +% In both cases, if a height or depth is left blank, 0pt is used instead. +% The optional argument can be used to evaluate the lengths under +% a different font size and styles. If none is specified, the current +% font is used. +% uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2 +\def\IEEEeqnarraystrutsizeadd#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsizeadd{#1}{#2}}{\@IEEEeqnarraystrutsizeadd{#1}{#2}[\relax]}} +\def\@IEEEeqnarraystrutsizeadd#1#2[#3]{\def\@IEEEeqnarraystrutsizearg{#1}% +\ifx\@IEEEeqnarraystrutsizearg\@empty% +\skip0=0pt\relax% +\else% arg one present +{\setbox0=\hbox{#3\relax\global\skip3=#1}}% +\skip0=\skip3\relax% +\fi% if null arg +\def\@IEEEeqnarraystrutsizearg{#2}% +\ifx\@IEEEeqnarraystrutsizearg\@empty% +\skip2=0pt\relax% +\else% arg two present +{\setbox0=\hbox{#3\relax\global\skip3=#2}}% +\skip2=\skip3\relax% +\fi% if null arg +% remove stretchability, just to be safe +\dimen0\skip0\relax% +\dimen2\skip2\relax% +% dimen0 = height, dimen2 = depth +\if@IEEEeqnarrayISinner% inner does not touch master strut size +% get local strut size +\expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax% +% add it to the user supplied values +\advance\dimen0 by \skip0\relax% +\advance\dimen2 by \skip2\relax% +% update the local strut size +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% +\@IEEEeqnarrayusemasterstrutfalse% do not use master +\else% outer, have to set master strut too +% get master strut size +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% +% add it to the user supplied values +\advance\dimen0 by \skip0\relax% +\advance\dimen2 by \skip2\relax% +% update the local and master strut sizes +\edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}% +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% +\@IEEEeqnarrayusemasterstruttrue% use master strut +\fi} + + +% allow user a way to see the struts +\newif\ifIEEEvisiblestruts +\IEEEvisiblestrutsfalse + +% inserts an invisible strut using the master or local strut values +% uses scratch registers \skip0, \skip2, \dimen0, \dimen2 +\def\@IEEEeqnarrayinsertstrut{\relax% +\if@IEEEeqnarrayusemasterstrut +% get master strut size +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% +\else% +% get local strut size +\expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax% +\expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax% +\fi% +% remove stretchability, probably not needed +\dimen0\skip0\relax% +\dimen2\skip2\relax% +% dimen0 = height, dimen2 = depth +% allow user to see struts if desired +\ifIEEEvisiblestruts% +\vrule width0.2pt height\dimen0 depth\dimen2\relax% +\else% +\vrule width0pt height\dimen0 depth\dimen2\relax\fi} + + +% creates an invisible strut, useable even outside \IEEEeqnarray +% if \IEEEvisiblestrutstrue, the strut will be visible and 0.2pt wide. +% usage: \IEEEstrut[height][depth][font size commands] +% default is \IEEEstrut[0.7\normalbaselineskip][0.3\normalbaselineskip][\relax] +% blank arguments inherit the default values +% uses \dimen0, \dimen2, \skip0, \skip2 +\def\IEEEstrut{\relax\@ifnextchar[{\@IEEEstrut}{\@IEEEstrut[0.7\normalbaselineskip]}} +\def\@IEEEstrut[#1]{\relax\@ifnextchar[{\@@IEEEstrut[#1]}{\@@IEEEstrut[#1][0.3\normalbaselineskip]}} +\def\@@IEEEstrut[#1][#2]{\relax\@ifnextchar[{\@@@IEEEstrut[#1][#2]}{\@@@IEEEstrut[#1][#2][\relax]}} +\def\@@@IEEEstrut[#1][#2][#3]{\mbox{#3\relax% +\def\@IEEEstrutARG{#1}% +\ifx\@IEEEstrutARG\@empty% +\skip0=0.7\normalbaselineskip\relax% +\else% +\skip0=#1\relax% +\fi% +\def\@IEEEstrutARG{#2}% +\ifx\@IEEEstrutARG\@empty% +\skip2=0.3\normalbaselineskip\relax% +\else% +\skip2=#2\relax% +\fi% +% remove stretchability, probably not needed +\dimen0\skip0\relax% +\dimen2\skip2\relax% +\ifIEEEvisiblestruts% +\vrule width0.2pt height\dimen0 depth\dimen2\relax% +\else% +\vrule width0.0pt height\dimen0 depth\dimen2\relax\fi}} + + +% enables strut mode by setting a default strut size and then zeroing the +% \baselineskip, \lineskip, \lineskiplimit and \jot +\def\IEEEeqnarraystrutmode{\IEEEeqnarraystrutsize{0.7\normalbaselineskip}{0.3\normalbaselineskip}[\relax]% +\baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt} + + + +\def\IEEEeqnarray{\@IEEEeqnarraystarformfalse\@IEEEeqnarray} +\def\endIEEEeqnarray{\end@IEEEeqnarray} + +\@namedef{IEEEeqnarray*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarray} +\@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray} + + +% \IEEEeqnarray is an enhanced \eqnarray. +% The star form defaults to not putting equation numbers at the end of each row. +% usage: \IEEEeqnarray[decl]{cols} +\def\@IEEEeqnarray{\relax\@ifnextchar[{\@@IEEEeqnarray}{\@@IEEEeqnarray[\relax]}} +\def\@@IEEEeqnarray[#1]#2{% + % default to showing the equation number or not based on whether or not + % the star form was involked + \if@IEEEeqnarraystarform\global\@eqnswfalse + \else% not the star form + \global\@eqnswtrue + \fi% if star form + \@IEEEissubequationfalse% default to no subequations + \@IEEElastlinewassubequationfalse% assume last line is not a sub equation + \@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign + \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default + \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise + \IEEEvisiblestrutsfalse% diagnostic mode defaults to off + % no extra space unless the user specifically requests it + \lineskip=0pt\relax + \lineskiplimit=0pt\relax + \baselineskip=\normalbaselineskip\relax% + \jot=\normaljot\relax% + \mathsurround\z@\relax% no extra spacing around math + \@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses, + % used in \IEEEeqnarraymulticol and in the preamble build + \stepcounter{equation}% advance equation counter before first line + \setcounter{IEEEsubequation}{0}% no subequation yet + \def\@currentlabel{\p@equation\theequation}% redefine the ref label + \IEEEeqnarraydecl\relax% allow a way for the user to make global overrides + #1\relax% allow user to override defaults + \let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers + \global\@IEEEeqncolcnt\z@% col. count = 0 for first line + \@IEEEbuildpreamble #2\end\relax% build the preamble and put it into \@IEEEtrantmptoksA + % put in the column for the equation number + \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first + \toks0={##}% + % advance the \@IEEEeqncolcnt for the isolation col, this helps with error checking + \@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}% + % add the isolation column + \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}% + % advance the \@IEEEeqncolcnt for the equation number col, this helps with error checking + \@IEEEappendtoksA{&\global\advance\@IEEEeqncolcnt by 1\relax}% + % add the equation number col to the preamble + \@IEEEappendtoksA{\tabskip\z@skip\hb@xt@\z@\bgroup\hss\the\toks0\egroup}% + % note \@IEEEeqnnumcols does not count the equation col or isolation col + % set the starting tabskip glue as determined by the preamble build + \tabskip=\@IEEEBPstartglue\relax + % begin the display alignment + \@IEEEeqnarrayISinnertrue% commands are now within the lines + $$\everycr{}\halign to\displaywidth\bgroup + % "exspand" the preamble + \span\the\@IEEEtrantmptoksA\cr} + +% enter isolation/strut column (or the next column if the user did not use +% every column), record the strut status, complete the columns, do the strut if needed, +% restore counters to correct values and exit +\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup% +\if@IEEElastlinewassubequation\global\advance\c@IEEEsubequation\m@ne\fi% +\global\advance\c@equation\m@ne% +$$\@ignoretrue} + +% need a way to remember if last line is a subequation +\newif\if@IEEElastlinewassubequation% +\@IEEElastlinewassubequationfalse + +% IEEEeqnarray uses a modifed \\ instead of the plain \cr to +% end rows. This allows for things like \\*[vskip amount] +% This "cr" macros are modified versions those for LaTeX2e's eqnarray +% the {\ifnum0=`} braces must be kept away from the last column to avoid +% altering spacing of its math, so we use & to advance to the next column +% as there is an isolation/strut column after the user's columns +\def\@IEEEeqnarraycr{\@IEEEeqnarrayglobalizestrutstatus&% save strut status and advance to next column + {\ifnum0=`}\fi + \@ifstar{% + \global\@eqpen\@M\@IEEEeqnarrayYCR + }{% + \global\@eqpen\interdisplaylinepenalty \@IEEEeqnarrayYCR + }% +} + +\def\@IEEEeqnarrayYCR{\@testopt\@IEEEeqnarrayXCR\z@skip} + +\def\@IEEEeqnarrayXCR[#1]{% + \ifnum0=`{\fi}% + \@@IEEEeqnarraycr + \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}% + +\def\@@IEEEeqnarraycr{\@IEEEtrantmptoksA={}% clear token register + \advance\@IEEEeqncolcnt by -1\relax% adjust col count because of the isolation column + \ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax + \@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak + environment}% + {Use fewer \string &'s or put more columns in the IEEEeqnarry column\MessageBreak + specifications.}\relax% + \else + \loop% add cols if the user did not use them all + \ifnum\@IEEEeqncolcnt<\@IEEEeqnnumcols\relax + \@IEEEappendtoksA{&}% + \advance\@IEEEeqncolcnt by 1\relax% update the col count + \repeat + % this number of &'s will take us the the isolation column + \fi + % execute the &'s + \the\@IEEEtrantmptoksA% + % handle the strut/isolation column + \@IEEEeqnarrayinsertstrut% do the strut if needed + \@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray + &% and enter the equation number column + % is this line needs an equation number, display it and advance the + % (sub)equation counters, record what type this line was + \if@eqnsw% + \if@IEEEissubequation\theIEEEsubequationdis\addtocounter{equation}{1}\stepcounter{IEEEsubequation}% + \global\@IEEElastlinewassubequationtrue% + \else% display a standard equation number, initialize the IEEEsubequation counter + \theequationdis\stepcounter{equation}\setcounter{IEEEsubequation}{0}% + \global\@IEEElastlinewassubequationfalse\fi% + \fi% + % reset the eqnsw flag to indicate default preference of the display of equation numbers + \if@IEEEeqnarraystarform\global\@eqnswfalse\else\global\@eqnswtrue\fi + \global\@IEEEissubequationfalse% reset the subequation flag + % reset the number of columns the user actually used + \global\@IEEEeqncolcnt\z@\relax + % the real end of the line + \cr} + + + + + +% \IEEEeqnarraybox is like \IEEEeqnarray except the box form puts everything +% inside a vtop, vbox, or vcenter box depending on the letter in the second +% optional argument (t,b,c). Vbox is the default. Unlike \IEEEeqnarray, +% equation numbers are not displayed and \IEEEeqnarraybox can be nested. +% \IEEEeqnarrayboxm is for math mode (like \array) and does not put the vbox +% within an hbox. +% \IEEEeqnarrayboxt is for text mode (like \tabular) and puts the vbox within +% a \hbox{$ $} construct. +% \IEEEeqnarraybox will auto detect whether to use \IEEEeqnarrayboxm or +% \IEEEeqnarrayboxt depending on the math mode. +% The third optional argument specifies the width this box is to be set to - +% natural width is the default. +% The * forms do not add \jot line spacing +% usage: \IEEEeqnarraybox[decl][pos][width]{cols} +\def\IEEEeqnarrayboxm{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox} +\def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox} +\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox} +\@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox} + +\def\IEEEeqnarrayboxt{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox} +\def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox} +\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox} +\@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox} + +\def\IEEEeqnarraybox{\@IEEEeqnarraystarformfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi% +\@IEEEeqnarraybox} +\def\endIEEEeqnarraybox{\end@IEEEeqnarraybox} + +\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarraystarformtrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi% +\@IEEEeqnarraybox} +\@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox} + +% flag to indicate if the \IEEEeqnarraybox needs to put things into an hbox{$ $} +% for \vcenter in non-math mode +\newif\if@IEEEeqnarrayboxHBOXSW% +\@IEEEeqnarrayboxHBOXSWfalse + +\def\@IEEEeqnarraybox{\relax\@ifnextchar[{\@@IEEEeqnarraybox}{\@@IEEEeqnarraybox[\relax]}} +\def\@@IEEEeqnarraybox[#1]{\relax\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}} +\def\@@@IEEEeqnarraybox[#1][#2]{\relax\@ifnextchar[{\@@@@IEEEeqnarraybox[#1][#2]}{\@@@@IEEEeqnarraybox[#1][#2][\relax]}} + +% #1 = decl; #2 = t,b,c; #3 = width, #4 = col specs +\def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign + \@IEEEeqnarraymasterstrutsave% save current master strut values + \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default + \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise + \IEEEvisiblestrutsfalse% diagnostic mode defaults to off + % no extra space unless the user specifically requests it + \lineskip=0pt\relax% + \lineskiplimit=0pt\relax% + \baselineskip=\normalbaselineskip\relax% + \jot=\normaljot\relax% + \mathsurround\z@\relax% no extra spacing around math + % the default end glues are zero for an \IEEEeqnarraybox + \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPzero}% default start glue + \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPzero}% default end glue + \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue + \@advanceIEEEeqncolcntfalse% do not advance the col counter for each col the user uses, + % used in \IEEEeqnarraymulticol and in the preamble build + \IEEEeqnarrayboxdecl\relax% allow a way for the user to make global overrides + #1\relax% allow user to override defaults + \let\\\@IEEEeqnarrayboxcr% replace newline with one that allows optional spacing + \@IEEEbuildpreamble #4\end\relax% build the preamble and put it into \@IEEEtrantmptoksA + % add an isolation column to the preamble to stop \\'s {} from getting into the last col + \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first + \toks0={##}% + % add the isolation column to the preamble + \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}% + % set the starting tabskip glue as determined by the preamble build + \tabskip=\@IEEEBPstartglue\relax + % begin the alignment + \everycr{}% + % use only the very first token to determine the positioning + % this stops some problems when the user uses more than one letter, + % but is probably not worth the effort + % \noindent is used as a delimiter + \def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}% + \@IEEEgrabfirstoken#2\relax\relax\noindent + % \@IEEEgrabbedfirstoken has the first token, the rest are discarded + % if we need to put things into and hbox and go into math mode, do so now + \if@IEEEeqnarrayboxHBOXSW \leavevmode \hbox \bgroup $\fi% + % use the appropriate vbox type + \if\@IEEEgrabbedfirstoken t\relax\vtop\else\if\@IEEEgrabbedfirstoken c\relax% + \vcenter\else\vbox\fi\fi\bgroup% + \@IEEEeqnarrayISinnertrue% commands are now within the lines + \ifx#3\relax\halign\else\halign to #3\relax\fi% + \bgroup + % "exspand" the preamble + \span\the\@IEEEtrantmptoksA\cr} + +% carry strut status and enter the isolation/strut column, +% exit from math mode if needed, and exit +\def\end@IEEEeqnarraybox{\@IEEEeqnarrayglobalizestrutstatus% carry strut status +&% enter isolation/strut column +\@IEEEeqnarrayinsertstrut% do strut if needed +\@IEEEeqnarraymasterstrutrestore% restore the previous master strut values +% reset the strut system for next IEEEeqnarray +% (sets local strut values back to previous master strut values) +\@IEEEeqnarraystrutreset% +% ensure last line, exit from halign, close vbox +\crcr\egroup\egroup% +% exit from math mode and close hbox if needed +\if@IEEEeqnarrayboxHBOXSW $\egroup\fi} + + + +% IEEEeqnarraybox uses a modifed \\ instead of the plain \cr to +% end rows. This allows for things like \\[vskip amount] +% This "cr" macros are modified versions those for LaTeX2e's eqnarray +% For IEEEeqnarraybox, \\* is the same as \\ +% the {\ifnum0=`} braces must be kept away from the last column to avoid +% altering spacing of its math, so we use & to advance to the isolation/strut column +% carry strut status into isolation/strut column +\def\@IEEEeqnarrayboxcr{\@IEEEeqnarrayglobalizestrutstatus% carry strut status +&% enter isolation/strut column +\@IEEEeqnarrayinsertstrut% do strut if needed +% reset the strut system for next line or IEEEeqnarray +\@IEEEeqnarraystrutreset% +{\ifnum0=`}\fi% +\@ifstar{\@IEEEeqnarrayboxYCR}{\@IEEEeqnarrayboxYCR}} + +% test and setup the optional argument to \\[] +\def\@IEEEeqnarrayboxYCR{\@testopt\@IEEEeqnarrayboxXCR\z@skip} + +% IEEEeqnarraybox does not automatically increase line spacing by \jot +\def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}% +\cr\noalign{\if@IEEEeqnarraystarform\else\vskip\jot\fi\vskip#1\relax}} + + + +% starts the halign preamble build +\def\@IEEEbuildpreamble{\@IEEEtrantmptoksA={}% clear token register +\let\@IEEEBPcurtype=u%current column type is not yet known +\let\@IEEEBPprevtype=s%the previous column type was the start +\let\@IEEEBPnexttype=u%next column type is not yet known +% ensure these are valid +\def\@IEEEBPcurglue={0pt plus 0pt minus 0pt}% +\def\@IEEEBPcurcolname{@IEEEdefault}% name of current column definition +% currently acquired numerically referenced glue +% use a name that is easier to remember +\let\@IEEEBPcurnum=\@IEEEtrantmpcountA% +\@IEEEBPcurnum=0% +% tracks number of columns in the preamble +\@IEEEeqnnumcols=0% +% record the default end glues +\edef\@IEEEBPstartglue{\@IEEEeqnarraycolSEPdefaultstart}% +\edef\@IEEEBPendglue{\@IEEEeqnarraycolSEPdefaultend}% +% now parse the user's column specifications +\@@IEEEbuildpreamble} + + +% parses and builds the halign preamble +\def\@@IEEEbuildpreamble#1#2{\let\@@nextIEEEbuildpreamble=\@@IEEEbuildpreamble% +% use only the very first token to check the end +% \noindent is used as a delimiter as \end can be present here +\def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}% +\@IEEEgrabfirstoken#1\relax\relax\noindent +\ifx\@IEEEgrabbedfirstoken\end\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else% +% identify current and next token type +\@IEEEgetcoltype{#1}{\@IEEEBPcurtype}{1}% current, error on invalid +\@IEEEgetcoltype{#2}{\@IEEEBPnexttype}{0}% next, no error on invalid next +% if curtype is a glue, get the glue def +\if\@IEEEBPcurtype g\@IEEEgetcurglue{#1}{\@IEEEBPcurglue}\fi% +% if curtype is a column, get the column def and set the current column name +\if\@IEEEBPcurtype c\@IEEEgetcurcol{#1}\fi% +% if curtype is a numeral, acquire the user defined glue +\if\@IEEEBPcurtype n\@IEEEprocessNcol{#1}\fi% +% process the acquired glue +\if\@IEEEBPcurtype g\@IEEEprocessGcol\fi% +% process the acquired col +\if\@IEEEBPcurtype c\@IEEEprocessCcol\fi% +% ready prevtype for next col spec. +\let\@IEEEBPprevtype=\@IEEEBPcurtype% +% be sure and put back the future token(s) as a group +\fi\@@nextIEEEbuildpreamble{#2}} + + +% executed just after preamble build is completed +% warn about zero cols, and if prevtype type = u, put in end tabskip glue +\def\@@IEEEfinishpreamble#1{\ifnum\@IEEEeqnnumcols<1\relax +\@IEEEclspkgerror{No column specifiers declared for IEEEeqnarray}% +{At least one column type must be declared for each IEEEeqnarray.}% +\fi%num cols less than 1 +%if last type undefined, set default end tabskip glue +\if\@IEEEBPprevtype u\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue}\fi} + + +% Identify and return the column specifier's type code +\def\@IEEEgetcoltype#1#2#3{% +% use only the very first token to determine the type +% \noindent is used as a delimiter as \end can be present here +\def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}% +\@IEEEgrabfirstoken#1\relax\relax\noindent +% \@IEEEgrabfirstoken has the first token, the rest are discarded +% n = number +% g = glue (any other char in catagory 12) +% c = letter +% e = \end +% u = undefined +% third argument: 0 = no error message, 1 = error on invalid char +\let#2=u\relax% assume invalid until know otherwise +\ifx\@IEEEgrabbedfirstoken\end\let#2=e\else +\ifcat\@IEEEgrabbedfirstoken\relax\else% screen out control sequences +\if0\@IEEEgrabbedfirstoken\let#2=n\else +\if1\@IEEEgrabbedfirstoken\let#2=n\else +\if2\@IEEEgrabbedfirstoken\let#2=n\else +\if3\@IEEEgrabbedfirstoken\let#2=n\else +\if4\@IEEEgrabbedfirstoken\let#2=n\else +\if5\@IEEEgrabbedfirstoken\let#2=n\else +\if6\@IEEEgrabbedfirstoken\let#2=n\else +\if7\@IEEEgrabbedfirstoken\let#2=n\else +\if8\@IEEEgrabbedfirstoken\let#2=n\else +\if9\@IEEEgrabbedfirstoken\let#2=n\else +\ifcat,\@IEEEgrabbedfirstoken\let#2=g\relax +\else\ifcat a\@IEEEgrabbedfirstoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi +\if#2u\relax +\if0\noexpand#3\relax\else\@IEEEclspkgerror{Invalid character in column specifications}% +{Only letters, numerals and certain other symbols are allowed \MessageBreak +as IEEEeqnarray column specifiers.}\fi\fi} + + +% identify the current letter referenced column +% if invalid, use a default column +\def\@IEEEgetcurcol#1{\expandafter\ifx\csname @IEEEeqnarraycolDEF#1\endcsname\@IEEEeqnarraycolisdefined% +\def\@IEEEBPcurcolname{#1}\else% invalid column name +\@IEEEclspkgerror{Invalid column type "#1" in column specifications.\MessageBreak +Using a default centering column instead}% +{You must define IEEEeqnarray column types before use.}% +\def\@IEEEBPcurcolname{@IEEEdefault}\fi} + + +% identify and return the predefined (punctuation) glue value +\def\@IEEEgetcurglue#1#2{% +% ! = \! (neg small) -0.16667em (-3/18 em) +% , = \, (small) 0.16667em ( 3/18 em) +% : = \: (med) 0.22222em ( 4/18 em) +% ; = \; (large) 0.27778em ( 5/18 em) +% ' = \quad 1em +% " = \qquad 2em +% . = 0.5\arraycolsep +% / = \arraycolsep +% ? = 2\arraycolsep +% * = 1fil +% + = \@IEEEeqnarraycolSEPcenter +% - = \@IEEEeqnarraycolSEPzero +% Note that all em values are referenced to the math font (textfont2) fontdimen6 +% value for 1em. +% +% use only the very first token to determine the type +% this prevents errant tokens from getting in the main text +% \noindent is used as a delimiter here +\def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}% +\@IEEEgrabfirstoken#1\relax\relax\noindent +% get the math font 1em value +% LaTeX2e's NFSS2 does not preload the fonts, but \IEEEeqnarray needs +% to gain access to the math (\textfont2) font's spacing parameters. +% So we create a bogus box here that uses the math font to ensure +% that \textfont2 is loaded and ready. If this is not done, +% the \textfont2 stuff here may not work. +% Thanks to Bernd Raichle for his 1997 post on this topic. +{\setbox0=\hbox{$\displaystyle\relax$}}% +% fontdimen6 has the width of 1em (a quad). +\@IEEEtrantmpdimenA=\fontdimen6\textfont2\relax% +% identify the glue value based on the first token +% we discard anything after the first +\if!\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else +\if,\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else +\if:\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else +\if;\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else +\if'\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else +\if"\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else +\if.\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else +\if/\@IEEEgrabbedfirstoken\edef#2{\the\arraycolsep}\else +\if?\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else +\if *\@IEEEgrabbedfirstoken\edef#2{0pt plus 1fil minus 0pt}\else +\if+\@IEEEgrabbedfirstoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else +\if-\@IEEEgrabbedfirstoken\edef#2{\@IEEEeqnarraycolSEPzero}\else +\edef#2{\@IEEEeqnarraycolSEPzero}% +\@IEEEclspkgerror{Invalid predefined inter-column glue type "#1" in\MessageBreak +column specifications. Using a default value of\MessageBreak +0pt instead}% +{Only !,:;'"./?*+ and - are valid predefined glue types in the\MessageBreak +IEEEeqnarray column specifications.}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + + + +% process a numerical digit from the column specification +% and look up the corresponding user defined glue value +% can transform current type from n to g or a as the user defined glue is acquired +\def\@IEEEprocessNcol#1{\if\@IEEEBPprevtype g% +\@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak +specifications. Ignoring consecutive glue specifiers\MessageBreak +after the first}% +{You cannot have two or more glue types next to each other\MessageBreak +in the IEEEeqnarray column specifications.}% +\let\@IEEEBPcurtype=a% abort this glue, future digits will be discarded +\@IEEEBPcurnum=0\relax% +\else% if we previously aborted a glue +\if\@IEEEBPprevtype a\@IEEEBPcurnum=0\let\@IEEEBPcurtype=a%maintain digit abortion +\else%acquire this number +% save the previous type before the numerical digits started +\if\@IEEEBPprevtype n\else\let\@IEEEBPprevsavedtype=\@IEEEBPprevtype\fi% +\multiply\@IEEEBPcurnum by 10\relax% +\advance\@IEEEBPcurnum by #1\relax% add in number, \relax is needed to stop TeX's number scan +\if\@IEEEBPnexttype n\else%close acquisition +\expandafter\ifx\csname @IEEEeqnarraycolSEPDEF\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname\@IEEEeqnarraycolisdefined% +\edef\@IEEEBPcurglue{\csname @IEEEeqnarraycolSEP\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname}% +\else%user glue not defined +\@IEEEclspkgerror{Invalid user defined inter-column glue type "\number\@IEEEBPcurnum" in\MessageBreak +column specifications. Using a default value of\MessageBreak +0pt instead}% +{You must define all IEEEeqnarray numerical inter-column glue types via\MessageBreak +\string\IEEEeqnarraydefcolsep \space before they are used in column specifications.}% +\edef\@IEEEBPcurglue{\@IEEEeqnarraycolSEPzero}% +\fi% glue defined or not +\let\@IEEEBPcurtype=g% change the type to reflect the acquired glue +\let\@IEEEBPprevtype=\@IEEEBPprevsavedtype% restore the prev type before this number glue +\@IEEEBPcurnum=0\relax%ready for next acquisition +\fi%close acquisition, get glue +\fi%discard or acquire number +\fi%prevtype glue or not +} + + +% process an acquired glue +% add any acquired column/glue pair to the preamble +\def\@IEEEprocessGcol{\if\@IEEEBPprevtype a\let\@IEEEBPcurtype=a%maintain previous glue abortions +\else +% if this is the start glue, save it, but do nothing else +% as this is not used in the preamble, but before +\if\@IEEEBPprevtype s\edef\@IEEEBPstartglue{\@IEEEBPcurglue}% +\else%not the start glue +\if\@IEEEBPprevtype g%ignore if back to back glues +\@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak +specifications. Ignoring consecutive glue specifiers\MessageBreak +after the first}% +{You cannot have two or more glue types next to each other\MessageBreak +in the IEEEeqnarray column specifications.}% +\let\@IEEEBPcurtype=a% abort this glue +\else% not a back to back glue +\if\@IEEEBPprevtype c\relax% if the previoustype was a col, add column/glue pair to preamble +\ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi +\toks0={##}% +% make preamble advance col counter if this environment needs this +\if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi +% insert the column defintion into the preamble, being careful not to expand +% the column definition +\@IEEEappendtoksA{\tabskip=\@IEEEBPcurglue}% +\@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}% +\@IEEEappendtoksA{\@IEEEBPcurcolname}% +\@IEEEappendNOEXPANDtoksA{\endcsname}% +\@IEEEappendtoksA{\the\toks0}% +\@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax% +\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}% +\@IEEEappendtoksA{\@IEEEBPcurcolname}% +\@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax% +\relax\relax\relax\relax\relax\endgroup}% +\advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble +\else% error: non-start glue with no pending column +\@IEEEclspkgerror{Inter-column glue specifier without a prior column\MessageBreak +type in the column specifications. Ignoring this glue\MessageBreak +specifier}% +{Except for the first and last positions, glue can be placed only\MessageBreak +between column types.}% +\let\@IEEEBPcurtype=a% abort this glue +\fi% previous was a column +\fi% back-to-back glues +\fi% is start column glue +\fi% prev type not a +} + + +% process an acquired letter referenced column and, if necessary, add it to the preamble +\def\@IEEEprocessCcol{\if\@IEEEBPnexttype g\else +\if\@IEEEBPnexttype n\else +% we have a column followed by something other than a glue (or numeral glue) +% so we must add this column to the preamble now +\ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi%col separator for those after the first +\if\@IEEEBPnexttype e\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue\relax}\else%put in end glue +\@IEEEappendtoksA{\tabskip=\@IEEEeqnarraycolSEPdefaultmid\relax}\fi% or default mid glue +\toks0={##}% +% make preamble advance col counter if this environment needs this +\if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi +% insert the column definition into the preamble, being careful not to expand +% the column definition +\@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}% +\@IEEEappendtoksA{\@IEEEBPcurcolname}% +\@IEEEappendNOEXPANDtoksA{\endcsname}% +\@IEEEappendtoksA{\the\toks0}% +\@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax% +\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}% +\@IEEEappendtoksA{\@IEEEBPcurcolname}% +\@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax% +\relax\relax\relax\relax\relax\endgroup}% +\advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble +\fi%next type not numeral +\fi%next type not glue +} + + +%% +%% END OF IEEEeqnarry DEFINITIONS +%% + + + + + + + + + +% \PARstart +% Definition for the big two line drop cap letter at the beginning of the +% first paragraph of journal papers. The first argument is the first letter +% of the first word, the second argument is the remaining letters of the +% first word which will be rendered in upper case. +% +% We generalize things via control macros - playing with these is fun too. +% For IEEEtrantools, we do not use a "@" in the names as these are user +% alterable controls. +% +% +% the number of lines that are indented to clear it +\providecommand{\IEEEPARstartDROPLINES}{2} +% minimum number of lines left on a page to allow a \@PARstart +% Does not take into consideration rubber shrink, so it tends to +% be overly cautious +\providecommand{\IEEEPARstartMINPAGELINES}{2} +% the depth the letter is lowered below the baseline +% the height (and size) of the letter is determined by the sum +% of this value and the height of a capital "T" in the current +% font. It is a good idea to set this value in terms of the baselineskip +% so that it can respond to changes therein. +\providecommand{\IEEEPARstartDROPDEPTH}{1.1\baselineskip} +% This is the separation distance from the drop letter to the main text. +% Lengths that depend on the font (i.e., ex, em, etc.) will be referenced +% to the font that is active when PARstart is called. +\providecommand{\IEEEPARstartSEP}{0.15em} + + +% definition of \PARstart +% THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES +% +% The token \@IEEEPARstartfont will be globally defined after the first use +% of \PARstart and will be a font command which creates the big letter +% The first argument is the first letter of the first word and the second +% argument is the rest of the first word(s). +\def\PARstart#1#2{\par{% +% if this page does not have enough space, break it and lets start +% on a new one +\@IEEEtranneedspace{\IEEEPARstartMINPAGELINES\baselineskip}{\relax}% +% calculate the desired height of the big letter +% it extends from the top of a capital "T" in the current font +% down to \IEEEPARstartDROPDEPTH below the current baseline +\settoheight{\@IEEEtrantmpdimenA}{T}% +\addtolength{\@IEEEtrantmpdimenA}{\IEEEPARstartDROPDEPTH}% +% extract the name of the current font in bold +% and place it in \@IEEEPARstartFONTNAME +\def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}% +{\bfseries% +\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}% +\xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}% +% define a font based on this name with a point size equal to the desired +% height of the drop letter +\font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax% +% save this value as a counter (integer) value (sp points) +\@IEEEtrantmpcountA=\@IEEEtrantmpdimenA% +% now get the height of the actual letter produced by this font size +\settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\MakeUppercase{#1}}% +% If something bogus happens like the first argument is empty or the +% current font is strange, do not allow a zero height. +\ifdim\@IEEEtrantmpdimenB=0pt\relax% +\typeout{** WARNING: PARstart drop letter has zero height! (line \the\inputlineno)}% +\typeout{ Forcing the drop letter font size to 10pt.}% +\@IEEEtrantmpdimenB=10pt% +\fi% +% and store it as a counter +\@IEEEtrantmpcountB=\@IEEEtrantmpdimenB% +% Since a font size doesn't exactly correspond to the height of the capital +% letters in that font, the actual height of the letter, \@IEEEtrantmpcountB, +% will be less than that desired, \@IEEEtrantmpcountA +% we need to raise the font size, \@IEEEtrantmpdimenA +% by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB +% But, TeX doesn't have floating point division, so we have to use integer +% division. Hence the use of the counters. +% We need to reduce the denominator so that the loss of the remainder will +% have minimal affect on the accuracy of the result +\divide\@IEEEtrantmpcountB by 200% +\divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB% +% Then reequalize things when we use TeX's ability to multiply by +% floating point values +\@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA% +\multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA% +% \@IEEEPARstartfont is globaly set to the calculated font of the big letter +% We need to carry this out of the local calculation area to to create the +% big letter. +\global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB% +% Now set \@IEEEtrantmpdimenA to the width of the big letter +% We need to carry this out of the local calculation area to set the +% hanging indent +\settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont\MakeUppercase{#1}}}% +% end of the isolated calculation environment +% add in the extra clearance we want +\advance\@IEEEtrantmpdimenA by \IEEEPARstartSEP% +% \@IEEEtrantmpdimenA has the width of the big letter plus the +% separation space and \@IEEEPARstartfont is the font we need to use +% Now, we make the letter and issue the hanging indent command +% The letter is placed in a box of zero width and height so that other +% text won't be displaced by it. +\noindent\hangindent\@IEEEtrantmpdimenA\hangafter=-\IEEEPARstartDROPLINES% +\makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}\raisebox{-\IEEEPARstartDROPDEPTH}[0pt][0pt]{\@IEEEPARstartfont\MakeUppercase{#1}}}\MakeUppercase{#2}} + + +% determines if the space remaining on a given page is equal to or greater +% than the specified space of argument one +% if not, execute argument two (only if the remaining space is greater than zero) +% and issue a \newpage +% +% example: \@IEEEtranneedspace{2in}{\vfill} +% +% Does not take into consideration rubber shrinkage, so it tends to +% be overly cautious +% Based on an example posted by Donald Arseneau +% Note this macro uses \@IEEEtrantmpdimenB internally for calculations, +% so DO NOT PASS \@IEEEtrantmpdimenB to this routine +% if you need a dimen register, import with \@IEEEtrantmpdimenA instead +\def\@IEEEtranneedspace#1#2{\penalty-100\begingroup%shield temp variable +\@IEEEtrantmpdimenB\pagegoal\advance\@IEEEtrantmpdimenB-\pagetotal% space left +\ifdim #1>\@IEEEtrantmpdimenB\relax% not enough space left +\ifdim\@IEEEtrantmpdimenB>\z@\relax #2\fi% +\newpage% +\fi\endgroup} + + + + +% Provide support for the control entries of IEEEtran.bst V1.00 and later. +\providecommand{\bstctlcite}[1]{\@bsphack + \@for\@citeb:=#1\do{% + \edef\@citeb{\expandafter\@firstofone\@citeb}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi}% + \@esphack} + + + + +\endinput +%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEEtrantools.sty %%%%%%%%%%%%%%%%%%%%%% +% That's all folks! + diff --git a/Public.tex b/Public.tex new file mode 100644 index 0000000..596811c --- /dev/null +++ b/Public.tex @@ -0,0 +1,45 @@ +\documentclass[12pt,letterpaper]{report} +\usepackage{fullpage} + +%========= Document start +\begin {document} + + +\thispagestyle{empty} + +\noindent{\bf Public Abstract }\\ +\\ +First Name: Ryan\\ +Middle Name: James\\ +Last Name: Calhoun\\ +Adviser's First Name: Jeffrey\\ +Adviser's Last Name: Uhlmann\\ +Co-Adviser's First Name:\\ +Co-Adviser's Last Name:\\ +Graduation Term: SP 2008\\ +Department: Computer Science\\ +Degree: MS\\ +Title: On the Relationship Between Generalized Covariance Union and the Minimal Enclosing Ellipsoid +Problem +\\ +\\ +\indent An important tool in the field of data fusion called Generalized Covariance Union (GCU) is used to combine +or merge probabilistic estimates or measurements, given in standard statistical notation. For easier +visualization during the course of research, it is common to represent the quantities involved using a set of +ellipsoids (in two dimensions, a set of ellipses). In the case of GCU, the results surprisingly appear +equivalent to finding a Minimal Enclosing Ellipsoid of Ellipsoids (MEEE), a problem from computational +geometry. +\\ +\indent This thesis presents a means to analyze and test this described behavior numerically, detailing the one- +and two-dimensional cases, using mathematics which can be easily extended into higher dimensions. The +current hypothesis, supported by experimental evidence, is that the relationship between GCU and the +MEEE problem is one of equivalence. +\\ +\indent Subsequent to this finding, pending a formal proof, it will be possible +to apply tools from computational geometry to solve data fusion problems. + + +\thispagestyle{empty} + + +\end{document} diff --git a/README.md b/README.md new file mode 100644 index 0000000..a01eadc --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# thesis + +This is my thesis. diff --git a/Thesis.tex b/Thesis.tex new file mode 100644 index 0000000..b55a468 --- /dev/null +++ b/Thesis.tex @@ -0,0 +1,138 @@ +%\documentclass[12pt,letterpaper,twoside]{report} +\documentclass[12pt,letterpaper]{report} +\linespread{1.67} % Linespacing for entire thesis +% Standard packages +\usepackage{graphicx} % PostScript figures +\usepackage[centertags,fleqn]{amsmath} +\usepackage{amsfonts} +\usepackage{amsbsy} +\usepackage{amssymb} +\usepackage{subfig} +\usepackage{caption} +\usepackage{amsthm,amstext} +\usepackage{newlfont} +%\usepackage[hang]{subfigure} \usepackage{portland} +\usepackage{multirow} +\usepackage{verbatim} +\usepackage{url} +\usepackage{euscript} +\usepackage{algorithmic} +%\usepackage{dashbox} +\usepackage{setspace} % 1.5 spacing +\usepackage{longtable} +\usepackage[fancyhdr]{UMCCsThesis} % Thesis style +\usepackage{color} +\usepackage{float} +\floatstyle{ruled} +%\newfloat{algorithm}{htbp}{loa} +%\floatname{algorithm}{Algorithm} +\usepackage{upgreek,fontenc} +\usepackage[retainorgcmds]{IEEEtrantools} + +%\usepackage{parsetree} + +\hyphenpenalty=100 +\tolerance=5000 + + +% Defines name, thesis title, etc. +\usepackage{myowndef} +\include{myeqns} + +%Define some commonly used macros here +\newcommand{\nl}{\newline\indent} +\renewcommand{\algorithmiccomment}[1]{ //\texttt{#1}} +\newcommand{\ac}{\algorithmiccomment} +\def\headrulehook{\color{black}} % Color the header rule + +% Line spacing ----------------------------------------------------------- +\newlength{\defbaselineskip} +\setlength{\defbaselineskip}{\baselineskip} +\newcommand{\setlinespacing}[1]% + {\setlength{\baselineskip}{#1 \defbaselineskip}} +\renewcommand{\doublespacing}{\setlength{\baselineskip}% + {1.0 \defbaselineskip}} +\renewcommand{\singlespacing}{\setlength{\baselineskip}{\defbaselineskip}} + +%========= Document start +\begin {document} +% Title pages +\include{chapters/cover} +%===== Justification, spacing for the main text +%\raggedbottom + +%========= Acknowledgments +\pagenumbering{roman} +\typeout{} +\setcounter{page}{2} +\addcontentsline{toc}{chapter}{Acknowledgments} +\include{chapters/acknowledgment} + +%========== Tables of contents, figures, tables +\tableofcontents +\setcounter{tocdepth}{3} +\newpage +\addcontentsline{toc}{chapter}{List of Figures} +\listoffigures +\newpage +\addcontentsline{toc}{chapter}{List of Tables} +\listoftables + +%========= List of acronyms +%\newpage +%\typeout{} +%\clearpage +%\addcontentsline{toc}{chapter}{Acronyms} +%\include{chapters/acronyms} + +%========= Definition of terms +%\newpage +%\typeout{} +%\clearpage +%\addcontentsline{toc}{chapter}{Definitions} +%\include{chapters/definitions} + + +%========== Abstract ============== +\newpage +\addcontentsline{toc}{chapter}{Abstract} +\typeout{} +\clearpage +\include{chapters/abstract} + + +%========= Main Body ============== +\cleardoublepage +\pagenumbering{arabic} + +\typeout{} +\include{chapters/chapter1} + +\typeout{} +\include{chapters/chapter2} + +\typeout{} +\include{chapters/chapter3} + +\typeout{} +\include{chapters/chapter4} + +\typeout{} +\include{chapters/chapter5} + + +%========== Appendices================== +%\appendix + +%========== Bibliography +\typeout{} +\linespread{1.0} +\setlinespacing{1.0} +\bibliography{chapters/citations.bib} +\bibliographystyle{IEEEtran} + +%========== VITA +%\typeout{} +%\linespread{1.66} +%\include{chapters/vita} +\end{document} diff --git a/ThesisPresentation.ppt b/ThesisPresentation.ppt new file mode 100644 index 0000000..6b4097d Binary files /dev/null and b/ThesisPresentation.ppt differ diff --git a/UMCCsThesis.sty b/UMCCsThesis.sty new file mode 100644 index 0000000..5f8af3c --- /dev/null +++ b/UMCCsThesis.sty @@ -0,0 +1,259 @@ +% Style file for LaTeX2e +% - for use with documentclass report +% \usepackage [fancyhdr]{McECEThesis} + +% $Id: McECEThesis.sty,v 1.9 2000/03/26 12:46:34 pkabal Exp $ + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{UMCCsThesis}[2000/03/15] + +\newif\if@fancyhdr +\DeclareOption{fancyhdr}{\@fancyhdrtrue} +\DeclareOption{plainhdr}{\@fancyhdrfalse} + +\ExecuteOptions{plainhdr} +\ProcessOptions + +%================== page layout +\newdimen \insidemargin +\newdimen \outsidemargin +\newdimen \abovemargin +\newdimen \belowmargin + +%===== page layout defined by 4 dimensions, others are calculated from these +% Define the side margins for a right-side page +\insidemargin = 1.5in % Actual space +\outsidemargin = 1.0in + +% Above margin is space above the header +% Below margin is space below footer +\abovemargin = 1.0in % Actual space +\belowmargin = 1.0in +%===== + +% Leave more space for the header (originally 12pt) +\headheight = 15pt + +% Other parameters retain their default values (values for 12pt documents) +% \headsep - space from bottom of header to top of text (25pt) +% \footskip - distance from the bottom of text to bottom of footer (30pt) + +% The rest of the dimensions are calculated from the above values +% (compensation for TeX 1in margin offsets is done here) +\textwidth = \paperwidth + \advance\textwidth by -\insidemargin + \advance\textwidth by -\outsidemargin +\textheight = \paperheight + \advance \textheight by -\abovemargin + \advance \textheight by -\headheight + \advance \textheight by -\headsep + \advance \textheight by -\belowmargin + \advance \textheight by -\footskip +\topmargin = \abovemargin + \advance \topmargin by -1in + +\oddsidemargin = \insidemargin + \advance\oddsidemargin by -1in +\if@twoside + \evensidemargin = \outsidemargin + \advance\evensidemargin by -1in +\else + \evensidemargin = \oddsidemargin +\fi + +%========= Redefine \cleardoublepage to use pagestyle plain +% Notes: +% \include xxx +% expands to \clearpage \input xxx.tex \clearpage +% \chapter +% expands to \clearpage OR \cleardoublepage +% \thispagestyle{plain} +% ... +% \cleardoublepage is modified to output an empty page with pagestyle plain +% for headings and footers. +\renewcommand{\cleardoublepage}{% + \clearpage + \if@twoside + \ifodd\c@page + \else + \hbox{}\thispagestyle{plain}\newpage + \if@twocolumn \hbox{}\newpage \fi + \fi + \fi} + +%========= Redefine \thebibliography to put a entry in the TOC +%========= Change the name from "Bibliography" to "References" +\renewcommand\bibname{References} +\let\SV@thebibliography\thebibliography +\renewcommand{\thebibliography}[1]{% + \if@twoside + \cleardoublepage + \else + \clearpage + \fi + \addcontentsline{toc}{chapter}{\bibname} + \SV@thebibliography{#1}} + +%========= Dummy definitions if datestamp package is not loaded +\ifx\datestampbox\@undefined + \let\datestampbox=\relax + \def\rcs #1{} +\fi + +%========= Fancy headings setup +% Single-sided printing +% header: 3.2 Section 5 +% -------------------- +% Double-sided printing +% header: 4 Chapter +% even -------------------- +% +% header: 3.2 Section 5 +% odd -------------------- +% + +\if@fancyhdr + \RequirePackage{fancyhdr} + \pagestyle{fancy} + \if@twoside + \renewcommand{\chaptermark}[1]{\markboth{\upshape \bfseries \scriptsize #1}{}} + \renewcommand{\sectionmark}[1]{\markright { \upshape \bfseries \scriptsize \thesection\hspace{5pt} #1}} + \fancyhf{} % clear all fields + \fancyhead[LE,RO]{\bfseries \thepage} + \fancyhead[LO]{\bfseries \nouppercase{\rightmark}} + \fancyhead[RE]{\bfseries \nouppercase{\leftmark}} + \fancyfoot[LO,RE]{} + \else + \renewcommand{\chaptermark}[1]{\markboth{\upshape \bfseries \scriptsize #1}{}} + \renewcommand{\sectionmark}[1]{\markright { \upshape \bfseries \scriptsize \thesection\hspace{5pt} #1}} + \fancyhf{} % clear all fields + \fancyhead[LE,RO]{\bfseries \thepage} + \fancyhead[LO]{\bfseries \nouppercase{\rightmark}} + \fancyhead[RE]{\bfseries \nouppercase{\leftmark}} + \fancyfoot[LO,RE]{} + %\renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}} + %\renewcommand{\sectionmark}[1]{} + %\fancyhf{} % clear all fields + %\fancyhead[RE,RO]{\bfseries \thepage} + %\fancyhead[LE,LO]{\bfseries \nouppercase{\rightmark}} + %\fancyfoot[LO,RE]{\datestampbox} + \fi + + \renewcommand{\footrulewidth}{0pt} + \renewcommand{\headrulewidth}{0.4pt} + \def\headrule{{\headrulehook + \hrule height\headrulewidth width\headwidth + \vskip-\headrulewidth}} + \def\headrulehook{} +% Notes: +% - \nouppercase is to knock out the hardwired uppercase in +% contents and bibliography +% - \headrulehook can used for colour, e.g. \def\headrulehook{color{red}} + +% Redefine plain style (used by \chapter) to just a page number at the top + \fancypagestyle{plain}{% + \fancyhf{} % clear all fields + \fancyhead[LE,RO]{\bfseries \thepage}% + \fancyfoot[LO,RE]{\datestampbox}} + +\fi + +%================== title page + +% Date set as "August 1996" +\def\Month{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi} +\date{\Month\ \number\year} + +% Organization +\newcommand\organization[1]{\def\@organization{#1}} +\def\@organization{\@latex@warning@no@line{No \noexpand\organization given}} + +% Note +\newcommand\note[1]{\def\@note{#1}} +\def\@note{\@latex@warning@no@line{No \noexpand\note given}} + +% Redefine the \maketitle macro (separate page) with new layout +% This is a simplified version of the LaTeX \maketitle macro, since we +% need only worry about a single author and a single institution. +\renewcommand\maketitle{\begin{titlepage}% + \let\footnotesize\small + \let\footnoterule\relax + \let \footnote \thanks + +% Reset the page style to empty + \pagestyle{empty} + +% -- vertical space -- +% Title with \LARGE \bfseries +% Author with \Large \itshape +% Organization with \large +% Date with \large +% -- vertical space -- +% Note + + \begin{center}% + \null\vfil \vskip 60\p@ % vertical centering (extra 60pt at top) + {\LARGE \bfseries \@title \par}% + \vskip 10ex% + {\Large \itshape \@author}% + \vskip 6ex% + {\normalsize + \lineskip 0.5em% + \begin{tabular}[t]{c}% + \@organization + \end{tabular}\par}% + \vskip 6ex% + {\large \@date \par}% + \vskip 5em% + \vfil\null % vertical centering + \@note + \end{center}\par + \@thanks + + \end{titlepage}% + +% Reset macros + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} + +%================== general changes +% Smaller section and subsection heads, ragged right +% [classes.dtx] +\def\veryraggedright{\advance\rightskip by 0pt plus 1fil\relax} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\large\bfseries\veryraggedright}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\bfseries\veryraggedright}} + + +% Placement of figures and tables htbp instead of tbp +% Figure name, Table name in bold +% [classes.dtx] +\renewcommand\fps@figure{htbp} +\renewcommand\fps@table{htbp} +\renewcommand\fnum@figure{{\reset@font\bfseries\figurename~\thefigure}} +\renewcommand\fnum@table{{\reset@font\bfseries\tablename~\thetable}} + +% Less space between the number and the section title (1em -> 0.5em) +% [ltsect.dtx] +\renewcommand\@seccntformat[1]{\csname the#1\endcsname\hskip 0.5em} + + +% Figure name becomes "Fig." (was "Figure") +\renewcommand\figurename{Fig.} diff --git a/chapters/abstract.tex b/chapters/abstract.tex new file mode 100644 index 0000000..6b033cd --- /dev/null +++ b/chapters/abstract.tex @@ -0,0 +1,6 @@ +\thispagestyle{plain} +\section*{\centering Abstract} +\vspace{40pt} +\hspace{15pt} +\input{chapters/abstract_text} +\thispagestyle{plain} diff --git a/chapters/abstract_text.tex b/chapters/abstract_text.tex new file mode 100644 index 0000000..f5af79d --- /dev/null +++ b/chapters/abstract_text.tex @@ -0,0 +1,10 @@ +\hspace{15pt} Examination of the behavior of Generalized Covariance Union (GCU) reveals a previously unsuspected superficial +relationship to the problem of finding a minimal enclosing ellipsoid of ellipsoids, also called a L\"owner ellipsoid. By +interpreting any mean and covariance pair of some estimate or measurement as the 1-$\sigma$ contour ellipsoid of its +associated Gaussian probability density function, the results of GCU appear to form a L\"owner 1-$\sigma$ ellipsoid +about the 1-$\sigma$ ellipsoids of its $n$ inputs. This thesis presents a means to analyze and test this behavior +numerically, detailing the one- and two-dimensional cases, using mathematics easily extensible into higher dimensions. +The current hypothesis, supported by experimental evidence, is that the relationship between GCU and the minimal +enclosing ellipsoid problem is one of equivalence. Subsequent to this finding, pending a formal proof, it will be +possible to apply tools from computational geometry to solve data fusion problems. + diff --git a/chapters/acknowledgment.tex b/chapters/acknowledgment.tex new file mode 100644 index 0000000..d262d6e --- /dev/null +++ b/chapters/acknowledgment.tex @@ -0,0 +1,7 @@ +%\setcounter{page}{2} +\section*{\centering Acknowledgments} +\hspace{15pt} I extend my greatest appreciation to my adviser, Dr. Jeffrey Uhlmann, for his constant support and +guidance. I thank him for his endless patience and dedication, without which this thesis could not have been realized. +He is the greatest mentor, teacher and friend, for which any student could ask. I also thank Dr. Simon Julier and Ottmar +Boschardt for their ideas and insight, which proved invaluable as this thesis progressed. + diff --git a/chapters/chapter1.tex b/chapters/chapter1.tex new file mode 100644 index 0000000..6bab4df --- /dev/null +++ b/chapters/chapter1.tex @@ -0,0 +1,100 @@ +\chapter{Introduction}\label{chapter:introduction} + +\section{Background Information} + +\PARstart{O}{ver} the last decade, Level-1 information management has matured significantly, with the development of +rigorous algorithms robust to the effects of unmodeled correlations, and corrupt and/or spurious information, in the +context of general distributed data fusion networks. Recent inroads into the development of higher level information +management applications have yielded significant improvements to the data fusion tool called Covariance Union +(CU)~\cite{uhlmann03,julier05}. CU is used to find the union of a set of input modes or state estimates in a way that +guarantees an accurate representation of the system's true state in circumstances when other tools may not; simply put, +it is a method to reduce many modes to one. + +A higher level data fusion application is likely manage information in a multimodal scheme, using either Multi +Hypothesis Tracking (MHT) or a Gaussian Mixture Model (GMM). MHT maintains multiple location and uncertainly estimates +corresponding to distinct possible states~\cite{barshalom88}. GMM is a parametrization of the Probability Density +Function (PDF) that describes the uncertainty distribution across the application. Since PDF approximations typically +only represent the significant modes of the distribution in terms of their mean and covariance, the representation +differs from that of MHT only in that a GMM interprets each mode as an explicit Gaussian PDF~\cite{fusion06}. Since +the implementation of these two techniques is identical, this thesis will use the GMM convention, of the form + \begin{equation}\label{eqn:gmm} + p(\mathbf{x})=\sum_{i=1}^Np_i\gaussN{\mathbf{x};\mu{_i},\sigma_i\sigma_i^T}, + \end{equation} +whenever referring to a multimodal state estimate, with the understanding that a Gaussian MHT model will be equivalent. + +The fusion of a set $S$ of location and uncertainty estimates---each defining a possible state of the target, only one +of which is guaranteed to be consistent---with another set $T$ can be accomplished simply by forming the Cartesian +product $S\times T$ and applying the appropriate fusion algorithm (Kalman or Covariance Intersection) to the pairs. +Unfortunately, this yields a combined estimate that has $O(|S|*|T|)$ modes, which implies that the complexity of the +fused estimate exceeds that of the original estimates. This increasing complexity will tend to exhaust available +resources and therefore must be mitigated. CU can be used to combine modes, instead of pruning those deemed unnecessary +by some metric, and therefore reduce the information complexity of the fused set in a way that correctly estimates the +cumulative effect of the remaining modes~\cite{fusion06}. + +\section{Notation} + +Determining how to represent information and uncertainty, in either a single-target application or a multimodal system, +is a key first step that impacts all aspects of the data fusion problem. The representation must provide both an +estimate of the state of the target or system of interest {\em and} its associated degree of error or uncertainty, and +the uncertainty must be defined in a form that permits it to be empirically determined. There must be a rigorous +algorithm for fusing information in the representation, and the computational complexity of the representation and its +associated fusion algorithms must be bounded for practical application~\cite{fusion06}. + +By far the most widely used information representation is the mean and covariance form, where the mean vector defines +the best estimate of the state of the target and the error covariance provides an upper bound on the expected squared +error associated with the mean. For example, the measured position of an object in two dimensions can be represented as +a vector $\v{m}$ consisting of the object's estimated mean position, e.g., $\v{m} = [x,y]^T$, and an +error covariance matrix $\m{M}$ that expresses the uncertainty associated with the estimated mean. If the error in +the estimated mean vector is denoted as $\ea$, then the error covariance matrix is an estimate of the expected squared +error, E$[\ea\ea^T]$. The estimate is said to be {\em consistent} (or conservative) if and only if $\m{M}$ $\geq$ +E$[\ea\ea^T]$ or, equivalently, $\m{M}$ - E$[\ea\ea^T]$ is positive definite or semidefinite (i.e., has no negative +eigenvalues). The full estimate of a target's state is given by the mean and covariance pair +$(\v{m},\m{M})$~\cite{fusion06,uhlmann03}. Although the GMM convention explicitly defines its own notation, as in +equation \ref{eqn:gmm}, the mean and covariance notation will be used throughout this thesis whenever referring to any +probabilistic estimate. + + +\section{Problem Definition} + +Generalized Covariance Union (GCU) forms an important part of the hierarchy of data fusion tools which includes the +Kalman filter, Covariance Intersection, and the optimal form of CU. Each of these tools is capable of generating a +consistent result over a set of $n$ input estimates $(\v{m}_i,\m{M}_i)$, given certain preconditions. However, practical +running times for the current implementation of CU and GCU prohibit the use of these tools in any real-time +applications (operational cost is roughly proportional to the number of estimates $n$, and the cube of the +dimensionality of the state space)~\cite{fusion06}. + +Research into GCU has revealed a remarkable superficial similarity to the problem of finding a Minimal Enclosing +Ellipsoid of Ellipsoids (MEEE), a common technique from computational geometry and computer graphics. These two problems +are very different, in the sense that mean and covariance estimates in tracking and data fusion refer to moments of a +possibly unknown underlying probability distribution, whereas ellipsoidal intersection and containment involves finite +volumes of space. Despite any differences between GCU and MEEE in representation and formulation, the similarities +between the results are suggestive of some level of equivalence. + +This thesis will examine the GCU optimization problem and the possible applicability of techniques from computational +geometry, by presenting evidence that GCU and MEEE techniques may in fact be used to solve the same problem. + + +\section{Organization of Thesis} + + +The organization of this thesis is outlined as follows. Chapter \ref{chapter:introduction} begins by providing background +information and motivation for the research proposed in this thesis. A definition of the problem is given next, to +outline the scope of the research. + +Work leading up to the research presented here is detailed in Chapter \ref{chapter:gcu}. This chapter will present the +Kalman filter, Covariance Intersection, and Covariance Union as part of a framework of data fusion tools. Generalized +Covariance Union is presented here as well, after this framework has been established. + +Chapter \ref{chapter:meee} will define the problem of finding a Minimal Enclosing Ellipsoid of Ellipsoids, and give a +method to test whether a proposed enclosing ellipsoid properly contains its enclosed ellipsoids, as it should. Also given +in this chapter is a transformation between mean-covariance space and ellipsoid space, in order to provide a way for the +GCU and MEEE results to be compared. + +Chapter \ref{chapter:analysis} will present the results of this research, experimental evidence and mathematical +analysis that demonstrate the relationship between GCU and MEEE. + +This thesis concludes with a summary of accomplishments and dialog for future work in Chapter +\ref{chapter:conclusion}. + + + diff --git a/chapters/chapter2.tex b/chapters/chapter2.tex new file mode 100644 index 0000000..bec5fe0 --- /dev/null +++ b/chapters/chapter2.tex @@ -0,0 +1,313 @@ +\chapter{Generalized Covariance Union}\label{chapter:gcu} + +\section{Data Fusion Framework}\label{section:framework} + +\PARstart{C}{ovariance Union}, in both its Optimal and Generalized forms, is part of a larger hierarchy of data fusion +tools which when used properly together cover a broad range of possible situations, and form a robust framework with +which to build higher-level applications~\cite{fusion06,uhlmann03}. The remainder of this section is given to present +the previously published portions of this framework, the Kalman filter, Covariance Intersection, and Optimal Covariance +Union; both as background information and to provide the proper context for Generalized Covariance Union, which is +detailed in sections \ref{section:motivation} and \ref{section:gcu}. + + +% SECTION Kalman +\subsection{Kalman Filter} + +The most basic concept of data fusion is the idea that two pieces of information can be ``fused'' to create +a new piece of information which is ``better'' than the two inputs by some metric. One tool used to perform this action +is the Kalman filter. The Kalman filter addresses the general problem of trying to estimate the state $\v{x}\in\Re$ of +a discrete-time controlled process that is governed by the linear stochastic difference equation +\begin{equation}\label{eqn:kalsto} + \v{x}_k = \m{A}\v{x}_{k-1} + \m{B}\v{u}_k + \v{w}_{k-1} , +\end{equation} +with a measurement $\v{z}\in\Re$ that is +\begin{equation}\label{eqn:kalmeasure} +\v{z}_k = \m{H}\v{x}_k + \v{v}_k. +\end{equation} +where $\v{w}_k$ and $\v{v}_k$ are random variables which represent the process and measurement noise, respectively, +where $\m{H}_i$ is the transformation for the state space of the fused estimate to the state space of the +estimate~\cite{siggraph01}. + +The filter operates in two steps for every discrete unit of time. The first step is the projection step, in which the +future state of a system is estimated, projecting forward from time step $k-1$ to the current time step $k$. This is +given by +\begin{align} + \v{x}^-_k &= \m{A}\v{x}_{k-1}+\m{B}\v{u}_k\\ + \m{P}^-_k &= \m{A}\m{P}_{k-1}\m{A}^T+\m{Q} +\end{align} +where $\m{Q}$ is the process noise covariance defining the PDF for the variable $\v{w}_k$ from equation \ref{eqn:kalsto}. +The second step is the update step, in which the actual measurements are used to correct the predicted state. This is +given by +\begin{align} + \v{x}_k &= \v{x}^-_k+\m{K}_k(\v{z}_k-\m{H}\v{x}^-_k)\\ + \m{P}_k &= (\m{I}-\m{K}_k\m{H})\m{P}^-_k,\\ +\intertext{with} + \m{K}_k &= \m{P}^-_k\m{H}^T(\m{H}\m{P}^-_k\m{H}^T+\m{R})^{-1}, +\end{align} +where $\m{R}$ is the measurement noise covariance defining the PDF for the variable $\v{v}_k$ from equation +\ref{eqn:kalmeasure}~\cite{siggraph01}. + +In addition to a time-sequence of measurements received from the same source, the Kalman filter may also be applied to a +set of separate measurements from different sources. Given a set of statistically {\em independent} (uncorrelated) estimates +$(\v{m}_1,\m{M}_1),(\v{m}_2,\m{M}_2),\dots,(\v{m}_n,\m{M}_n)$, the Kalman fusion equations can be written +as~\cite{uhlmann03,maybeck79} +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/kalman2d.png} + \caption{\it 1-$\sigma$ contour plots of two 2D inputs (blue) together with the Kalman fused result (red). Note that + these contours are a distance of $\sigma$ away from the mean on a 2D Gaussian surface, and do not represent a + closed volume or area. } + \label{fig:kalman2d} +\end{figure} +\begin{align} + \m{C} &= (\m{M}^{-1}_1+\m{M}^{-1}_2+\dots+\m{M}^{-1}_n)^{-1}\label{eqn:kalmanP}\\ + \v{c} &= \m{C}(\m{M}^{-1}_1\v{m}_1+\m{M}^{-1}_2\v{m}_2+\dots+\m{M}^{-1}_n\v{m}_n).\label{eqn:kalmanx} +\end{align} +Figure \ref{fig:kalman2d} illustrates the correct operation of the Kalman filter on two estimates known to be both +consistent and independent. Although the two input estimates and the fused Kalman result in the example are all 2D +Gaussian surfaces (which are greater than or equal to some unknown underlying PDF), it is convenient to represent these +probabilistic models simply by showing the 1-$\sigma$ contour centered at the mean. + +In either form, the underlying assumptions in all Kalman applications are consistency and independence. However, any +presumption of statistical independence should be carefully considered, since virtually any sensor is subject to +time-correlated errors resulting from the particular conditions of its use; additionally errors associated with the +non-linear transformation of its measurements are deterministic and therefore non-independent~\cite{uhlmann03}. For +example, any changes in temperature, barometric pressure, or humidity which affect the operation of a sensor's internal +electronics, and their effect on the sensor's accuracy, must be known {\em exactly}, or the assumption of independence +does not hold. +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/kalman2d-i.png} + \caption{\it 1-$\sigma$ contour plots of two 2D inputs (blue) together with the Kalman fused result (red), + illustrating a potentially inconsistent result. Note that the 1-$\sigma$ contours of the inputs, which are + supposed to be independent estimates of the same position, do not overlap, suggesting that one may be the result + of spurious data. One of the means is clear outlier when compared to the Kalman contour.} + \label{fig:kalman2d-i} +\end{figure} +Figure \ref{fig:kalman2d-i} shows an example of what happens when the precondition for consistency is violated. The two +input estimates in this example are interpreted by the Kalman filter to be estimates of the same position, yet they are +far enough apart to suggest that one estimate might be the result of spurious data. Note that the 2D Gaussian surfaces +represented by the plotted 1-$\sigma$ contours do overlap, but not in the part of the surface that contains the highest +probability. The Kalman result shown will most likely not be consistent, but there is no way to correct for this +behavior. + +To reiterate, the Kalman filter operates correctly if all its estimates are both consistent and independent. + + +% SECTION 1.2 CI +\subsection{Covariance Intersection} + +Consider here the fusion of two estimates using either the Kalman filter or the data fusion technique known as +Covariance Intersection (CI), under the following circumstances:~\cite{uhlmann03} +\begin{enumerate} +\item {\em The two estimates are independent.} In this case the Kalman filter produces an optimal fused estimate while +CI produces a consistent, though suboptimal, estimate. +\item {\em The two estimates are completely correlated.} In this case CI produces an optimal fused estimate while +Kalman produces an inconsistent estimate. +\item {\em The two estimates are partially correlated.} In this case CI produces a consistent, though suboptimal, +estimate while the Kalman filter produces an inconsistent estimate. \end{enumerate} +In each case, CI produces a consistent result, allowing it to operate safely in conditions which cause the Kalman filter +to fail. + +The formulation of the CI equations follows from the joint covariance structure which exists between a given pair of +estimates $(\v{m}_1,\m{M}_1)$ and $(\v{m}_2,\m{M}_2)$ +\begin{equation}\label{eqn:jointcov} +\left[\begin{array}{cc} + \m{M}_1 & \m{X} \\ + \m{X}^T & \m{M}_2 +\end{array}\right] +\end{equation} +where $\m{X}$ represents the actual, but unknown, cross covariance between the two estimates~\cite{uhlmann03}. Without +complete and exact knowledge of $\m{X}$, the only way to ensure consistency is to identify a joint covariance that is +guaranteed to be consistent based on the information available. This can be achieved by selecting a scalar value +$\omega, 0\leq1,$ and verifying that +\begin{equation}\label{eqn:cijointcov} +\left[\begin{array}{cc} + \frac{1}{\omega}\m{M}_1 & 0 \\ + 0 & \frac{1}{1-\omega}\m{M}_2 +\end{array}\right] +\leq +\left[\begin{array}{cc} + \m{M}_1 & \m{X} \\ + \m{X}^T & \m{M}_2 +\end{array}\right]. +\end{equation} + + +This formulation of the $\omega$-parametrized covariance can be expanded from $2$ to $n$ estimates as follows +\begin{equation}\label{eqn:ncijointcov} +\left[\begin{array}{cccc} + \omega_1\m{M}^{-1}_1 & 0 & 0 & 0 \\ + 0 & \omega_2\m{M}^{-1}_2 & 0 & 0 \\ + 0 & 0 & \ddots & 0 \\ + 0 & 0 & 0 & \omega_n\m{M}^{-1}_n +\end{array}\right], +\end{equation} +by selecting $\omega_1\dots\omega_n$ such that $1=\sum_{i=1}^n\omega_i$. By applying the inverse Kalman filter equations +\ref{eqn:kalmanP} and \ref{eqn:kalmanx} to \ref{eqn:ncijointcov}, the CI fusion equations for $n$ estimates with +completely unknown degrees of correlation can be written as +\begin{figure}[tbp] + \centering + \subfloat[$\omega_1$=0.05]{\label{fig:ci2d05}\includegraphics[width=0.4\textwidth]{figures/ci2d-05.png}} + \subfloat[$\omega_1$=0.25]{\label{fig:ci2d25}\includegraphics[width=0.4\textwidth]{figures/ci2d-25.png}} + \subfloat[$\omega_1$=0.50]{\label{fig:ci2d50}\includegraphics[width=0.4\textwidth]{figures/ci2d-50.png}} + \subfloat[$\omega_1$=0.75]{\label{fig:ci2d75}\includegraphics[width=0.4\textwidth]{figures/ci2d-75.png}} + \subfloat[$\omega_1$=0.95]{\label{fig:ci2d95}\includegraphics[width=0.4\textwidth]{figures/ci2d-95.png}} + \caption{\it 1-$\sigma$ contour plots for two 2D input estimates (blue) together with the CI fused result (red), for + different values of $\omega$. Note how the CI result contour behaves like an interpolation between these two + inputs as $\omega$ varies from 0 to 1. } + \label{fig:ci2d} +\end{figure} +\begin{align} + \m{C} &= \left(\omega_1\m{H}_1^T\m{M}^{-1}_1\m{H}_1+\omega_2\m{H}_2^T\m{M}^{-1}_2\m{H}_2+\dots+\omega_n\m{H}_n^T\m{M}^{-1}_n\m{H}_n\right)\label{eqn:cicov}\\ + \v{c} &= \m{C}\left(\omega_1\m{H}_1^T\m{M}^{-1}_1\v{m}_1+\omega_2\m{H}_2^T\m{M}^{-1}_2\v{m}_2+\dots+\omega_n\m{H}_n^T\m{M}^{-1}_n\v{m}_n\right)\label{eqn:cimean} +\end{align} +where $\m{H}_i$ is the transformation for the state space of the fused estimate to the state space of the estimate $i$ +\cite{uhlmann03,fusion01}. + +Figure \ref{fig:ci2d} shows an example of CI performed on a set of two input estimates. Different CI results are shown +for different values of $\omega$ in the range $(0,1)$, and each possible result is numerically consistent. An application which +performs CI should select the appropriate $\omega$ to minimize the size, e.g. the determinant, of the fused +covariance~\cite{uhlmann03}. + +To reiterate, CI requires that all of its inputs be consistent, but it will function correctly in the face of partially +or completely correlated input data \footnote{CI as described here finds the optimal fused result when the correlation +between its inputs is completely unknown; but another form of CI called Split CI is optimal when the degree of +correlation is partially known, and the estimates can be represented in split covariance form. See Appendix B +of~\cite{uhlmann03} for more information.}. + + + +% SECTION 3 CU +\subsection{Optimal Covariance Union}\label{section:cu} + +In order to develop a completely robust data fusion application, it may be necessary to handle possibly spurious +measurements prior to any data fusion being performed. If two given estimates $(\v{m}_1,\m{M}_1)$ and +$(\v{m}_2,\m{M}_2)$ are determined to be mutually inconsistent with each other, i.e. the difference between their means +is much larger than what can be expected based on their respective error covariance estimates, then using either the +Kalman filter or CI equations will yield an inconsistent fused result~\cite{uhlmann03}. + +Computing the Mahalanobis distance between the two estimates, +\begin{equation}\label{eqn:mahalanobis} +(\v{m}_1-\v{m}_2)^T(\m{M}_1+\m{M}_2)^{-1}(\v{m}_1-\v{m}_2), +\end{equation} +is one method to detect statistically significant deviations between these estimates (for example, as in figure +\ref{fig:kalman2d-i}). If such a deviation is detected, it can be assumed one of the estimates is the result of +spurious measurements or corrupted data, but it may not be possible to detect which of the estimates is at +fault~\cite{uhlmann03}. + +Covariance Union (CU) is a data fusion technique which can be used to resolve such a confliction by finding a union +estimate which is consistent with both (or all of) its inputs. This union $(\v{u},\m{U})$ is found by minimizing some +measure of $\m{U}$, e.g. the determinant, subject to the following constraints, +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/cu2d.png} + \caption{\it 1-$\sigma$ contour plots of two 2D input estimates (blue) together with the CU result (red).} + \label{fig:cu2d} +\end{figure} +\begin{align} + \m{U} &\geq \m{M}_1 + (\v{u}-\v{m}_1)(\v{u}-\v{m}_1)^T\nonumber\\ + \m{U} &\geq \m{M}_2 + (\v{u}-\v{m}_2)(\v{u}-\v{m}_2)^T\nonumber\\ + ~ &\qquad\vdots\nonumber\\ + \m{U} &\geq \m{M}_n + (\v{u}-\v{m}_n)(\v{u}-\v{m}_n)^T,\label{eqn:cu} +\end{align} +for inputs $1$ to $n$. The goal of this operation is to find the location of the mean vector $\v{u}$ having the smallest +covariance $\m{U}$ that is large enough to guarantee consistency with its $n$ input estimates, regardless of which of the +$n$ estimates is consistent~\cite{fusion06,uhlmann03}. + +In multimodal applications, the inputs to CU are not separate estimates of the same object to be deconflicted, but +separate modes used to represent the state of a complex or compound object. Performing CU on some or all of these modes +can be used to reduce the overall information complexity by combining modes, instead of pruning ``unimportant'' modes +(which would lead to an overestimation of the importance of the remaining modes). +This is necessary when considering the fusion of a complex set $S$ with another set $T$, which yields a combined +estimate that has $O(|S|*|T|)$ modes, formed from the Cartesian product $S\times T$. When the fused estimate exceeds the +complexity of the original estimates for each fusion step, the increasing complexity will tend to exhaust available +resources~\cite{fusion06}. The CU result is a faithful representation of all the modes it has replaced~\cite{uhlmann03}. + +To reiterate, CU operates correctly even if one or more of its modes are inconsistent (as long as one is consistent), at +the cost of a much larger (less certain) error covariance that the Kalman filter or CI would provide. + + +% MOTIVATION for GCU +\section{Motivation for Generalized Covariance Union}\label{section:motivation} + +The use of Covariance Union in data fusion is intended to guarantee consistency in the presence of spurious +data. CU is only useful if it will produce a result that is consistent with all of its inputs. However, a common +scenario arises in which CU will generate a result that is consistent with only one of its inputs (and inconsistent with +some or all of the others). + +Consider the set of measurements $(\v{m}_1,\m{M}_1),(\v{m}_2,\m{M}_2),(\v{m}_3,\m{M}_3)$, which must be combined using +CU. The union may be computed in two ways: +\begin{enumerate} +\item {\em CU is applied to all three estimates simultaneously.}\\ + $(\v{u},\m{U})=\CU\left((\v{m}_1,\m{M}_1),(\v{m}_2,\m{M}_2),(\v{m}_3,\v{M}_3)\right)$ +\item {\em CU is applied in a pair-wise fashion.}\\ + $(\v{u}',\m{U}')=\CU\left((\v{m}_1,\m{M}_1),(\v{m}_2,\m{M}_2)\right),$\\ + $(\v{u},\m{U})=\CU\left((\v{m}_3,\m{M}_3),(\v{u}',\m{U}')\right)$ +\end{enumerate} +By its definition, given in equation \ref{eqn:cu}, the CU result is guaranteed to be consistent with its inputs. In the +first case, this means $(\v{u},\m{U})$ is consistent with $(\v{m}_1,\m{M}_1)$, $(\v{m}_2,\m{M}_2)$, and +$(\v{m}_3,\m{M}_3)$. In the second case, however, all that is known for certain is that $(\v{u},\m{U})$ is consistent +with $(\v{m}_3,\m{M}_3)$ and $(\v{u}',\m{U}')$, and separately that $(\v{u}',\m{U}')$ is consistent with +$(\v{m}_1,\m{M}_1)$ and $(\v{m}_2,\m{M}_2)$. +\begin{figure}[tbp] + \centering + \subfloat[First, the intermediate pairwise result is calculated.]{\label{fig:gcu-i1}\includegraphics[width=0.4\textwidth]{figures/cu2d-i1.png}} + \subfloat[Then, that intermediate result is used as input for the final result.]{\label{fig:gcu-iall}\includegraphics[width=0.4\textwidth]{figures/cu2d-iall.png}} + \caption{\it 1-$\sigma$ contour plots of three 2D inputs (blue) together with the intermediate (pairwise) Optimal CU result + (green) and the final (pairwise) CU result (red). Note that although the intermediate result is consistent with + its two inputs, one of the original (blue) inputs is a clear outlier with the final (red) result.} + \label{fig:cu2d-i} +\end{figure} + +The nature of CU is to consider only the current state of the problem, i.e. its immediate inputs, and it functions with +no knowledge of any previous states. Consider an application which gathers a set of $n$ measurements at each discrete +time step, and may perform CU on some or all of those measurements for later use. If at time step $k$ CU replaces a +given estimate $(\v{m}_{i|k},\m{M}_{i|k})$ with a consistent union $(\v{u}_{k},\m{U}_{k})$, it does so by shifting the +mean from $\v{m}_{i|k}$ to $\v{u}_{k}$, and enlarging the covariance by at least the outer product of +$(\v{u}_{k}-\v{m}_{i|k})$ \cite{uhlmann03}. But if the estimate $(\v{u}_{k},\m{U}_{k})$ is used at time step $k+1$ as an +input to another CU operation, $\CU_{k+1}$ will have no knowledge of the mean shift that occurred during $\CU_{k}$. Since +CU finds the optimal, i.e. the tightest, covariance possible for all the inputs, any mean shifting that occurred during +prior time steps may cause this optimal covariance to be inconsistent for the inputs to those prior time steps +\cite{fusion06}. + + +% GCU +\section{Formulation of Generalized Covariance Union}\label{section:gcu} +In order to address the problems with Optimal CU as defined in section \ref{section:cu}, with regard to inconsistencies +that arise from a pair-wise or time-sequence application as described in section \ref{section:motivation}, it is +necessary to use Generalized CU. The generalized form of CU includes an additional parameter $\alpha_i$ per estimate in +the constraint equations. As with Optimal CU, the goal is to minimize some measure of $\m{U}$, e.g. the determinant. The +constraints are +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/cu2d-gen-batch.png} + \caption{\it 1-$\sigma$ contour plots of three 2D inputs (blue) together with the batch Generalized CU result (red). + This is the first time that these 1-$\sigma$ plots appear to exhibit a minimally enclosing behavior.} + \label{fig:cu2d-gen-batch} +\end{figure} +\begin{align} + \m{U} &\geq \frac{\m{M}_1}{\alpha_1} + \frac{(\v{u}-\v{m}_1)(\v{u}-\v{m}_1)^T}{1-\alpha_1}\nonumber\\ + \m{U} &\geq \frac{\m{M}_2}{\alpha_2} + \frac{(\v{u}-\v{m}_2)(\v{u}-\v{m}_2)^T}{1-\alpha_2}\nonumber\\ + ~ &\qquad\vdots\nonumber\\ + \m{U} &\geq \frac{\m{M}_n}{\alpha_n} + \frac{(\v{u}-\v{m}_n)(\v{u}-\v{m}_n)^T}{1-\alpha_n},\label{eqn:gcu} +\end{align} +where $\alpha_1\dots\alpha_n$ are in the range $(0,1)$ \cite{fusion06}. Each $\alpha_i$ is equivalent to the $\omega$ +parameter in equation \ref{eqn:cijointcov}~\cite{uhlmann03}, in this context used to prevent either a single covariance +$\m{M}_i$ or a single mean shift term $(\v{u}-\v{m}_i)$ from dominating the CU calculation. The $\alpha_i$ parameters +are optimized as part of this calculation to generate the tightest union possible~\cite{fusion06}. The result is +sub-optimal, but it is necessary to use this form of CU if it is used as part of a pair-wise or time-sequence +application as described above. Generalized CU guarantees consistency regardless of how many times its result is +re-used in future CU operations. +\begin{figure}[tbp] + \centering + \subfloat[First, the intermediate pairwise result is calculated.]{\label{fig:gcu-s1}\includegraphics[width=0.4\textwidth]{figures/cu2d-gen-s1.png}} + \subfloat[Then, that intermediate result is used as input for the final result.]{\label{fig:gcu-sall}\includegraphics[width=0.4\textwidth]{figures/cu2d-gen-sall.png}} + \caption{\it 1-$\sigma$ contour plots of three 2D inputs (blue) together with the intermediate (pairwise) Generalized CU result + (green) and the final (pairwise) GCU result (red). Note that the final (red) result is consistent with all of + its inputs, including all the original (blue) inputs, even those that were not used as direct inputs.} + \label{fig:cu2d-gen-s} +\end{figure} +Figure \ref{fig:cu2d-gen-batch} shows GCU applied as a single batch operation, and figure \ref{fig:cu2d-gen-s} shows GCU +applied pairwise to the same three input estimates. The pairwise application of GCU is shown for completeness, but the +batch application is of main interest. It is this batch GCU operation, specifically its 1-$\sigma$ contour ellipsoid, +which will be compared to the MEEE problem. + + + diff --git a/chapters/chapter3.tex b/chapters/chapter3.tex new file mode 100644 index 0000000..d0023f4 --- /dev/null +++ b/chapters/chapter3.tex @@ -0,0 +1,198 @@ +\chapter{Minimal Enclosing Ellipsoid of Ellipsoids}\label{chapter:meee} + +\section{Uses of MEEE} + +\PARstart{T}{he idea} of approximating complicated objects using simpler ones is widely used in computational geometry +and computer graphics. A common approach is to replace a complicated object by a simpler model covering it, such as a +minimum volume box or a sphere. More recently, ellipsoidal models have been proposed in the literature as they usually +provide better approximations than bounding boxes or spheres~\cite{yildirim06,sturm03,shiang00,ju01}. The use of simpler +objects inevitably leads to faster processing times for more responsive applications, ideally with minimal---though not +insignificant---loss of detail resolution. Recently new algorithms have been developed for the calculation of a minimal +enclosing ellipsoid; specifically, such an ellipsoid bounding the convex hull of a set of ellipsoids, also known as a +L\"owner ellipsoid, or L\"owner-John ellipsoid~\cite{yildirim06}. + + +% MAXDET +\section{Solving with MAXDET} + +The maxdet-problem is a convex optimization problem, minimizing the objective function +\begin{equation}\label{eqn:maxdetobj} + c^T\v{x} + \log \det G(\v{x})^{-1} +\end{equation} +subject to +\begin{align} + G(\v{x}) &> 0,\qquad\text{and}\nonumber\\ + F(\v{x}) &\geq 0,\label{eqn:maxdetcons} +\end{align} +where the optimization variable is the vector $\v{x}\in\Re^m$. The Functions +$G:\Re^m\rightarrow\Re^{\left|\v{x}\right|}$ and $F:\Re^m\rightarrow\Re^{n\times n}$ are affine: +\begin{align} + G(\v{x}) &= G_0 + \v{x}_1G_1 + \dots + \v{x}_mG_m\nonumber\\ + F(\v{x}) &= F_0 + \v{x}_1F_1 + \dots + \v{x}_mF_m\label{eqn:maxdet}, +\end{align} +where $G_i=G_i^T$ and $F_i=F_i^T$. The objective function is convex on $\{x|G(x)>0\}$ and the constraint set is +convex~\cite{vandenberghe96}. + +A wide class of computational geometry problems can be formulated at maxdet-problems. The formulation of interest is +that of a minimal volume ellipsoid $\varepsilon_0$ containing $n$ given ellipsoids $\varepsilon_1\dots\varepsilon_n$. The +given ellipsoids are described as sublevel sets of convex quadratic functions:~\cite{vandenberghe96,boyd04} +\begin{equation}\label{eqn:ellipse} + \varepsilon_i = \{ x | x^TA_ix + 2b_i^Tx + c_i \leq 0 \},\qquad i=0,\dots,n. +\end{equation} +The solution can be found by, in the variables $A_0 = A_0^T$, $b_0$, and +$n$ scalar variables $\tau_i$, minimizing:~\cite{vandenberghe96} +\begin{equation}\label{eqn:maxdetfun} + \log\det A_0^{-1} +\end{equation} +subject to +\begin{equation}\label{eqn:maxdetconstraints} + \begin{array}{l} + A_0 = A_0^T > 0 ,\\ + \tau_1 \geq 0,\dots,\tau_n\geq 0 ,\qquad\text{and}\\ + \left[ \begin{array}{ccc} + A_0 & b_0 & 0 \\ + b_0^T & -1 & b_0^T \\ + 0 & b_0 & -A_0 + \end{array} \right] + -\tau_i + \left[ \begin{array}{ccc} + A_i & b_i & 0 \\ + b_i^T & c_i & 0 \\ + 0 & 0 & 0 + \end{array} \right] + \leq 0,\qquad i=1,\dots,n. + \end{array} +\end{equation} +Here, $c_0$ is given by~\cite{boyd94} +\begin{equation} + c_0=b_0^TA_0^{-1}b_0-1\\ +\end{equation} +and the final ellipsoid is +\begin{equation} + \varepsilon_0=\{x|x^TA_0x+2b_0^Tx+c_0\leq 0\}, +\end{equation} +which defines the ellipsoid of least volume containing $\varepsilon_1,\dots,\varepsilon_n$. The formulation for the MEEE +constraints given in equation \ref{eqn:maxdetconstraints} as a maxdet-problem, as in equation \ref{eqn:maxdet}, +is~\cite{vandenberghe96}. +\begin{align} + G(\v{x}) &= I_{n\times n}\nonumber\\ + F(\v{x}) &= \left[\begin{array}{cccc} + A_0 & & & \\ + & \left[ \begin{array}{ccc} + \tau_i A_i - A_0 & \tau_i b_i - b_0 & 0 \\ + \tau_i b_i^T - b_0^T & \tau_i c_i -1 & -b_0^T \\ + 0 & -b_0 & A_0 + \end{array}\right] & & \\ + & & \ddots & \\ + & & & + \left[ \begin{array}{ccc} + \tau_1 & & \\ + & \ddots & \\ + & & \tau_n + \end{array}\right] + \end{array}\right] +\end{align} +The variables $A_0$ and $b_0$, and $\tau_1\dots \tau_n$, are solved in-place during the minimization process. +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/ellipse01.png} + \caption{\it An example of a minimally enclosing L\"owner 2D ellipsoid containing five ellipsoids, + from~\cite{boyd04}. Comparing this plot with figure \ref{fig:cu2d-gen-batch} will illustrate the superficial + similarities between GCU and MEEE. } + \label{fig:ellipse} +\end{figure} + +Other convex optimization tools may be easily used with the objective function and constraints given in equations +\ref{eqn:maxdetfun} and \ref{eqn:maxdetconstraints} as well~\cite{boyd04}. + + +% CONTAINMENT +\section{Testing for Ellipsoid Containment}\label{section:containment} + +In the development of any algorithm which finds a minimally enclosing object, it is necessary to also develop a test to +compare this theoretically enclosing result with its enclosed set. For the MEEE problem, the goal is to test whether one +ellipsoid properly contains another, i.e. the properly contained ellipsoid does not have any points which fall outside +the bounding perimeter of the containing ellipsoid~\cite{yildirim06}. + +This analysis follows the test for ellipse intersection presented in~\cite{eberly00}. Consider an $n$--dimensional +ellipsoid $\varepsilon_0$ given by the curve, +\begin{equation} + Q_0 = x^TA_0x + 2b_0^Tx + c_0, +\end{equation} +which should contain the $n$--dimensional ellipsoid $\varepsilon_1$ given by the curve, +\begin{equation} + Q_1 = x^TA_1x + 2b_1^Tx + c_1. +\end{equation} +All level curves defined by $Q_0(x)=\lambda$ are ellipsoids, except for the minimum negative value of $\lambda$ for +which the equation defined a single point, the center of every level curve ellipsoid. The ellipsoid defined by +$Q_1(x)=0$ generally intersects many level curves of $Q_0$. By finding the minimum level value $\lambda_{min}$ and the +maximum level value $\lambda_{max}$ of $Q_0$ attained by any $x$ on the curve $Q_1$, it is possible to determine the +spatial relationship between $\varepsilon_0$ and $\varepsilon_1$. If $\lambda_{max}\leq 0$, then only a level curve +$Q_0(x)\leq 0$ will intersect $Q_1(x)=0$, and $\varepsilon_0$ must properly contain $\varepsilon_1$. + +This can be formulated as a constrained minimization that can be solved by the method of Lagrange multipliers: Minimize +$Q_0(x)$ subject to the constraint that $Q_1(x)=0$. Define $F(x,t)=Q_0(x)+tQ_1(x)$. Differentiating yields $\nabla +F=\nabla Q_0+t\nabla Q_1$, where the gradient indicated derivative in $x$. Since $\partial{F}/\partial{t}=Q_1$, setting the +$t$-derivative equal to zero reproduces the constraint $Q_1=0$. Setting the $x$-derivative equal to zero yields $\nabla +Q_0+t\nabla Q_1=0$ for some $t$. Geometrically, this means the gradients are parallel. + +Note that $\nabla Q_i=2A_ix+2b_i$, so +\begin{equation} + 0 = \nabla Q_0 + t\nabla Q_1 = 2(A_0+tA_1)x+2(b_0+tb_1). +\end{equation} +Solving for $x$ yields +\begin{equation}\label{eqn:solvex} + x = -(A_0+tA_1)^{-1}(b_0+tb_1)=\frac{1}{\delta(t)}Y(t), +\end{equation} +where $\delta(t)$ is the determinant of $(A_0+tA_1)$, a polynomial in $t$ of degree $n$, and $Y(t)$ has components in +$t$ of degree $n$ as well. Replacing this in $Q_1(x)=0$ yields +\begin{equation}\label{eqn:poly} + P(t) = Y(t)^TA_1Y(t)+\delta(t)b_1^TY(t)+\delta(t)^2c_1=0, +\end{equation} +a degree $2n$ polynomial in $t$. The roots of $P(t)$ in equation \ref{eqn:poly} can be applied to equation +\ref{eqn:solvex} to find the critical values for $x$ of $Q_1$. The minimum and maximum values of the evaluation of +$Q_0(x)$ at the roots of $P(t)$ are respectively $\lambda_{min}$ and $\lambda_{max}$, the minimum and maximum level +curves which intersect $Q_1$. + +As stated previously, if $\lambda_{max}\leq 0$, then $\varepsilon_0$ properly contains $\varepsilon_1$. + + +% TRANSFORM +\section{Relating to Generalized Covariance Union} + +Before any MEEE results can be compared to GCU, it is necessary to define a set of transforms between the ellipsoid and +statistical measurement domains. Since this thesis interprets all estimates (means and covariances) as unweighted +Gaussian PDFs, i.e. +\begin{equation} + (\v{m}_i,\m{M}_i) := \gaussN{\v{m}_i,\m{M}_i}, +\end{equation} +each estimate is uniquely transformable to and from the ellipsoid domain, given in equation \ref{eqn:ellipse}, +by representing each as only the 1-$\sigma$ contour ellipsoid on its Gaussian surface. The +forward transformation into ellipse notation is~\cite{boyd04} +\begin{align} +\label{eqn:cu2e} +\mathbb{T}(\v{m}_i,\m{M}_i) &:= \left\{ + \begin{aligned} + A_i &= \m{M}_i^{-1}\\ + b_i &= -\m{M}_i^{-1}\v{m}_i\\ + c_i &= \v{m}_i^T\m{M}_i^{-1}\v{m}_i-1, + \end{aligned} + \right. +\intertext{and the backward transformation is} +\label{eqn:e2cu} +\mathbb{T}^{-1}(A_i,b_i,c_i) &:= \left\{ + \begin{aligned} + \m{M}_i &= A_i^{-1}\\ + \m{m}_i &= -A_i^{-1}b_i. + \end{aligned} + \right. +\end{align} +The ellipsoid described by $(A_i,b_i,c_i)$ is centered at $\v{m}_i$, with a radial distance of $\m{M}_i^{\frac{1}{2}}$. +By interpreting a given Gaussian PDF as an ellipsoid, or a given ellipsoid as the 1-$\sigma$ contour which defines a +Gaussian PDF, it is possible to directly compare the results of GCU and MEEE. + + + + + + + diff --git a/chapters/chapter4.tex b/chapters/chapter4.tex new file mode 100644 index 0000000..ba59491 --- /dev/null +++ b/chapters/chapter4.tex @@ -0,0 +1,453 @@ +\chapter{Analysis}\label{chapter:analysis} + +\section{Explanation of $\mathbf{\alpha}$--Parametrized Behavior}\label{section:explanation} + +\PARstart{I}{ncluding} the $\alpha_i$ parameter in the Generalized CU constraints, given in equation \ref{eqn:gcu}, +creates an asymptotic scale on which the terms $\m{M}_i$ and $(\v{u}-\v{m}_i)$ are balanced. At the two extremes are the +following cases: +\begin{enumerate} +\item If $\m{M}_i$ is a zero matrix, $\alpha_i$ is allowed to approach 0 as well, and the constraint reduces to +$\m{U}\geq (\v{u}-\v{m}_i)(\v{u}-\v{m}_i)^T$, and +\item If $\v{u}$ and $\v{m}_i$ are coincident, $\alpha_i$ is allowed to approach 1, and the constraint reduces to +$\m{U}\geq \m{M}_i$. +\end{enumerate} +For the general case, in which both terms are nonzero, the actual value of $\alpha_i$ will be bounded somewhere between +0 and 1. It is not important to know this actual value, since it is determined by the optimization process in +conjunction with the other $n-1$ estimates. + +With this knowledge, it is possible to logically reduce the question of whether Generalized CU and MEEE are equivalent. +First, since it is necessary to satisfy all $n$ constraints in equation \ref{eqn:gcu}, a minimal L\"owner +ellipsoid $\varepsilon_0$ for $(\v{u},\m{U})$ will be one that completely contains the ellipsoid $\varepsilon_i$ for +each $(\v{m}_i,\m{M}_i)$ in $i=1\dots n$~\cite{yildirim06}. Second, if the ellipsoid $\tau_i$ for +$(\v{u},\frac{\m{M}_i}{\alpha_i}+\frac{(\v{u}-\v{m}_i)(\v{u}-\v{m}_i)^T}{1-\alpha_i})$ completely contains +$\varepsilon_i$, it follows that $\varepsilon_0$ will completely contain $\varepsilon_i$ as well, since $\tau_i$ and +$\varepsilon_0$ are both centered at $\v{u}$ and $\varepsilon_0$ is at least as large as $\tau_i$. Therefore, if +$\tau_i$ can be shown to completely enclose $\varepsilon_i$ for all values of $\alpha_i\in (0,1)$, for +all $i=1\dots n$, then $\varepsilon_0$ is a L\"owner ellipsoid, and Generalized CU and MEEE are in fact equivalent. + +Formally, $\varepsilon_i$ and $\tau_i$ are the 1-$\sigma$ ellipsoids transformed by equation \ref{eqn:cu2e}; of +\begin{align} + \displaystyle + \varepsilon_i &= \mathbb{T}\left(\v{m}_i,\m{M}_i\right)\label{eqn:coveps}\\ + \tau_i(\alpha_i) &= +\mathbb{T}\left(\v{u},\frac{\m{M}_i}{\alpha_i}+\frac{(\v{u}-\v{m}_i)(\v{u}-\v{m}_i)^T}{1-\alpha_i}\right)\label{eqn:covtau} +\end{align} +The containing ellipsoid $\tau_i$ varies with $\alpha_i$, with all other terms constant. An analysis of this behavior +follows. + + +% 1D +\section{Describing the Behavior in One Dimension} + +Since the 1-$\sigma$ ellipsoid of a Gaussian curve in one variable is a line, the mathematics are extremely simple; it +becomes extremely easy to visualize and plot the data, and to check the results by hand. Notationally, +$(\v{m}_i,\m{M}_i)$ is just $(\mu_i,\sigma_i^2)$, and the PDF of the estimate is given by the unweighted Gaussian +function +\begin{equation}\label{eqn:gauss1d} + \varphi_{\mu_i,\sigma_i^2}(x)=e^\frac{-(\mu_i-x)^2}{2\sigma_i^2}, \end{equation} +and the 1-$\sigma$ ellipsoid is the band between $\mu_i-1\sigma_i$ and $\mu_i+1\sigma_i$. The $y$ value of the +1-$\sigma$ line is $\varphi_{\mu_i,\sigma_i^2}(x=\mu_i\pm\sigma_i)=e^{-\frac{1}{2}}\approx0.6065$. + +% EXAMPLE 1D CU +\begin{example}[Generalized CU in One Dimension]\label{ex:gcu1d} + +Consider a set of four estimates $(\mu_i,\sigma_i^2)$, given by +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/est1d-4.png} + \caption{\it 1D Gaussian curves for four estimate means and covariances, for example \ref{ex:gcu1d}.} + \label{fig:est1d-4} +\end{figure} +\begin{align} + (\mu_1,\sigma_1^2) &= (0.3000,0.1000^2)\\\nonumber + (\mu_2,\sigma_2^2) &= (0.1000,0.2000^2)\\\nonumber + (\mu_3,\sigma_3^2) &= (0.0000,0.3000^2)\\\nonumber + (\mu_4,\sigma_4^2) &= (-0.4000,0.0500^2),\label{ex:est1d-4} +\end{align} +shown in figure \ref{fig:est1d-4}. Applying batch Generalized CU to these inputs, +\begin{equation} + (\mu_u,\sigma_u^2) = \GCU\left((\mu_1,\sigma_1^2),(\mu_2,\sigma_2^2),(\mu_3,\sigma_3^2),(\mu_4,\sigma_4^2)\right) +\end{equation} +yields the values +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/cu1d.png} + \caption{\it 1D Gaussian curves for four inputs (blue), together with the batch Generalized CU result (red) and + its 1-$\sigma$ ellipsoid (dashed), for example \ref{ex:gcu1d}.} + \label{fig:cu1d} +\end{figure} +\begin{equation} + (\mu_u,\sigma_u^2) = (-0.0250,0.4250^2). +\end{equation} +Figure \ref{fig:cu1d} shows the inputs plotted with the Gaussian curve for $(\mu_u,\sigma_u^2)$. The 1-$\sigma$ line, +from $x=\mu_u-\sigma_u$ to $x=\mu_u+\sigma_u$, at $y=e^{-\frac{1}{2}}$, corresponds to the outermost intersection points +between the inputs and the CU result curves. The boundary points for each 1-$\sigma$ ellipsoid are $x=\mu_i\pm\sigma_i$: +\begin{align} + \mu_1-\sigma_1 &= 0.2000 & \mu_1+\sigma_1 &= 0.4000\nonumber\\ + \mu_2-\sigma_2 &= -0.1000 & \mu_2+\sigma_2 &= 0.3000\nonumber\\ + \mu_3-\sigma_3 &= -0.3000 & \mu_3+\sigma_3 &= 0.3000\nonumber\\ + \mu_4-\sigma_4 &= -0.4500 & \mu_4+\sigma_4 &= -0.3500\\ +\intertext{Of these points, $\mu_4-\sigma_4$ and $\mu_1+\sigma_1$ exactly equal the 1-$\sigma$ points on the CU curve,} + \mu_u-\sigma_u &= -0.4500 & \mu_u+\sigma_u &= 0.4000, +\end{align} +and the remaining points are all within the range $(-0.4500,0.4000)$. + +Following the logic outlined in section \ref{section:explanation}, it is +necessary to consider the ellipsoid $\varepsilon_1$ from equation \ref{eqn:coveps} and $\tau_1(\alpha_1)$ from equation +\ref{eqn:covtau}: +\begin{align} + \varepsilon_1 &= \mathbb{T}\left(\mu_1,\sigma_1^2\right) = \mathbb{T}\left(0.3000,0.0100\right)\\ + \tau_1(\alpha_1) &= \mathbb{T}\left(\mu_u,\frac{\sigma_1^2}{\alpha_1}+\frac{(\mu_u-\mu_1)^2}{1-\alpha_1}\right) + = \mathbb{T}\left(-0.0250,\frac{0.0100}{\alpha_1}+\frac{0.1056}{1-\alpha_1}\right). +\end{align} +From equation \ref{eqn:cu2e}, the transformation into ellipsoid space is: +\begin{align} + \varepsilon_1 &= \left\{ + \begin{aligned} + A_{\varepsilon,1} &= 100\\ + b_{\varepsilon,1} &= -30\\ + c_{\varepsilon,1} &= 8 + \end{aligned}\right.,\\\nonumber + \tau_1(\alpha_1) &= \left\{ + \begin{aligned} + A_{\tau,1} &= \frac{\begin{smallmatrix}1\end{smallmatrix}}{\frac{0.0100}{\alpha_1}+\frac{0.1056}{1-\alpha_1}} \\ + b_{\tau,1} &= \frac{\begin{smallmatrix}0.0250\end{smallmatrix}}{\frac{0.0100}{\alpha_1}+\frac{0.1056}{1-\alpha_1}} \\ + c_{\tau,1} &= \frac{\begin{smallmatrix}0.0062\end{smallmatrix}}{\frac{0.0100}{\alpha_1}+\frac{0.1056}{1-\alpha_1}} -1 \\ + \end{aligned}\right. +\end{align} +Equation \ref{eqn:ellipse} (repeated here) +\begin{equation} + \varepsilon_i = \{ x | x^TA_ix + 2b_i^Tx + c_i \leq 0 \}\nonumber +\end{equation} +gives the quadratic formulation for an $n$-dimensional ellipsoid. In one dimension, $\varepsilon_1$ can be written as +\begin{equation} + \varepsilon_1 = 100x^2-60x+8 \leq 0, +\end{equation} +and solving for the roots gives +\begin{equation} + x = 0.2, \qquad x = 0.4, +\end{equation} +which are exactly equal to $\mu_1\pm\sigma_1$. For $\tau_1(\alpha_1)$ to completely contain $\varepsilon_1$, its roots +must bound the roots of $\varepsilon_1$ for all values of $\alpha_1\in(0,1)$. +\begin{figure}[tbp] + \centering + \subfloat[$\alpha_1$=0.05]{\label{fig:alpha1d05}\includegraphics[width=0.4\textwidth]{figures/alpha1d-05.png}} + \subfloat[$\alpha_1$=0.25]{\label{fig:alpha1d25}\includegraphics[width=0.4\textwidth]{figures/alpha1d-25.png}} + \subfloat[$\alpha_1$=0.50]{\label{fig:alpha1d50}\includegraphics[width=0.4\textwidth]{figures/alpha1d-50.png}} + \subfloat[$\alpha_1$=0.75]{\label{fig:alpha1d75}\includegraphics[width=0.4\textwidth]{figures/alpha1d-75.png}} + \subfloat[$\alpha_1$=0.95]{\label{fig:alpha1d95}\includegraphics[width=0.4\textwidth]{figures/alpha1d-95.png}} + \caption{\it 1D Gaussian curves for estimate $(\v{m}_1,\m{M}_1)$ and the intermediate error covariance (red), and + its 1D 1-$\sigma$ ellipsoid (dashed), for example \ref{ex:gcu1d}.} + \label{fig:alpha1d} +\end{figure} +By choosing a value for $\alpha_1$, it is possible to numerically determine the intermediate error covariance +$\left(\mu_u,\frac{\sigma_1^2}{\alpha_1}+\frac{(\mu_u-\mu_1)^2}{1-\alpha_1}\right)$, and the 1-$\sigma$ ellipsoid +$\tau_1(\alpha_1)$ and its roots. Using the ellipsoid transformation (equation \ref{eqn:cu2e}) and quadratic ellipsoid +equation (\ref{eqn:ellipse}) as above, the roots of $\tau_1(\alpha_1)$ are: +\begin{equation} + x = \begin{cases} + -0.5828, 0.5328 \qquad \text{for $\alpha_1 = 0.05$}\\ + -0.4502, 0.4002 \qquad \text{for $\alpha_1 = 0.25$}\\ + -0.5059, 0.4559 \qquad \text{for $\alpha_1 = 0.50$}\\ + -0.6852, 0.6352 \qquad \text{for $\alpha_1 = 0.75$}\\ + -1.4821, 1.4321 \qquad \text{for $\alpha_1 = 0.95$} + \end{cases} +\end{equation} +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/alpha1dcurve.png} + \caption{\it $\alpha_1$ vs $\sigma_{intermediate,1}$ for example \ref{ex:gcu1d}.} + \label{fig:alpha1dcurve} +\end{figure} +Since the roots of $\tau_1(\alpha_1)$ can also be written as $\mu_u\pm\sigma_{intermediate,1}$, it is also useful to +find the value of the intermediate standard deviation +\begin{equation} + \sigma_{intermediate,1} = \sqrt{\frac{\sigma_1^2}{\alpha_1}+\frac{(\mu_u-\mu_1)^2}{1-\alpha_1}} +\end{equation} +and plot it versus $\alpha_1$, as shown in figure \ref{fig:alpha1dcurve}. The minimum value for +$\sigma_{intermediate,1}$ occurs at $\alpha_1=0.2350$, so the smallest ellipsoid $\tau_1(\alpha_1)$ is: +\begin{equation} + \tau_1(\alpha_1=0.2350) = \left\{ + \begin{aligned} + A_{\varepsilon,1} &= 5.5373\\ + b_{\varepsilon,1} &= 0.1384\\ + c_{\varepsilon,1} &= -0.9654 + \end{aligned}\right. +\end{equation} +The quadratic form is +\begin{equation} + \varepsilon_1 = 5.5373x^2+2768x-0.9654 \leq 0, +\end{equation} +and solving for the roots gives +\begin{equation} + x = -0.4499, \qquad x = 0.3999, +\end{equation} +which are within acceptable floating-point rounding error of $\mu_u\pm\sigma_{intermediate,1}$. + +This procedure can be repeated for $(\mu_2,\sigma_2^2)$, $(\mu_3,\sigma_3^2)$, and $(\mu_4,\sigma_4^2)$ to confirm the +same behavior. The fact that the roots of $\varepsilon_i$ are bounded by the roots of $\tau_i(\alpha_i)$ for all +$\alpha_i\in(0,1)$ implies that $\varepsilon_0 = \mathbb{T}\left(\mu_u,\sigma_u^2\right)$ completely contains each +$\varepsilon_i$, and is therefore a minimal L\"owner ellipsoid. + +\end{example} + +% 2D +\section{Describing the Behavior in Two Dimensions} + +In two dimensions, relative positions between estimate means become more complex, and additionally rotations must be +considered for each covariance body. Regarding notation, $\v{m}_i$ is +$\left[\begin{smallmatrix}\mu_{x,i}\\\mu_{y,i}\end{smallmatrix}\right]$ and $\m{M}_i$ is at least as large as +$\left[\begin{smallmatrix}\sigma_{x,i}\\\sigma_{y,i}\end{smallmatrix}\right] + \left[\begin{smallmatrix}\sigma_{x,i}&\sigma_{y,i}\end{smallmatrix}\right]$, though $\sigma_{x,i}$ and $\sigma_{y,i}$ +may be rotated by any arbitrary amount. The PDF of the estimate is given by the unweighted Gaussian function +\begin{equation}\label{eqn:gauss2d} + \varphi_{(\mu_{x,i},\mu_{y,i}),(\sigma_{x,i},\sigma_{y,i})} = + e^{-\left(\frac{(\mu_{x,i}-x)^2}{2\sigma_{x,i}^2}\right)-\left(\frac{(\mu_{y,i}-y)^2}{2\sigma_{y,i}^2}\right)}, +\end{equation} +and the 1-$\sigma$ ellipsoid is a two dimensional ellipse centered at $(\mu_{x,i},\mu_{y,i})$ with axes of length +$2\sigma_{x,i}$ and $2\sigma_{y,i}$, rotated to match $\varphi_{(\mu_{x,i},\mu_{y,i}),(\sigma_{x,i},\sigma_{y,i})}$. The +behavior of the $\alpha$--parametrized intermediate covariance is also more complex, since it is a linear combination +of both the shape of $\m{M}_i$ and the relative distance between the means $\v{m}_i$ and $\v{u}$. + + +% EXAMPLE 2D CU +\begin{example}[Generalized CU in Two Dimensions]\label{ex:gcu2d} + +Consider as set of four estimates $(\v{m}_i,\m{M}_i)$, given by +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/est2d-4.png} + \caption{\it 1-$\sigma$ contour ellipsoids for four 2D input estimate means and covariances used in example \ref{ex:gcu2d}.} + \label{fig:est2d-4} +\end{figure} +\begin{align} + (\v{m}_1,\m{M}_1) &= \left(\left[ + \begin{smallmatrix} + 0.3000\\ + 0.5000 + \end{smallmatrix}\right], + \left[ + \begin{smallmatrix} + 0.1225 & 0.0650\\ + 0.0650 & 0.0475 + \end{smallmatrix}\right]\right)\nonumber\\ + (\v{m}_2,\m{M}_2) &= \left(\left[ + \begin{smallmatrix} + 0.4000\\ + 0.6000 + \end{smallmatrix}\right], + \left[ + \begin{smallmatrix} + 0.0900 & 0.0000\\ + 0.0000 & 0.0100 + \end{smallmatrix}\right]\right)\nonumber\\ + (\v{m}_3,\m{M}_3) &= \left(\left[ + \begin{smallmatrix} + 0.8000\\ + 0.9000 + \end{smallmatrix}\right], + \left[ + \begin{smallmatrix} + 0.0250 & -0.0150\\ + -0.0150 & 0.0250 + \end{smallmatrix}\right]\right)\nonumber\\ + (\v{m}_4,\m{M}_4) &= \left(\left[ + \begin{smallmatrix} + 0.5000\\ + 0.4000 + \end{smallmatrix}\right], + \left[ + \begin{smallmatrix} + 0.0573 & 0.0238\\ + 0.0238 & 0.0727 + \end{smallmatrix}\right]\right) +\end{align} +shown in figure \ref{fig:est2d-4}. Applying batch GCU to these inputs, +\begin{equation} + (\v{u},\m{U}) = \GCU\left((\v{m}_1,\m{M}_1),(\v{m}_2,\m{M}_2),(\v{m}_3,\m{M}_3),(\v{m}_4,\m{M}_4)\right), +\end{equation} +yields the values +\begin{figure}[tbp] + \centering\includegraphics[width=0.6\textwidth]{figures/cu2d-4.png} + \caption{\it 1-$\sigma$ contour ellipsoids for four inputs (blue) together with the batch Generalized CU result + (red) for example \ref{ex:gcu2d}.} + \label{fig:cu2d-4} +\end{figure} +\begin{equation} + (\v{u},\m{U}) = \left(\left[ + \begin{smallmatrix} + 0.4499\\ + 0.5342 + \end{smallmatrix}\right], + \left[ + \begin{smallmatrix} + 0.2606 & 0.1559\\ + 0.1559 & 0.2778 + \end{smallmatrix}\right]\right) +\end{equation} + + + + +It is next necessary to consider the ellipsoid $\varepsilon_1$ from equation +\ref{eqn:coveps} and $\tau_1(\alpha_1)$ from equation \ref{eqn:covtau}: +\begin{align} + \varepsilon_1 &= \mathbb{T}\left(\v{m}_1,\m{M}_1\right) = + \mathbb{T}\left(\left[\begin{smallmatrix}0.3000\\0.5000\end{smallmatrix}\right], + \left[\begin{smallmatrix}0.1224 & 0.0650\\0.0650&0.0475\end{smallmatrix}\right]\right)\\ + \tau_1(\alpha_1) &= \mathbb{T}\left(\v{u},\frac{\m{M}_1}{\alpha_1}+\frac{(\v{u}-\v{m}_1)(\v{u}-\v{m}_1)'}{1-\alpha_1}\right)\\ + &= \mathbb{T}\left(\left[\begin{smallmatrix}0.4499\\0.5342\end{smallmatrix}\right], + \frac{\left[\begin{smallmatrix}0.1225&0.0650\\0.0650&0.0475\end{smallmatrix}\right]}{\alpha_1}+ + \frac{\left[\begin{smallmatrix}0.0225&0.0051\\0.0051&0.0012\end{smallmatrix}\right]}{1-\alpha_1}\right). +\end{align} +From equation \ref{eqn:cu2e}, the transformation into ellipsoid space is: +\begin{align} + \varepsilon_1 &= \left\{ + \begin{aligned} + A_{\varepsilon,1} &= \left[\begin{smallmatrix}29.6875& -40.5949\\ -40.5949& 76.5625\end{smallmatrix}\right]\\ + b_{\varepsilon,1} &= \left[\begin{smallmatrix}11.3912\\-26.1028\end{smallmatrix}\right]\\ + c_{\varepsilon,1} &= \begin{smallmatrix}9.6340\end{smallmatrix} + \end{aligned}\right.,\\\nonumber + \tau_1(\alpha_1) &= \left\{ + \begin{aligned} + A_{\tau,1} &= \left({\frac{\left[\begin{smallmatrix}0.1224 & 0.0650\\0.0650& 0.0475\end{smallmatrix}\right]}{\alpha_1} + +\frac{\left[\begin{smallmatrix}0.0225 & 0.0051\\0.0051& 0.0012\end{smallmatrix}\right]}{1-\alpha_1}}\right)^{-1} \\ + b_{\tau,1} &= -\left({\frac{\left[\begin{smallmatrix}0.1224 & 0.0650\\0.0650& 0.0475\end{smallmatrix}\right]}{\alpha_1} + +\frac{\left[\begin{smallmatrix}0.0225 & 0.0051\\0.0051& 0.0012\end{smallmatrix}\right]}{1-\alpha_1}}\right)^{-1} + \left[\begin{smallmatrix}0.3\\0.5\end{smallmatrix}\right]\\ + c_{\tau,1} &= \left[\begin{smallmatrix}0.3&0.5\end{smallmatrix}\right] + \left({\frac{\left[\begin{smallmatrix}0.1224 & 0.0650\\0.0650& 0.0475\end{smallmatrix}\right]}{\alpha_1} + +\frac{\left[\begin{smallmatrix}0.0225 & 0.0051\\0.0051& 0.0012\end{smallmatrix}\right]}{1-\alpha_1}}\right)^{-1} + \left[\begin{smallmatrix}0.3\\0.5\end{smallmatrix}\right] -1\\ + \end{aligned}\right. +\end{align} + +\begin{figure}[tbp] + \centering + \subfloat[$\alpha_1$=0.05]{\label{fig:alpha2d05}\includegraphics[width=0.4\textwidth]{figures/alpha2d-05.png}} + \subfloat[$\alpha_1$=0.25]{\label{fig:alpha2d25}\includegraphics[width=0.4\textwidth]{figures/alpha2d-25.png}} + \subfloat[$\alpha_1$=0.50]{\label{fig:alpha2d50}\includegraphics[width=0.4\textwidth]{figures/alpha2d-50.png}} + \subfloat[$\alpha_1$=0.75]{\label{fig:alpha2d75}\includegraphics[width=0.4\textwidth]{figures/alpha2d-75.png}} + \subfloat[$\alpha_1$=0.95]{\label{fig:alpha2d95}\includegraphics[width=0.4\textwidth]{figures/alpha2d-95.png}} + \caption{\it 1-$\sigma$ contour ellipse for estimate $(\v{m}_1,\m{M}_1)$ and the mean shift term + $(\v{u}-\v{m}_1)(\v{u}-\v{m}_1)'$ (blue), together with the intermediate covariance 1-$\sigma$ ellipse (red), + for example \ref{ex:gcu2d}.} + \label{fig:alpha2d} +\end{figure} +Figure \ref{fig:alpha2d} shows the 1-$\sigma$ contour ellipse of $(\v{m}_1,\m{M}_1)$ and +$\left(\v{u},\frac{\m{M}_1}{\alpha_1}+\frac{(\v{u}-\v{m}_1)(\v{u}-\v{m}_1)'}{1-\alpha_1}\right)$ for different values of +$\alpha_1$. The input $(\v{m}_1,\m{M}_1)$ is given. The mean shift term $(\v{u}-\v{m}_1)(\v{u}-\v{m}_1)'$ is a +single-component matrix which forms an ellipse with major axis twice the length of the shift, and minor axis of +length zero, centered at $\v{u}$ and aligned with both means. The intermediate covariance is a linear sum of these two +components, with the interpolation between $\alpha_1=0$ and $\alpha_1=1$ creating an unbounded asymptotic behavior which +is roughly similar to that shown in figure \ref{fig:alpha1dcurve} in the 1-D case. The 1-$\sigma$ ellipse given by +$\tau_1(\alpha_1=0)$ will be infinite in size, with the same shape as $\varepsilon_1$; at the other end, +$\tau_1(\alpha_1=1)$ will be infinite in length, with the same orientation as the mean shift term and the exact width of +the projection of $\varepsilon_1$ in the orthogonal direction. + +By choosing values for $\alpha_1$ it is possible to compare $\tau_1(\alpha_1)$ with $\varepsilon_1$ and test for +containment and confirm that $\varepsilon_1$ is always completely contained. Taking $\alpha_1=0.75$, $\tau_1$ becomes +\begin{equation} + \tau_1(\alpha_1=0.75)=\left\{ + \begin{aligned} + A_{\tau,1} &= + \left[\begin{smallmatrix} + 11.8286 & -18.6285\\ + -18.6285 & 44.0408 + \end{smallmatrix}\right]\\ + b_{\tau,1} &= + \left[\begin{smallmatrix} + 4.6295\\ + -15.1454 + \end{smallmatrix}\right]\\ + c_{\tau,1} &= \begin{smallmatrix}6.0078\end{smallmatrix} + \end{aligned}\right. +\end{equation} +and the solution to $\lambda_{max}$ described in section \ref{section:containment} is $-0.0696$, so the condition +$\lambda_{max}\leq 0$ for $\tau_1$ to properly contain $\varepsilon_1$~\cite{eberly00}, holds. + + +\end{example} + + +% ND, projections +\section{Extension to Higher Dimensions} + + +It becomes increasingly difficult to visualize any of the covariance or ellipsoid components as the dimensionality +increases. For example, in three dimensions, the 1-$\sigma$ contour ellipsoid is a three-dimensional cross-section of a +four-dimensional Gaussian volume, which is rotated by both an elevation angle $\phi$ and an azimuth angle +$\theta$. However, even in these higher state spaces, the mathematics operate in the same fashion as described for the +one- and two-dimensional cases. + +One rough method to check a higher-dimensional GCU result for ellipsoid enclosure (although not strictly {\em minimal} +enclosure) is to project the set of $n$-dimensional ellipsoids into all possible two-dimensional major axis component +planes. Properly contained ellipsoids should still be properly contained in any lower-dimensional projection. Figure +\ref{fig:cu3d} illustrates this property by projecting a set of three-dimensional 1-$\sigma$ contour ellipsoids into the +$xy$, $xz$, and $yz$ planes. +\begin{figure}[tbp] + \centering + \subfloat[Projection into $xy$ plane]{\label{fig:cu3dxy}\includegraphics[width=0.4\textwidth]{figures/cu3dxy.png}} + \subfloat[Projection into $xz$ plane]{\label{fig:cu3dxz}\includegraphics[width=0.4\textwidth]{figures/cu3dxz.png}} + \subfloat[Projection into $yz$ plane]{\label{fig:cu3dyz}\includegraphics[width=0.4\textwidth]{figures/cu3dyz.png}} + \caption{\it 1-$\sigma$ contour plots of three 3D input estimates (blue) together with the batch GCU result (red), + projected down into the three 2D major axis component planes. } + \label{fig:cu3d} +\end{figure} +Computation of the sixth-order $P(t)$ polynomial (equation \ref{eqn:poly}) for the Lagrange test confirms that the GCU +result 1-$\sigma$ contour ellipsoid properly contains its inputs in three-dimensional space as well, the space in which +this result is known to be minimized. + + +% Additional 2D figures +\section{Additional Examples}\label{section:examples} + +In this section, further examples of two-dimensional GCU are plotted as 1-$\sigma$ contour ellipses to provide further +evidence that a GCU solution satisfies the MEEE requirements. The procedure used for each example is: +\begin{enumerate} + \item Randomly generate five mean and covariance estimates, $(\v{m}_i,\m{M}_i)$, $i=1\dots 5$. + \item Calculate $(\v{u},\m{U})$ as the batch GCU of $(\v{m}_i,\m{M}_i)$, $i=1\dots 5$. + \item Use the transformation in equation \ref{eqn:cu2e} to find the ellipses $\varepsilon_0=\mathbb{T}(\v{u},\m{U})$ + and $\varepsilon_i=\mathbb{T}(\v{m}_i,\m{M}_i)$, $i=1\dots 5$. + \item Use the procedure in section \ref{section:containment} to find $\lambda_{max}$ for each $Q_0$ and $Q_i$, + $i=1\dots 5$. +\end{enumerate} +The fives values of $\lambda_{max}\leq 0$ are given as numerical results to support the claim that each GCU ellipse +actually does properly contain all of its inputs~\cite{eberly00}. The 1-$\sigma$ contour plots are shown in figure +\ref{fig:cu2d-5}, and the numerical values of $\lambda_{max}$ are listed in table \ref{tab:cu2d-5}. + +\begin{figure}[tbp] + \centering + \subfloat[]{\label{fig:cu2d-5a}\includegraphics[width=0.4\textwidth]{figures/cu2d-5a.png}} + \subfloat[]{\label{fig:cu2d-5b}\includegraphics[width=0.4\textwidth]{figures/cu2d-5b.png}} + \subfloat[]{\label{fig:cu2d-5c}\includegraphics[width=0.4\textwidth]{figures/cu2d-5c.png}} + \subfloat[]{\label{fig:cu2d-5d}\includegraphics[width=0.4\textwidth]{figures/cu2d-5d.png}} + \subfloat[]{\label{fig:cu2d-5e}\includegraphics[width=0.4\textwidth]{figures/cu2d-5e.png}} + \subfloat[]{\label{fig:cu2d-5f}\includegraphics[width=0.4\textwidth]{figures/cu2d-5f.png}} + \caption{\it 1-$\sigma$ contour plots of five 2D input estimates (blue) together with the batch GCU result (red). Figures + (a) through (f) are independent examples, and the numerical results for + $\lambda_{max}$ are given in table \ref{tab:cu2d-5}. } + \label{fig:cu2d-5} +\end{figure} + +\begin{table} +\centering +\begin{tabular*}{0.8\textwidth}{@{\extracolsep{\fill}}r@{.}lr@{.}lr@{.}lr@{.}lr@{.}lr@{.}l} +\multicolumn{2}{c}{Ex. (a)} & +\multicolumn{2}{c}{Ex. (b)} & +\multicolumn{2}{c}{Ex. (c)} & +\multicolumn{2}{c}{Ex. (d)} & +\multicolumn{2}{c}{Ex. (e)} & +\multicolumn{2}{c}{Ex. (f)}\\ +\hline +-1&40e-4 & -0&0264 & -0&1592 & -2&24e-5 & -6&64e-5 & -0&1353 \\ +-0&1374 & -2&31e-5 & -0&0095 & -9&24e-4 & -0&7482 & -0&0078 \\ +-1&99e-5 & -0&1508 & -3&96e-5 & -4&44e-5 & -1&51e-4 & -1&64e-4 \\ +-0&3566 & -1&21e-4 & -5&16e-5 & -1&53e-5 & -0&1234 & -0&2035 \\ +-0&4794 & -1&79e-4 & -0&2109 & -1&19e-5 & -0&0356 & -1&72e-5\\ +\end{tabular*} + \caption{\it Five $\lambda_{max}$ values for the six GCU trials shown in figure \ref{fig:cu2d-5}. Note that all of these + values satisfy the condition $\lambda_{max}\leq 0$ to show that the GCU 1-$\sigma$ contour ellipse properly contains its + five inputs. } + \label{tab:cu2d-5} +\end{table} + + + + diff --git a/chapters/chapter5.tex b/chapters/chapter5.tex new file mode 100644 index 0000000..0108183 --- /dev/null +++ b/chapters/chapter5.tex @@ -0,0 +1,37 @@ +\chapter{Conclusion}\label{chapter:conclusion} + +\section{Discussion} + +\PARstart{T}{his thesis} has presented a technique from data fusion called Generalized Covariance Union, an important +member in the hierarchy of data fusion tools. GCU allows data fusion operations to be performed in the presence of +possibly correlated and/or spurious input, but its current implementation does not provide a real-time response in +higher-dimensional state spaces. + +GCU can be graphically plotted in such a way as to suggest equivalence with the Minimal Enclosing Ellipsoid of +Ellipsoids problem, which would allow computational geometry tools to be applied to solve the GCU optimization problem. +The 1-$\sigma$ contour ellipsoids which uniquely define the Gaussian PDF associated with an error covariance, and the +covariance-to-ellipsoid transformation given in equation \ref{eqn:cu2e}, are interchangeable, and this provides a +mechanism for testing whether Generalized CU and MEEE do in fact solve the same problem. The logic outlined in section +\ref{section:explanation} and the experimental evidence illustrated in examples \ref{ex:gcu1d} and \ref{ex:gcu2d}, and +in section \ref{section:examples}, suggest that the answer to this question is yes. + + +\section{Future Work} + +Although the experimental evidence presented is suggestive, it is not conclusive. Before research on GCU and MEEE can be +merged, there must be a rigorous proof in place showing that these two techniques are equivalent in any dimensionality. +Once this proof is established, it will be possible to solve GCU using MEEE algorithms, and vice-versa. The immediate +benefit will be a direct comparison of software running time of implementations of each technique, leading toward +improved real-time responses in both domains. Additionally, once it becomes accepted that GCU and MEEE are +interchangeable, this will allow for further investigation into other relationships between the fields of data fusion +and computational geometry. Perhaps these relationships exist not only between the two techniques used in this thesis, +but are in fact an indication of a larger degree of compatibility between two previously unrelated classes of problems. + +This thesis contains the first formal analysis of GCU, following its initial presentation to the 9th International +Conference on Information Fusion in 2006, in~\cite{fusion06}. Planned future work includes a journal article covering +the GCU--MEEE equivalence. Although past and current research has been hampered by the lack of available tools---e.g. the +current implementation of CU/GCU is the first of its kind---continuing refinement to the CU/GCU optimization problem +will no doubt prove invaluable to further study, eventually leading to a robust real-time tool for mainstream data fusion +applications. + + diff --git a/chapters/citations.bib b/chapters/citations.bib new file mode 100644 index 0000000..eb40300 --- /dev/null +++ b/chapters/citations.bib @@ -0,0 +1,152 @@ +@inproceedings{fusion06, + author = {Ottmar Boschardt{, Ryan Calhoun, Simon Julier, and Jeffrey Ulhmann}}, + title = {Generalized Information Representation and Compresssion Using Covariance Union}, + booktitle = {9th Internation Conference on Information Fusion}, + address = {Florence, Italy}, + month = {10--13 July}, + year = {2006} + } + +@inproceedings{julier05, + author = {S. Julier{ and J. K. Uhlmann}}, + title = {Fusion of Time Delayed Measurements With Uncertain Time Delays}, + booktitle = {2005 American Control Conference}, + address = {Portland, OR, USA}, + month = {8--10 June}, + year = {2005} + } + +@article{uhlmann03, + author = {Jeffrey Uhlmann}, + title = {Covariance Consistency Methods for Fault-Tolerant Distributed Data Fusion}, + journal = {Information Fusion}, + pages = {201--215}, + volume = {4}, + number = {3}, + month = {September}, + year = {2003} + } + +@book{siggraph01, + author = {Greg Welch and Gary Bishop}, + title = {SIGGRAPH 2001 Course 8: An Introduction to the Kalman Filter}, + publisher = {ACM Press/Addison-Wesley Publishing Co.}, + address = {Los Angeles, CA, USA}, + year = {2001} + } + +@book{maybeck79, + author = {P.S. Maybeck}, + title = {Stochastic Models, Estimation, and Control}, + publisher = {Academic Press}, + address = {New York, NY, USA}, + volume = {141}, + series = {Mathematics in Science and Engineering}, + year = {1979} + } + +@book{barshalom88, + author = {Y. Bar-Shalom{ and T. E. Fortmann}}, + title = {Tracking and Data Association}, + publisher = {Academic Press Professional, Inc.}, + address = {San Diego, CA, USA}, + year = {1988} + } + +@incollection{fusion01, + author = {Simon Julier{ and Jeffrey Uhlmann}}, + editor = {David L. Hall{ and James Llinas}}, + title = {General Decentralized Data Fusion with Covariance Intersection (CI)}, + booktitle = {Handbook of Multisensor Data Fusion}, + chapter = {12}, + publisher = {CRC Press}, + address = {Boca Raton, FL, USA}, + year = {2001} + } + + +@article{yildirim06, + author = {E. Alper Yildirim}, + title = {On the Minimum Volume Covering Ellipsoid of Ellipsoids}, + journal = {SIAM Journal on Optimization}, + pages = {621--641}, + volume = {17}, + number = {3}, + month = {September}, + year = {2006} + } + +@article{vandenberghe96, + author = {Lieven Vandenberghe{, Stephen Boyd, and Shao-Po Wu}}, + title = {Determinant Maximization with Linear Matrix Inequality Constraints}, + journal = {SIAM Journal on Matrix Analysis and Applications}, + pages = {499--533}, + volume = {19}, + number = {2}, + year = {1998} + } + +@book{boyd94, + author = {S. Boyd{, L. El Ghaoni, E. Feron, and V. Balakrishnan}}, + title = {Linear Matrix Inequalities in System Control Theory}, + publisher = {Society for Industrial and Applied Mathematics}, + address = {Philadelphia, PA, USA}, + volume = {15}, + series = {Studies in Applied Mathematics}, + year = {1994} + } + + +@article{ju01, + author = {M. Ju{, J. Liu, S. Shiang, Y. Chien, K. Hwang, and W. Lee}}, + title = {Fast and Accurate Collision Detection Based on Enclosed Ellipsoids}, + journal = {Robotica}, + volume = {19}, + number = {4}, + pages = {381--394}, + month = {June}, + year = {2001} + } + +@inproceedings{shiang00, + author = {S. Shiang{, J. Liu, and Y. Chien}}, + title = {Estimate of Minimum Distance Between Convex Polyhedra Based on Enclosed Ellipsoids}, + booktitle = {2000 IEEE/RSJ International Conference on Intelligent Robots and Systems}, + pages = {739--744}, + address = {Takamatsu, Japan}, + month = {31 October--5 November}, + year = {2000} + } + +@article{sturm03, + author = {J. F. Sturm{ and S. Z. Zhang}}, + title = {On Cones of Nonnegative Quadratic Functions}, + journal = {Mathematics of Operations Research}, + volume = {28}, + number = {2}, + pages = {246--267}, + month = {May}, + year = {2003} + } + +@misc{eberly00, + author = {David Eberly}, + title = {Intersection of Ellipsoids}, + publisher = {Geometric Tools, Inc.}, + howpublished = {\url{http://www.geometrictools.com}}, + month = {10 October}, + year = {2000} + } + +@inbook{boyd04, + author = {Stephen Boyd{ and Lieven Vandenberghe}}, + title = {Geometric Problems}, + chapter = {8}, + booktitle = {Convex Optimization}, + address = {Cambridge, MA, USA}, + publisher = {Cambridge University Press}, + year = {2004} + } + + + diff --git a/chapters/cover.tex b/chapters/cover.tex new file mode 100644 index 0000000..dd14742 --- /dev/null +++ b/chapters/cover.tex @@ -0,0 +1,77 @@ +\title{\maintitle} +\thispagestyle{empty} +\vskip 10mm +\smalltitle +\vskip 10mm +\centerline{\rule{150mm}{0.2mm}} +\vskip 10mm +\centerline{A Thesis presented to the Faculty of the Graduate School} +\centerline{University of Missouri---Columbia} +\vspace{10mm} +\centerline{\rule{150mm}{0.2mm}} +\vspace{10mm} +\centerline{In Partial Fulfillment} +\centerline{of the Requirements for the Degree} +\centerline{of \fulldegree} +\vspace{10mm} +\centerline{\rule{150mm}{0.2mm}} +\vspace{10mm} +\centerline{by} +\vskip 4mm +\centerline{\MYNAME} +\vskip 4mm +\centerline{\myadvisor,\hspace{1mm} Thesis Supervisor} +\vskip 4mm +\centerline{\defensedate} +\newpage + +\thispagestyle{empty} +\vspace*{15cm} +\begin{center} +$\mbox{\copyright}$ copyright by \myname~ \defenseyear\\ +All Rights Reserved +\end{center} +\newpage + +\thispagestyle{empty} +The undersigned, appointed by the Dean of the Graduate School, have +examined the thesis entitled:\par +\vskip 5mm +\smalltitle +\vskip5mm +presented by \myname \par +a candidate for the degree of \fulldegree \par +and hereby certify that in their opinion it is worthy of acceptance. +%\vskip 15mm +\vskip 15mm +\centerline{\rule{100mm}{0.2mm}} +\centerline{\myadvisor}%\vskip 12mm +\vskip 10mm +\centerline{\rule{100mm}{0.2mm}} +\secondreader%\vskip 12mm +\vskip 10mm +\centerline{\rule{100mm}{0.2mm}} +\thirdreader%\vskip 12mm +%\vskip 4mm +%\centerline{\rule{100mm}{0.2mm}} +%\fourthreader +\newpage + + +%\newpage +%\pagenumbering{roman} +%\setcounter{page}{2} +%\newpage +%\addcontentsline{toc}{chapter}{ACKNOWLEDGEMENTS} +%\vskip 10mm +%\centerline{\bf \large ACKNOWLEDGMENTS} +%\vskip 10mm +%\input{aknowledge} +%\newpage +%\addcontentsline{toc}{chapter}{ABSTRACT} +%\centerline {\large \bf ABSTRACT} +%\vskip 2mm + +%\newpage + +%\input{abstract} diff --git a/figures/alpha1d-05.png b/figures/alpha1d-05.png new file mode 100644 index 0000000..afb7d29 Binary files /dev/null and b/figures/alpha1d-05.png differ diff --git a/figures/alpha1d-25.png b/figures/alpha1d-25.png new file mode 100644 index 0000000..b54716b Binary files /dev/null and b/figures/alpha1d-25.png differ diff --git a/figures/alpha1d-50.png b/figures/alpha1d-50.png new file mode 100644 index 0000000..c7203d8 Binary files /dev/null and b/figures/alpha1d-50.png differ diff --git a/figures/alpha1d-75.png b/figures/alpha1d-75.png new file mode 100644 index 0000000..c255ea3 Binary files /dev/null and b/figures/alpha1d-75.png differ diff --git a/figures/alpha1d-95.png b/figures/alpha1d-95.png new file mode 100644 index 0000000..b219b96 Binary files /dev/null and b/figures/alpha1d-95.png differ diff --git a/figures/alpha1dcurve.png b/figures/alpha1dcurve.png new file mode 100644 index 0000000..2af01c4 Binary files /dev/null and b/figures/alpha1dcurve.png differ diff --git a/figures/alpha2d-05.png b/figures/alpha2d-05.png new file mode 100644 index 0000000..5642aa1 Binary files /dev/null and b/figures/alpha2d-05.png differ diff --git a/figures/alpha2d-25.png b/figures/alpha2d-25.png new file mode 100644 index 0000000..3f6c16d Binary files /dev/null and b/figures/alpha2d-25.png differ diff --git a/figures/alpha2d-50.png b/figures/alpha2d-50.png new file mode 100644 index 0000000..fb0c052 Binary files /dev/null and b/figures/alpha2d-50.png differ diff --git a/figures/alpha2d-75.png b/figures/alpha2d-75.png new file mode 100644 index 0000000..597682b Binary files /dev/null and b/figures/alpha2d-75.png differ diff --git a/figures/alpha2d-95.png b/figures/alpha2d-95.png new file mode 100644 index 0000000..bb4f89b Binary files /dev/null and b/figures/alpha2d-95.png differ diff --git a/figures/ci2d-05.png b/figures/ci2d-05.png new file mode 100644 index 0000000..83dbfbc Binary files /dev/null and b/figures/ci2d-05.png differ diff --git a/figures/ci2d-25.png b/figures/ci2d-25.png new file mode 100644 index 0000000..d7f7486 Binary files /dev/null and b/figures/ci2d-25.png differ diff --git a/figures/ci2d-50.png b/figures/ci2d-50.png new file mode 100644 index 0000000..9211e51 Binary files /dev/null and b/figures/ci2d-50.png differ diff --git a/figures/ci2d-75.png b/figures/ci2d-75.png new file mode 100644 index 0000000..87cadd1 Binary files /dev/null and b/figures/ci2d-75.png differ diff --git a/figures/ci2d-95.png b/figures/ci2d-95.png new file mode 100644 index 0000000..585fd60 Binary files /dev/null and b/figures/ci2d-95.png differ diff --git a/figures/cu1d.png b/figures/cu1d.png new file mode 100644 index 0000000..fbf26d2 Binary files /dev/null and b/figures/cu1d.png differ diff --git a/figures/cu2d-4.png b/figures/cu2d-4.png new file mode 100644 index 0000000..f7405fd Binary files /dev/null and b/figures/cu2d-4.png differ diff --git a/figures/cu2d-5a.png b/figures/cu2d-5a.png new file mode 100644 index 0000000..46cadb2 Binary files /dev/null and b/figures/cu2d-5a.png differ diff --git a/figures/cu2d-5b.png b/figures/cu2d-5b.png new file mode 100644 index 0000000..3a2fa00 Binary files /dev/null and b/figures/cu2d-5b.png differ diff --git a/figures/cu2d-5c.png b/figures/cu2d-5c.png new file mode 100644 index 0000000..1ae7a32 Binary files /dev/null and b/figures/cu2d-5c.png differ diff --git a/figures/cu2d-5d.png b/figures/cu2d-5d.png new file mode 100644 index 0000000..dbc5cf2 Binary files /dev/null and b/figures/cu2d-5d.png differ diff --git a/figures/cu2d-5e.png b/figures/cu2d-5e.png new file mode 100644 index 0000000..a7690a7 Binary files /dev/null and b/figures/cu2d-5e.png differ diff --git a/figures/cu2d-5f.png b/figures/cu2d-5f.png new file mode 100644 index 0000000..acbdca0 Binary files /dev/null and b/figures/cu2d-5f.png differ diff --git a/figures/cu2d-batch.png b/figures/cu2d-batch.png new file mode 100644 index 0000000..bbaa12c Binary files /dev/null and b/figures/cu2d-batch.png differ diff --git a/figures/cu2d-gen-batch.png b/figures/cu2d-gen-batch.png new file mode 100644 index 0000000..0a8d510 Binary files /dev/null and b/figures/cu2d-gen-batch.png differ diff --git a/figures/cu2d-gen-s.png b/figures/cu2d-gen-s.png new file mode 100644 index 0000000..3cc29e9 Binary files /dev/null and b/figures/cu2d-gen-s.png differ diff --git a/figures/cu2d-gen-s1.png b/figures/cu2d-gen-s1.png new file mode 100644 index 0000000..5e487bf Binary files /dev/null and b/figures/cu2d-gen-s1.png differ diff --git a/figures/cu2d-gen-sall.png b/figures/cu2d-gen-sall.png new file mode 100644 index 0000000..cbd6203 Binary files /dev/null and b/figures/cu2d-gen-sall.png differ diff --git a/figures/cu2d-i.png b/figures/cu2d-i.png new file mode 100644 index 0000000..9872eba Binary files /dev/null and b/figures/cu2d-i.png differ diff --git a/figures/cu2d-i1.png b/figures/cu2d-i1.png new file mode 100644 index 0000000..898a6af Binary files /dev/null and b/figures/cu2d-i1.png differ diff --git a/figures/cu2d-iall.png b/figures/cu2d-iall.png new file mode 100644 index 0000000..162de57 Binary files /dev/null and b/figures/cu2d-iall.png differ diff --git a/figures/cu2d.png b/figures/cu2d.png new file mode 100644 index 0000000..f3689f1 Binary files /dev/null and b/figures/cu2d.png differ diff --git a/figures/cu3dxy.png b/figures/cu3dxy.png new file mode 100644 index 0000000..3afd78c Binary files /dev/null and b/figures/cu3dxy.png differ diff --git a/figures/cu3dxz.png b/figures/cu3dxz.png new file mode 100644 index 0000000..27acc49 Binary files /dev/null and b/figures/cu3dxz.png differ diff --git a/figures/cu3dyz.png b/figures/cu3dyz.png new file mode 100644 index 0000000..7d86862 Binary files /dev/null and b/figures/cu3dyz.png differ diff --git a/figures/ellipse01.png b/figures/ellipse01.png new file mode 100644 index 0000000..5b046ce Binary files /dev/null and b/figures/ellipse01.png differ diff --git a/figures/est1d-4.png b/figures/est1d-4.png new file mode 100644 index 0000000..9ac903b Binary files /dev/null and b/figures/est1d-4.png differ diff --git a/figures/est2d-3.png b/figures/est2d-3.png new file mode 100644 index 0000000..789b829 Binary files /dev/null and b/figures/est2d-3.png differ diff --git a/figures/est2d-4.png b/figures/est2d-4.png new file mode 100644 index 0000000..8fe75f1 Binary files /dev/null and b/figures/est2d-4.png differ diff --git a/figures/est2d.png b/figures/est2d.png new file mode 100644 index 0000000..7f2d156 Binary files /dev/null and b/figures/est2d.png differ diff --git a/figures/kalman2d-i.png b/figures/kalman2d-i.png new file mode 100644 index 0000000..186f6fd Binary files /dev/null and b/figures/kalman2d-i.png differ diff --git a/figures/kalman2d.png b/figures/kalman2d.png new file mode 100644 index 0000000..eb1d704 Binary files /dev/null and b/figures/kalman2d.png differ diff --git a/myeqns.tex b/myeqns.tex new file mode 100644 index 0000000..c762476 --- /dev/null +++ b/myeqns.tex @@ -0,0 +1,18 @@ +\DeclareMathOperator{\CU}{CU} +\DeclareMathOperator{\GCU}{GenCU} +\newcommand{\gaussN}[1]{\mathcal{N}\left\{#1\right\}} +\newcommand{\m}[1]{\mathbf{#1}} +\renewcommand{\v}[1]{\mathbf{#1}} +\newcommand{\ea}{\tilde{\mathbf{m}}} + +\newtheoremstyle{example}{\topsep}{\topsep}% + {}% Body font + {}% Indent amount (empty = no indent, \parindent = para indent) + {\bfseries}% Thm head font + {}% Punctuation after thm head + {\newline}% Space after thm head (\newline = linebreak) + {\thmname{#1}\thmnumber{ #2}\thmnote{ #3}}% Thm head spec + + \theoremstyle{example} + \newtheorem{example}{Example}[section] + diff --git a/myowndef.sty b/myowndef.sty new file mode 100644 index 0000000..72f1078 --- /dev/null +++ b/myowndef.sty @@ -0,0 +1,20 @@ +\def\myname{Ryan \ J. \ Calhoun} +\def\MYNAME{RYAN \ J. \ CALHOUN} +\def\myadvisor{Dr. Jeffrey Uhlmann} +\def\maintitle{\bf ON THE RELATIONSHIP BETWEEN GENERALIZED COVARIANCE UNION AND THE MINIMAL ENCLOSING ELLIPSOID PROBLEM} +\def\smalltitle +{ +\centerline{\bf ON THE RELATIONSHIP BETWEEN} +\centerline{\bf GENERALIZED COVARIANCE UNION} +\centerline{\bf AND THE MINIMAL ENCLOSING ELLIPSOID PROBLEM} +} +\def\firstreader{\centerline{Dr. Jeffrey Uhlmann}} +\def\secondreader{\centerline{Dr. Ye Duan}} +\def\thirdreader{\centerline{Dr. Michael Devaney}} + +\def\fulldegree{Master of Science} +\def\defensemonth{MAY} +\def\defenseyear{2008} +\def\defensedate{\defensemonth~\defenseyear} +\def\tc{$T_{AF \rightarrow F}\ $} +