diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 2943778..0000000 --- a/doc/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -LATEX = latex -DVIPDF = dvipdf -BIBTEX = bibtex -PDFLATEX = pdflatex - -all: delimit - -delimit: delimit.tex - $(LATEX) $+ - $(BIBTEX) $@ - $(DVIPDF) $@ diff --git a/doc/bayesian.tex b/doc/bayesian.tex deleted file mode 100644 index 99ef6a4..0000000 --- a/doc/bayesian.tex +++ /dev/null @@ -1,90 +0,0 @@ -% This is LLNCS.DEM the demonstration file of -% the LaTeX macro package from Springer-Verlag -% for Lecture Notes in Computer Science, -% version 2.4 for LaTeX2e as of 16. April 2010 -% -\documentclass{llncs} -% -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{tikz} -\usepackage[linesnumbered,ruled]{algorithm2e} - -\newcounter{instr} -\newcommand{\ninstr}{\refstepcounter{instr}\theinstr.} - -\begin{document} - -\title{Species delimitation} - -\titlerunning{Species delimitation} - -\author{Tom\'{a}\v{s} Flouri\inst{1} \and Paschalia Kapli\inst{1} \and Sarah Lutteropp\inst{1}} -\authorrunning{Tom\'{a}\v{s} Flouri et al.} % abbreviated author list -\institute{Heidelberg Institute of Theoretical Studies} - -\maketitle - -\begin{abstract} -An explanation of the Bayesian approach for PTP.\@ -\end{abstract} - -\section{Bayesian Approach} - -In order to obtain support values for every node, we follow a Bayesian Markov-Chain Monte-Carlo (MCMC) approach. We let the user choose whether to start with the maximum likelihood solution found by the heuristic, the null model or a randomly chosen delimitation. - -In each MCMC step, we change the current delimitation and recompute its loglikelihood score. After this, we decide whether to keep the change or not according to the hastings ratio. The hastings ratio $r$ is computed as - -$$r = \exp(\text{new\_logl} - \text{old\_logl}) * \frac{\text{Number of possible choices for chosen move in old delimitation}}{\text{Number of possible choices for non-chosen move in new delimitation}}$$ - -\subsection{Allowed Moves} - -In order to change a delimitation in the MCMC steps, we randomly select one of two possible moves with equal probability (see Fig.~\ref{fig:moves}). - -\begin{figure}[h!] -\centering -\includegraphics[scale=0.3]{images/moves.pdf} -\caption{Allowed moves in the Bayesian steps. The black edges belong to the speciation part, the colored edges are within species. The node label ``S'' means that a node is a speciation event, whereas the labels ``C'' and ``CR'' mean that a node is a coalescent event. The difference between ``C'' and ``CR'' is that ``CR'' stands for a coalescent root node, i.e. the MRCA of a species.} -\label{fig:moves} -\end{figure} - -\subsection{Support Values} -The support value $\text{support}(v)$ of a node $v$ is computed as follows: -$$\text{support}(v) = \frac{\text{Number of MCMC moves without burnin where $v$ was a MRCA}}{\text{Number of MCMC moves without burnin}}$$ - -\subsection{Pseudocode} - -\begin{algorithm} - -\underline{function mcmc $(T, min\_br)$}\; -D = getInitialDelimitation($T, min\_br$)\; - -\For{$i = 1, \ldots, $ number of runs}{ - p = rand() \textit{//random floating-point number between 0 and 1}\; - - \If{$p \leq 0.5$}{ - move = move1\; - } - \Else{ - move = move2\; - } - D\_new = applyMove(D, move)\; - - \If {$i > \text{burnin}$} { - updateSupportValues(T, D\_new)\; - } - r = computeHastingsRatio(D, D\_new, move)\; - - q = rand() \textit{//random floating-point number between 0 and 1}\; - \If{$q \leq r$}{ - D = D\_new \textit{//accept move}\; - } -} - -\caption{Markov-Chain Monte-Carlo algorithm for PTP} - -\end{algorithm} - -\bibliographystyle{splncs03} -\bibliography{delimit} -\end{document} diff --git a/doc/bayesian_task.tex b/doc/bayesian_task.tex deleted file mode 100644 index 5069ec5..0000000 --- a/doc/bayesian_task.tex +++ /dev/null @@ -1,104 +0,0 @@ -%%% LaTeX Template: Article/Thesis/etc. with colored headings and special fonts -%%% -%%% Source: http://www.howtotex.com/ -%%% Feel free to distribute this template, but please keep to referal to http://www.howtotex.com/ here. -%%% February 2011 - -%%%%% Preamble -\documentclass[10pt,a4paper]{article} - -\usepackage[T1]{fontenc} - -\usepackage[utf8]{inputenc} % Input encoding -\usepackage{amsmath} -\usepackage{amssymb} % Math -\usepackage{graphicx} - -\usepackage{amsthm} - -\usepackage{url} - -\usepackage{tcolorbox} -\tcbuselibrary{theorems} - -%%%%% Definitions - -\title{Bayesian Task Description} -\author{Sarah Lutteropp} - -\newtheorem{definition}{Definition} -\newtheorem{example}{Example} -\newtheorem{theorem}{Theorem} - -\begin{document} -\maketitle - -\begin{abstract} -The following document sums up the tasks for the Bayesian implementation of the new PTP heuristic. -\end{abstract} - -\section{The Problem} -The current new PTP heuristic tends to oversplit the taxa into too many species. We believe that this is a fundamental problem with the currently used maximum likelihood model. - -\section{The Solution} -We will use a prior for the number of species in the tree. Since we do not know the prior distribution, we will use a hyperprior approach for that. - -\paragraph{Candidate Distributions for the Prior} -\begin{itemize} -\item Negative binomial distribution (since it is the discrete analogue of the gamma distribution) -\item Binomial distribution -\item Dirichlet - -\item Beta distribution -\item Uniform distribution -\end{itemize} - -\textcolor{red}{\textbf{Still unclear to me: Why should we use this distribution? Does it make any sense? It describes the number of trials needed until you have a given number of successes in a Bernoulli experiment \ldots What is the connection to the number of species?!}} - -\paragraph{Candidate Distributions for the Hyperprior} -We will try the following distributions for $\alpha$: -\begin{itemize} - \item Uniform - \item Exponential -\end{itemize} - -\textcolor{red}{\textbf{Still unclear to me: Which values will we use for the parameter of the hyperprior distribution in case of exponential?}} - -\section{Hyperprior Approach} -The likelihood of a given delimitation is multiplied with the likelihood for the number of delimited species (will be implemented by adding the loglikelihood score of the number of species to the old loglikelihood score). - - -\begin{itemize} - \item Draw an $\alpha$: Like in MCMC methods, use the hastings ratio: Always accept a better value for alpha, accept a worse value for alpha with the probability of the likelihood ratio. - \textcolor{red}{\textbf{Still unclear to me: Does this make sense? Do we know what a ``better'' alpha is?}} - \item Apply the heuristic for this specific alpha - \item Count the number of speciation events gotten by the heuristic for different alphas $\Rightarrow$ Gives a posterior probability for the number of species - \item Run it once more with those relative frequencies gotten -\end{itemize} - -\paragraph{Expected Output} -\begin{itemize} -\item Relative frequencies of the number of speciation events in the results from the heuristics -\item Delimitation obtained by the heuristic with the distribution of species numbers gotten by the relative frequencies -\item Delimitation that gave the best overall likelihood score during the runs -\end{itemize} - -\section{Evaluation of the Results} -We will decide for the approach that led to approximately the same number of species as our simulated ``true'' data. - -\textcolor{red}{\textbf{How do we avoid overfitting?}} - -\section{Support Values} -Biologists are happy about support values for each speciation event. We need to try these two approaches: -\begin{itemize} - \item exact matching - \item subset matching (will lead to higher support values) -\end{itemize} - -\begin{figure}[h!] -\centering -\includegraphics[scale=0.2]{images/support_tree.pdf} -\caption{Difference between exact matching and subset matching: Does the choice of MRCA $B$ also support the MRCA $A$ (or vice versa)?} -\end{figure} - -\end{document} diff --git a/doc/delimit.bib b/doc/delimit.bib deleted file mode 100644 index ae129a5..0000000 --- a/doc/delimit.bib +++ /dev/null @@ -1,39 +0,0 @@ -@article{Fujisawa01092013, -author = {Fujisawa, Tomochika and Barraclough, Timothy G.}, -title = {{Delimiting Species Using Single-Locus Data and the Generalized Mixed Yule Coalescent Approach: A Revised Method and Evaluation on Simulated Data Sets}}, -volume = {62}, -number = {5}, -pages = {707-724}, -year = {2013}, -journal = {Systematic Biology} -} - -@article{Gulek:2010:DPA:1838770.1839019, - author = {Gulek, Mehmet and Toroslu, Ismail Hakki}, - title = {A Dynamic Programming Algorithm for Tree-like Weighted Set Packing Problem}, - journal = {Inf. Sci.}, - issue_date = {October, 2010}, - volume = {180}, - number = {20}, - month = oct, - year = {2010}, - issn = {0020-0255}, - pages = {3974--3979}, - numpages = {6}, - url = {http://dx.doi.org/10.1016/j.ins.2010.06.035}, - doi = {10.1016/j.ins.2010.06.035}, - acmid = {1839019}, - publisher = {Elsevier Science Inc.}, - address = {New York, NY, USA}, - keywords = {Assignment problem, Complexity of algorithm, Dynamic programming, Set packing problem, Tree-like structure}, -} - -@article{PTP, -author = {Zhang, Jiajie and Kapli, Paschalia and Pavlidis, Pavlos and Stamatakis, Alexandros}, -title = {A general species delimitation method with applications to phylogenetic placements}, -volume = {29}, -number = {22}, -pages = {2869-2876}, -year = {2013}, -journal = {Bioinformatics} -} diff --git a/doc/delimit.tex b/doc/delimit.tex deleted file mode 100644 index 108a31c..0000000 --- a/doc/delimit.tex +++ /dev/null @@ -1,163 +0,0 @@ -% This is LLNCS.DEM the demonstration file of -% the LaTeX macro package from Springer-Verlag -% for Lecture Notes in Computer Science, -% version 2.4 for LaTeX2e as of 16. April 2010 -% -\documentclass{llncs} -% -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{tikz} - -\newcounter{instr} -\newcommand{\ninstr}{\refstepcounter{instr}\theinstr.} - -\begin{document} - -\title{Species delimitation} - -\titlerunning{Species delimitation} - -\author{Tom\'{a}\v{s} Flouri1\inst{1} \and Paschalia Kapli\inst{1}} -\authorrunning{Tom\'{a}\v{s} Flouri et al.} % abbreviated author list -\institute{Heidelberg Institute of Theoretical Studies} - -\maketitle - -\begin{abstract} -An explanation of the GMYC method. -\end{abstract} - -\section{Introduction} - -We describe the method for delimiting species using the GMYC method presented -in \cite{Fujisawa01092013}. - -\section{Preliminaries} - -\subsection{Basic definitions} - -A tree $T=(V,E)$ is a connected acyclic graph where $V$ is the set of {\em -nodes} and $E$ the set of {\em edges}, such that $E \subseteq V\times V$. We -use the notation $(u,v) \in E$ to denote an edge with end-points $u,v \in V$. -If $T$ is {\em oriented}, then {\em in-degree} (resp. {\em out-degree}) of a -node denotes the number of incoming (resp. outgoing edges) of $u$. In the -opposite case, the {\em degree} of node $u$ denotes the number of edges $u$ is -an end-point of. An {\em path} of length $k$ of a graph -$T=(V,E)$ is a subgraph $(V' \subset V,E' \subset E)$ such that -\[ V' = \{v_0,v_1,\ldots, v_k\} \qquad -E' =\{(v_0,v_1),(v_1,v_2),\ldots,(v_{k-1},v_k)\}. \] -and all $v_i$, $0 \leq i \leq k$ are distinct. We denote the path from node $u$ -to node $v$ as $u \leadsto v$. We call the graph $G=(V',E')$ an {\em induced -subgraph} of $T=(V,E)$ if $V'\subset V$, $E' \subset E$ and $E'$ contains all -edges $(u,v) \in E$ for all $u,v\in V'$. A non-emptu graph is {\em connected} -if any two of its vertices are linked by a path in $G$. Further, we denote with -$T_u$ the subtree of $T$ rooted at node $u$. A {\em rooted binary tree} $T$ is -a {\em directed} tree with all nodes having in-degree 1 and out-degree 1 ({\em -inner} nodes), or in-degree 1 and out-degree 0 ({\em leaves}). Furthermore, one -node has in-degree 0 and out-degree 2 ({\em root}). In the rest of the text we -implicitely assume under the term tree a binary rooted tree. We denote the set -of leaves of tree $T$ as $L(T)$. The cardinality of a set $X$ is denoted as -$|X|$. The mapping $\ell : E \mapsto \mathbb{N}$ associated each edge $e \in E$ -with a length $\ell(e)$. For clarity, we will use the notation $\ell_{u,v}$ to -denote the length $\ell((u,v))$. We define the {\em height} $h(u)$ of a node -$u$ of $T$ as -% -\[ h(u) = \left\{ \begin{array}{ll} \max(h(v) + \ell_{u,v}, h(w) + \ell_{u,w}) -+ 1 & \quad : \quad u \notin L(T)\\ 0 -& \quad : \quad u \in L(T)\\ \end{array}\right. \] The height $h(T)$ of a -tree $T$ is the height of its root. Finally, we will implicitely use the -notation $r$ for specifying the root of a tree, and $\ell_{u,v}$ for the length -of edge $(u,v)$. A tree is {\em ultrametric} if the sum of lengths of edges in -the path from a leaf to a root is equal for all leaves in a tree. - -\section{Single-threshold GMYC method} - -\paragraph{\bf Interval computation.} -We first compute the possible lines where we can distinguish between a -coalescent and a Yule process. These splits occur always at inner nodes. Let -$s_1, s_2, \ldots, s_{k+1}$ be the ordered sequence of $k$ values such that -$s_i> s_{i-1}$ for $2 \leq i \leq k+1$ and $\{ h(u) \ |\ \forall u \in V\} = \{ -s_1, s_2, \ldots, s_{k+1}\}$. We obtain $k$ intervals $x_i$ such that $x_i = -s_{i+1} - s_i$ for $1 \leq i \leq k$. Fig.~\ref{fig:tree} shows an example. - -\begin{figure}[t] -\centering -\input{tree} -\caption{A tree with four intervals, and 5 inner nodes.}\label{fig:tree} -\end{figure} - -\paragraph{\bf Main method.} -Having computed the intervals, the methods proceeds by iteratively setting each -inner node (apart from the root) as the point in time where speciation stops -and coalescence starts, and computes the likelihood of this setting by -optimizing the two values $p_s$ and $p_c$. Once the threshold yielding the -maximum likelihood is found, it is tested against the null hypothesis, and in -case it passes, delimitation is carried based on the threshold, otherwise all -taxa are different species. Fig.~\ref{fig:gmyc-single} illustrates the -single-threshold version of the GMYC algorithm. The formulas for the -likelihood computation $L$ are for the $k$ intervals are the following. -$$L \leftarrow \sum_{i\leftarrow 1}^k b_i e^{-b_i x_i}$$ -where -$$b_i \leftarrow \lambda_s (n_i^s)^{p_s} + \sum_{j\leftarrow 1}^{m_i}\lambda_c(n_{i,j}^c(n_{i,j}^c-1))^{p_c}$$ -such that $m_i$ is the number of coalescent events for interval $x_i$. Finally, the rates $\lambda_s$ and $\lambda_c$ -are computed as -$$ \lambda_s \leftarrow \frac{i-1}{\sum_{j\leftarrow 1}^k (n_j^s)^{p_s} x_j}$$ -considering $s_i$ as the threshold, and -$$ \lambda_c \leftarrow \frac{\sum_{i\leftarrow 1}^k\sum_{j\leftarrow 1}^{m_i}(n_{i,j}^c-1)}{\sum_{i\leftarrow 1}^k\sum_{j\leftarrow 1}^{m_i}(n_{i,j}^c(n_{i,j}^c -1))^{p_c}x_i}.$$ -Note that, the nominator for $\lambda_s$ is in fact the number of bifurcations -occuring before the threshold, while the nominator for $\lambda_c$ is the -number of bifurcations occuring after (and including the) threshold. - -\setcounter{instr}{0} -\begin{figure}[t] -\begin{center} -\begin{tabular}{|rl|} -\hline -\multicolumn{2}{|l|}{\textsc{DP}$(V, E, k)$}\\ -\ninstr & $\textit{max\_L} \leftarrow = -\infty$\\ -\ninstr & \textbf{for} $r \leftarrow 2$ \textbf{to} $k+1$\\ -\ninstr & \qquad set $s_r$ as threshold\\ -\ninstr & \qquad \textbf{for} $i \leftarrow 1$ \textbf{to} $k$\\ -\ninstr & \qquad \qquad $m_i \leftarrow $ number of coalescent events at interval $x_i$ \\ -\ninstr & \qquad \qquad $n_i^s \leftarrow $ number of speciation lineages at interval $x_i$ \\ -\ninstr & \qquad \qquad \textbf{for} $j \leftarrow 1$ \textbf{to} $m_i$\\ -\ninstr & \qquad \qquad \qquad $n_{i,j}^c \leftarrow $ number of coalescent lineages in event $j$ of interval $x_i$ \\ -\ninstr & \qquad optimize $p_s,p_c$ for minimizing $L$ using L-BFGS-R with $s_r$ as threshold.\\ -\ninstr & \qquad $\textit{L} \leftarrow \textsc{Sum-L}(p_s,p_c)$.\\ -\ninstr & \qquad \textbf{if} $\textit{L} > \textit{max\_L}$\\ -\ninstr & \qquad \qquad $\textit{threshold\_node} \leftarrow u$\\ - & $\rhd$ Run Null Method\\ -\ninstr & Optimize $p_s,p_c$ for minimizing $L$ using L-BFGS-R with $s_1$ as threshold.\\ -\ninstr & Run likelihood ratio test\\ - & $\rhd$ Delimit species according to $\textit{threshold\_node}$.\\ -\hline -\end{tabular} -\end{center} -\caption{The DP algorithm for computing relative divergence times. The -algorithm starts by passing the tree ($T$), number of discretization lines -(($N$) and the root of $T$ ($u$). It recursively traverses the tree in -postorder and thne computes the best placement for every node $u$.} -\label{fig:gmyc-single} -\end{figure} - -\section{Poisson Tree Process (PTP)} - -Here we begin by formally describing the problem being solved in \cite{PTP}. We -then report a flaw in the formulation of the problem and give a new, correct -definition. Finally, we prove that the problem is $\mathsf{NP}$-hard, and -propose an approximation algorithm. - -\subsection{Original problem definition} - -The problem described in \cite{PTP} can be formulated in the following way. - -Given is a binary tree $T=(V,E)$ with a root $r \in V$. The goal is to select a connected induced subgraph $T'=(V',E')$ of $T$ -that contains $r$, and maximizes the following equation: - -$$ - |E'|(1 + \log \frac{|E'|}{\sum_{e \in E'}\ell(e)}) - |E''|(1 + \log \frac{|E''|}{\sum_{e \in E''}\ell(e)})$$ - - -\bibliographystyle{splncs03} -\bibliography{delimit} -\end{document} diff --git a/doc/heuristic.tex b/doc/heuristic.tex deleted file mode 100644 index 9a06eac..0000000 --- a/doc/heuristic.tex +++ /dev/null @@ -1,267 +0,0 @@ -% This is LLNCS.DEM the demonstration file of -% the LaTeX macro package from Springer-Verlag -% for Lecture Notes in Computer Science, -% version 2.4 for LaTeX2e as of 16. April 2010 -% -\documentclass{llncs} -% -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{tikz} -\usepackage[linesnumbered,ruled]{algorithm2e} - -\newcounter{instr} -\newcommand{\ninstr}{\refstepcounter{instr}\theinstr.} - -\begin{document} - -\title{Species delimitation} - -\titlerunning{Species delimitation} - -\author{Tom\'{a}\v{s} Flouri\inst{1} \and Paschalia Kapli\inst{1} \and Sarah Lutteropp\inst{1}} -\authorrunning{Tom\'{a}\v{s} Flouri et al.} % abbreviated author list -\institute{Heidelberg Institute of Theoretical Studies} - -\maketitle - -\begin{abstract} -An explanation of the single-lambda and multiple-lambda heuristic for PTP.\@ -\end{abstract} - -\section{Related Work} - -Like in the algorithm from Gulek et al.\cite{Gulek:2010:DPA:1838770.1839019} for the tree-like weighted set packing problem, we try to build up a solution for the whole tree by combining the solutions for its children subtrees. - -\section{Task Description} - -Given a rooted fully binary tree with non-negative edge weight function $w$, we want to partition its leaves into disjoint sets (called species). The \emph{most recent common ancestors} (MRCA) of those species induce subtrees with edge sets $E_1, \ldots, E_{k}$. Every edge that is not assigned to one of those subtrees is then put into the set of speciation edges, $E_{k+1}$. - -Given a set of edges $E$, we define its log-likelihood $logl(E)$ as -$$logl(E) := |E| * (\log{|E|} - 1 - \log{\sum_{e \in E} w(e)})$$ - -\paragraph{Multiple Lambda Score} - -We want to find a delimitation that maximizes the following sum of loglikelihoods (in the following referred to as \emph{score}): - -$$\sum_{i=1}^{k+1}{logl(E_i)}$$ - -\paragraph{Single Lambda Score} - -We want to find a delimitation that maximizes the following sum of loglikelihoods (in the following referred to as \emph{score}, too): - -$$logl(\cup_{i=1}^k{E_i}) + logl(E_{k+1})$$ - -\section{The Heuristic} -We follow a bottom-up dynamic programming approach, always trying to extend a good solution for the children subtrees in order to obtain a good solution for the currently observed tree. - -\subsection{Currently observed tree} - -For each node $v$, the \emph{currently observed tree} (COT) consists of the subtree rooted at $v$, $S(v)$, and the set of edges where we already know that they have to be speciation edges in the case that $S(v)$ contains new species (see Fig.~\ref{fig:currently_observed_tree}). Our aim is to find a delimitation that yields to a high score for the COT.\@ This means that the score computation ignores all edges that are not in the COT since we do not know their assignment. - -\begin{figure}[h!] - \centering - \includegraphics[scale=0.4]{images/currently_observed_tree.pdf} - \caption{The COT of a node $v$. The edges belonging to $S(v)$ are drawn in thick blue lines and the known speciation edges are drawn in thick purple lines. Edges that do not belong to the COT of $v$ are drawn in dotted lines.} - \label{fig:currently_observed_tree} -\end{figure} - -\subsection{Combination of solutions} - -For every node $v$, we store an array that contains the best found score for $0, 1, 2, 3, \ldots, |S(v)|$ speciation edges and the delimitation (i.e., the set of MRCAs) that led to it. A node $v$ can either be a coalescent event or a speciation event. - -\paragraph{Coalescent event} -If $v$ is a coalescent event (i.e., the MRCA of a species), we have $0$ speciation edges in $S(v)$. For this case, we compute the score of all edges in $S(v)$ being coalescent edges and the known speciation edges in the COT of $v$ being speciation edges and store it in $v$. Since we do not need to look at the solutions for the children of $v$ in this case, we can do this step already in the initialization. - -\paragraph{Speciation event} -In order to find a solution for a subtree $S(v)$ and $k \geq 1$ speciation edges, we combine the best found solution for $i$ speciation edges from the left child of $v$ with the best found solution for $j$ speciation edges for the right child of $v$ for all choices of $i$ and $j$ where $i+j+2$ sums up to $k$ (see Fig.~\ref{fig:combining}). We compute the score of the combined delimitations using either the single-lambda or multiple-lambda approach. Then we store the delimitation that yields to the highest score for $k$ speciation edges inside $v$. - -\begin{figure}[h!] -\centering -\includegraphics[scale=0.3]{images/speciation_events.pdf} -\caption{Combining the best found solutions for the subtrees} -\label{fig:combining} -\end{figure} - -\subsection{Handling of too small Edges} - -We allow the user to specify a minimum branch length $min\_br \geq 0$ such that all all edges with length \textbf{less or equal} $min\_br$ will be ignored in the loglikelihood score computation. Ignoring an edge means that we do not count it towards the number of edges and we do not add its length to the sum of edge weights. Depending on whether the edges $(v,x)$ and $(v,y)$ in Figure~\ref{fig:combining} are too small or not, we may have to replace $i+j+2$ by $i+j+1$ or $i+j$. - -\subsection{Final Result} -We obtain the final result by choosing the delimitation that led to the highest score for the root of the tree. - -\subsection{Pseudocode} -\begin{algorithm} -\SetKwInOut{Input}{Input} -\SetKwInOut{Output}{Output} - -\Input{A fully binary rooted tree $T$ with non-negative edge weights $w$, a minimum branch length $min\_br$} -\Output{A delimitation with maximal score} - -\underline{function delimit $(T, min\_br)$}\ - -initialization(root($T$)$, min\_br$)\; -combineSolutions(root($T$))\; - -delimitations = root($T$).delimitations\; - -bestScore = scores[0]\; -bestIndex = 0\; - -\For{$i = 1, \ldots, $ number of edges in $T$}{ - \If{delimitations[i].isValid}{ - \If{delimitations[i].score $>$ bestScore}{ - bestScore = delimitations[i].score\; - bestIndex = i\; - } - } -} - -\Return{delimitations[bestIndex]} - -\caption{The heuristic for the PTP species delimitation problem, Main Loop} - -\end{algorithm} - - -\begin{algorithm} -\SetKwInOut{Input}{Input} -\SetKwInOut{Output}{Output} - -\Input{A vertex $v$, a minimum branch length $min\_br$} - -\underline{function initialization $(v, min\_br)$}\ - -$v$.knownSpeciationEdges = $\emptyset$\; - -\If{$v$.hasParent()} { - $v$.knownSpeciationEdges.addAll(parent($v$).knownSpeciationEdges)\; - $v$.knownSpeciationEdges.add($(\text{parent}(v),v)$)\; - \If{$v$ == parent($v$).leftChild}{ - $v$.knownSpeciationEdges.add($(\text{parent}(v), \text{parent}(v).\text{rightChild})$)\; - } - \Else{ - $v$.knownSpeciationEdges.add($(\text{parent}(v), \text{parent}(v).\text{leftChild})$)\; - } -} - -\For{$i = 1, \ldots, |S(v)|$} { - $v$.delimitations[i].isValid = False\; - $v$.delimitations[i].score = $- \infty$\; -} - -$v$.coalescentValue = computeLoglikelihoodScore(edges of $S(v)$, $min\_br$)\; - -$v$.delimitations[0].score = $v$.coalescentValue + computeLoglikelihoodScore($v$.knownSpeciationEdges, $min\_br$)\; -$v$.delimitations[0].mostRecentCommonAncestors = $\{v\}$\; -$v$.delimitations[0].isValid = True\; - -\If{$v$.hasLeftChild()} { - initialization($v$.leftChild, $min\_br$)\; -} -\If{$v$.hasRightChild()} { - initialization($v$.leftRight, $min\_br$)\; -} -\Return{} - -\caption{The heuristic for the PTP species delimitation problem, Initialization} - -\end{algorithm} - -\begin{algorithm} -\SetKwInOut{Input}{Input} -\SetKwInOut{Output}{Output} - -\Input{A set of edges $E$ non-negative edge weights $w$, a minimum branch length $min\_br$} -\Output{The loglikelihood score of $E$ with edges $\leq min\_br$ ignored} - -\underline{function computeLoglikelihoodScore $(E, min\_br)$}\ - -sum = 0\; -num = 0\; -score = 0\; - -\For{$e \in E$}{ - \If{$w(e) > min\_br$}{ - num++\; - sum += $w(e)$\; - } -} - -\If {num $> 0$ \textbf{ and } sum $> 0$} { - score = num * (log(num) - 1 - log(sum))\; -} - -\Return{score} - -\caption{The heuristic for the PTP species delimitation problem, Score computation} - -\end{algorithm} - - - -\begin{algorithm} -\SetKwInOut{Input}{Input} -\SetKwInOut{Output}{Output} - -\Input{A vertex $v$, a minimum branch length $min\_br$} - -\underline{function combineSolutions $(v, min\_br)$}\ - -\If{$v$.hasLeftChild()} { - combineSolutions($v$.leftChild, $min\_br$)\; -} -\If{$v$.hasRightChild()} { - combineSolutions($v$.leftRight, $min\_br$)\; -} - -\If{$v$.hasLeftChild() \textbf{and} $v$.hasRightChild()} { - \For{$k = 0, \ldots, |S(v)|$} { - \For{$i = 0, \ldots, k - 2$} { - $j$ = $k-2-i$\; - \If{$v$.leftChild.delimitations[$i$].isValid \textbf{and} $v$.rightChild.delimitations[$j$].isValid}{ - currentMRCAList = $v$.leftChild.delimitations[i].mostRecentCommonAncestors $\cup$ $v$.rightChild.delimitations[j].mostRecentCommonAncestors\; - currentlyObservedTreeEdges = $v$.knownSpeciationEdges $\cup$ edges of $S(v)$\; - \If{multipleLambda} { - currentCoalescentScore = $\sum_{m \in \text{currentMRCAList}} {\text{computeLoglikelihoodScore(edges of $S(m)$, min\_br)}}$ - } - \Else { - currentCoalescentScore = computeLoglikelihoodScore($\bigcup_{m \in \text{currentMRCAList}} {\text{edges of } S(m)}, min\_br)$\; - } - currentSpeciationScore = computeLoglikelihoodScore(currentlyObservedTreeEdges $\backslash \bigcup_{m \in \text{currentMRCAList}} {\text{edges of } S(m)}, min\_br)$\; - currentScore = currentCoalescentScore + currentSpeciationScore\; - \If{currentScore $>$ $v$.delimitations[k].score} { - $v$.delimitations[k].mostRecentCommonAncestors = currentMRCAList\; - $v$.delimitations[k].score = currentScore\; - $v$.delimitations[k].valid = True\; - } - } - } - } -} - -\Return{} - -\caption{The heuristic for the PTP species delimitation problem, Heuristic steps} -\label{alg:steps} - -\end{algorithm} - -\section{Run-time Estimation} - -\begin{align*} -\sum_{k=0}^{|S(v)|} \sum_{i=0}^{k-2} \mathcal{O}(1) &= \sum_{k=0}^{|S(v)|}{(k-1) * \mathcal{O}(1)} \\ -&= \left( \left(\sum_{k=1}^{|S(v)|}{k}\right) - (|S(v)| + 1) \right) * \mathcal{O}(1) \\ -&= \left( \frac{|S(v)| * (|S(v)| + 1)}{2} - (|S(v)| + 1) \right) * \mathcal{O}(1) \\ -&= \mathcal{O}(|S(v)|^2) -\end{align*} - -Assuming a balanced binary tree: - -$$T(m) = 2*T \left( \frac{m}{2}\right) + m^2$$ - -Using the master theorem, it follows that Algorithm~\ref{alg:steps} is in $\mathcal{O}(|E(T)|^2)$. - -\bibliographystyle{splncs03} -\bibliography{delimit} -\end{document} diff --git a/doc/images/currently_observed_tree.graphml b/doc/images/currently_observed_tree.graphml deleted file mode 100644 index e77c44a..0000000 --- a/doc/images/currently_observed_tree.graphml +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - 4 - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - 7 - - - - - - - - - - - - - - - - - v - - - - - - - - - - - - - - - - - 9 - - - - - - - - - - - - - - - - - 10 - - - - - - - - - - - - - - - - - 11 - - - - - - - - - - - - - - - - - 12 - - - - - - - - - - - - - - - - - 13 - - - - - - - - - - - - - - - - - 14 - - - - - - - - - - - - - - - - - 15 - - - - - - - - - - - - - - - - - 16 - - - - - - - - - - - - - - - - - 17 - - - - - - - - - - - - - - - - - 18 - - - - - - - - - - - - - - - - - 19 - - - - - - - - - - - - - - - - - 20 - - - - - - - - - - - - - - - - - 21 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/images/currently_observed_tree.pdf b/doc/images/currently_observed_tree.pdf deleted file mode 100644 index c78cd4c..0000000 Binary files a/doc/images/currently_observed_tree.pdf and /dev/null differ diff --git a/doc/images/move_down.pdf b/doc/images/move_down.pdf deleted file mode 100644 index 164faaa..0000000 Binary files a/doc/images/move_down.pdf and /dev/null differ diff --git a/doc/images/move_up.pdf b/doc/images/move_up.pdf deleted file mode 100644 index ff1fc9a..0000000 Binary files a/doc/images/move_up.pdf and /dev/null differ diff --git a/doc/images/moves.pdf b/doc/images/moves.pdf deleted file mode 100644 index 6291e51..0000000 Binary files a/doc/images/moves.pdf and /dev/null differ diff --git a/doc/images/problem_with_kassian_score.pdf b/doc/images/problem_with_kassian_score.pdf deleted file mode 100644 index fe74bef..0000000 Binary files a/doc/images/problem_with_kassian_score.pdf and /dev/null differ diff --git a/doc/images/speciation_events.pdf b/doc/images/speciation_events.pdf deleted file mode 100644 index 8678be2..0000000 Binary files a/doc/images/speciation_events.pdf and /dev/null differ diff --git a/doc/images/support_tree.pdf b/doc/images/support_tree.pdf deleted file mode 100644 index 9863154..0000000 Binary files a/doc/images/support_tree.pdf and /dev/null differ diff --git a/doc/kassianscore.tex b/doc/kassianscore.tex deleted file mode 100644 index 8fc63ad..0000000 --- a/doc/kassianscore.tex +++ /dev/null @@ -1,116 +0,0 @@ -% This is LLNCS.DEM the demonstration file of -% the LaTeX macro package from Springer-Verlag -% for Lecture Notes in Computer Science, -% version 2.4 for LaTeX2e as of 16. April 2010 -% -\documentclass{llncs} -% -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{tikz} -\usepackage[linesnumbered,ruled]{algorithm2e} -\usepackage{graphicx} -\usepackage{subfig} - -\newcounter{instr} -\newcommand{\ninstr}{\refstepcounter{instr}\theinstr.} - -\begin{document} - -\title{Kassian score} - -\titlerunning{Kassian score} - -%\author{Tom\'{a}\v{s} Flouri\inst{1} \and Paschalia Kapli\inst{1} \and Sarah Lutteropp\inst{1}} -\authorrunning{Tom\'{a}\v{s} Flouri et al.} % abbreviated author list -\institute{Heidelberg Institute of Theoretical Studies} - -\maketitle - -\begin{abstract} -An explanation of the Kassian score. -\end{abstract} - -\section{Kassian Score} -In order to compare the maximum likelihood delimitation model with the known real species assignments, we defined the \emph{Kassian Score}. In order to use the Kassian score, we have to assume that the species are monophyletic and can therefore be described by a set of most recent common ancestor (MRCA) nodes. Given two sets of MRCAs and a phylogenetic tree, the Kassian Score counts the minimum number of movements in the tree needed to transform the one set of MRCAs into the other. We considered two possible moves. The first move is that a MRCA node can be pushed one layer downwards, turning its children nodes into MRCAs instead. The second move is that a MRCA node can be pulled one layer downwards, turning its parent node into a MRCA instead. Figure~\ref{fig:movements} shows both possible moves. - -\begin{figure}[H!] -\centering -\subfloat[Before moving the node $b$ upwards in the tree, the nodes $b$ and $c$ are MRCAs. After the upward move, $a$ is the only MRCA in the subtree.]{\includegraphics[scale=0.35]{images/move_up.pdf}} - -\subfloat[Before pushing the node $b$ down in the tree, the nodes $b$ and $c$ are MRCAs. After the downward move, $d$, $e$ and $c$ are the MRCAs in the subtree.]{\includegraphics[scale=0.35]{images/move_down.pdf}} - -\caption{The possible moves in the Kassian Score. In each movement step, a MRCA node can either be moved one layer up or one layer down in the tree.} -\label{fig:movements} -\end{figure} - -\paragraph{Computation} -In order to compute the Kassian Score, we used the following trick. In a first step, we marked all MRCA nodes from either the first set or the second set of MRCAs in the tree. Starting from each marked node, we followed the path from it to the root of the tree, counting the number of edges taken. If we encountered another marked node on our way, the number of edges already taken was added as a penalty to the Kassian Score. Algorithm~\ref{algo:kassianscore} shows the pseudocode of this approach. - -\begin{algorithm} -\SetKwInOut{Input}{Input} -\SetKwInOut{Output}{Output} - -\Input{A phylogenetic tree $T$ with edges $E$ and nodes $V$, a node $v$} -\Output{The number of edges taken until a MRCA node other than $v$ was visited on the path from $v$ to the root of $T$} - -\underline{function findPenalty $(T, v)$}\\ -penalty $\gets$ $0$\; - -steps $\gets$ $0$\; -currentNode $\gets$ $v$\; -\While{currentNode $\neq$ root($T$)}{ - currentNode $\gets$ currentNode.parent\; - steps $\gets$ steps + $1$\; - \If{marked(currentNode)}{ - penalty $\gets$ steps\; - \textbf{break}\; - } -} -\Return{penalty}\; - -\Input{A phylogenetic tree $T$ with edges $E$ and nodes $V$, a set of MRCA nodes $S_1$, a set of MRCA nodes $S_2$} -\Output{The minimum number of moves needed to transform the given sets of MRCA nodes into each other} - -\underline{function computeKassianScore $(T, S_1, S_2)$}\\ - -kassianScore $\gets$ $0$\; - -\For{$v \in V$}{ - marked($v$) $\gets$ \textbf{false}\; - \If{$v \in S_1$ \textbf{ or } $v \in S_2$}{ - marked($v$) $\gets$ \textbf{true}\; - } - \Else{ - marked($v$) $\gets$ \textbf{false}\; - } -} - -\For{$v \in V$}{ - \If{marked($v$)}{ - kassianScore $\gets$ kassianScore + \textit{findPenalty}($v$)\; - } -} - -\Return{kassianScore} - -\caption{Computation of the Kassian Score} -\label{algo:kassianscore} -\end{algorithm} - -\section{Problem: The Computation is wrong!} -The pseudocode given in Algorithm~\ref{algo:kassianscore} returns a penalty that is too high. Consider the example in Figure~\ref{fig:problem}. - -\begin{figure}[H!] -\centering -\includegraphics[scale=0.5]{images/problem_with_kassian_score.pdf} -\caption{Assume that we want to transform the MRCA set $S_1 = \{x\}$ into the MRCA set $S_2 = \{y,z\}$. We can do this by moving $x$ downwards, thus having to do only a single movement. The computation from Algorithm~\ref{algo:kassianscore} would return a Kassian Score of $2$ moves, however.} -\label{fig:problem} -\end{figure} - -\paragraph{How to fix this:} -It suffices to consider only downward moves. When we encounter the first other MRCA node on our path from a MRCA node to the root, we need to update our markings (i.e., really do the downward moves!). - -\bibliographystyle{splncs03} -\bibliography{delimit} -\end{document} diff --git a/doc/llncs.cls b/doc/llncs.cls deleted file mode 100644 index 6e1806d..0000000 --- a/doc/llncs.cls +++ /dev/null @@ -1,1208 +0,0 @@ -% LLNCS DOCUMENT CLASS -- version 2.18 (27-Sep-2013) -% Springer Verlag LaTeX2e support for Lecture Notes in Computer Science -% -%% -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -%% -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{llncs}[2013/09/27 v2.18 -^^J LaTeX document class for Lecture Notes in Computer Science] -% Options -\let\if@envcntreset\iffalse -\DeclareOption{envcountreset}{\let\if@envcntreset\iftrue} -\DeclareOption{citeauthoryear}{\let\citeauthoryear=Y} -\DeclareOption{oribibl}{\let\oribibl=Y} -\let\if@custvec\iftrue -\DeclareOption{orivec}{\let\if@custvec\iffalse} -\let\if@envcntsame\iffalse -\DeclareOption{envcountsame}{\let\if@envcntsame\iftrue} -\let\if@envcntsect\iffalse -\DeclareOption{envcountsect}{\let\if@envcntsect\iftrue} -\let\if@runhead\iffalse -\DeclareOption{runningheads}{\let\if@runhead\iftrue} - -\let\if@openright\iftrue -\let\if@openbib\iffalse -\DeclareOption{openbib}{\let\if@openbib\iftrue} - -% languages -\let\switcht@@therlang\relax -\def\ds@deutsch{\def\switcht@@therlang{\switcht@deutsch}} -\def\ds@francais{\def\switcht@@therlang{\switcht@francais}} - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} - -\ProcessOptions - -\LoadClass[twoside]{article} -\RequirePackage{multicol} % needed for the list of participants, index -\RequirePackage{aliascnt} - -\setlength{\textwidth}{12.2cm} -\setlength{\textheight}{19.3cm} -\renewcommand\@pnumwidth{2em} -\renewcommand\@tocrmarg{3.5em} -% -\def\@dottedtocline#1#2#3#4#5{% - \ifnum #1>\c@tocdepth \else - \vskip \z@ \@plus.2\p@ - {\leftskip #2\relax \rightskip \@tocrmarg \advance\rightskip by 0pt plus 2cm - \parfillskip -\rightskip \pretolerance=10000 - \parindent #2\relax\@afterindenttrue - \interlinepenalty\@M - \leavevmode - \@tempdima #3\relax - \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip - {#4}\nobreak - \leaders\hbox{$\m@th - \mkern \@dotsep mu\hbox{.}\mkern \@dotsep - mu$}\hfill - \nobreak - \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% - \par}% - \fi} -% -\def\switcht@albion{% -\def\abstractname{Abstract.} -\def\ackname{Acknowledgement.} -\def\andname{and} -\def\lastandname{\unskip, and} -\def\appendixname{Appendix} -\def\chaptername{Chapter} -\def\claimname{Claim} -\def\conjecturename{Conjecture} -\def\contentsname{Table of Contents} -\def\corollaryname{Corollary} -\def\definitionname{Definition} -\def\examplename{Example} -\def\exercisename{Exercise} -\def\figurename{Fig.} -\def\keywordname{{\bf Keywords:}} -\def\indexname{Index} -\def\lemmaname{Lemma} -\def\contriblistname{List of Contributors} -\def\listfigurename{List of Figures} -\def\listtablename{List of Tables} -\def\mailname{{\it Correspondence to\/}:} -\def\noteaddname{Note added in proof} -\def\notename{Note} -\def\partname{Part} -\def\problemname{Problem} -\def\proofname{Proof} -\def\propertyname{Property} -\def\propositionname{Proposition} -\def\questionname{Question} -\def\remarkname{Remark} -\def\seename{see} -\def\solutionname{Solution} -\def\subclassname{{\it Subject Classifications\/}:} -\def\tablename{Table} -\def\theoremname{Theorem}} -\switcht@albion -% Names of theorem like environments are already defined -% but must be translated if another language is chosen -% -% French section -\def\switcht@francais{%\typeout{On parle francais.}% - \def\abstractname{R\'esum\'e.}% - \def\ackname{Remerciements.}% - \def\andname{et}% - \def\lastandname{ et}% - \def\appendixname{Appendice} - \def\chaptername{Chapitre}% - \def\claimname{Pr\'etention}% - \def\conjecturename{Hypoth\`ese}% - \def\contentsname{Table des mati\`eres}% - \def\corollaryname{Corollaire}% - \def\definitionname{D\'efinition}% - \def\examplename{Exemple}% - \def\exercisename{Exercice}% - \def\figurename{Fig.}% - \def\keywordname{{\bf Mots-cl\'e:}} - \def\indexname{Index} - \def\lemmaname{Lemme}% - \def\contriblistname{Liste des contributeurs} - \def\listfigurename{Liste des figures}% - \def\listtablename{Liste des tables}% - \def\mailname{{\it Correspondence to\/}:} - \def\noteaddname{Note ajout\'ee \`a l'\'epreuve}% - \def\notename{Remarque}% - \def\partname{Partie}% - \def\problemname{Probl\`eme}% - \def\proofname{Preuve}% - \def\propertyname{Caract\'eristique}% -%\def\propositionname{Proposition}% - \def\questionname{Question}% - \def\remarkname{Remarque}% - \def\seename{voir} - \def\solutionname{Solution}% - \def\subclassname{{\it Subject Classifications\/}:} - \def\tablename{Tableau}% - \def\theoremname{Th\'eor\`eme}% -} -% -% German section -\def\switcht@deutsch{%\typeout{Man spricht deutsch.}% - \def\abstractname{Zusammenfassung.}% - \def\ackname{Danksagung.}% - \def\andname{und}% - \def\lastandname{ und}% - \def\appendixname{Anhang}% - \def\chaptername{Kapitel}% - \def\claimname{Behauptung}% - \def\conjecturename{Hypothese}% - \def\contentsname{Inhaltsverzeichnis}% - \def\corollaryname{Korollar}% -%\def\definitionname{Definition}% - \def\examplename{Beispiel}% - \def\exercisename{\"Ubung}% - \def\figurename{Abb.}% - \def\keywordname{{\bf Schl\"usselw\"orter:}} - \def\indexname{Index} -%\def\lemmaname{Lemma}% - \def\contriblistname{Mitarbeiter} - \def\listfigurename{Abbildungsverzeichnis}% - \def\listtablename{Tabellenverzeichnis}% - \def\mailname{{\it Correspondence to\/}:} - \def\noteaddname{Nachtrag}% - \def\notename{Anmerkung}% - \def\partname{Teil}% -%\def\problemname{Problem}% - \def\proofname{Beweis}% - \def\propertyname{Eigenschaft}% -%\def\propositionname{Proposition}% - \def\questionname{Frage}% - \def\remarkname{Anmerkung}% - \def\seename{siehe} - \def\solutionname{L\"osung}% - \def\subclassname{{\it Subject Classifications\/}:} - \def\tablename{Tabelle}% -%\def\theoremname{Theorem}% -} - -% Ragged bottom for the actual page -\def\thisbottomragged{\def\@textbottom{\vskip\z@ plus.0001fil -\global\let\@textbottom\relax}} - -\renewcommand\small{% - \@setfontsize\small\@ixpt{11}% - \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ - \abovedisplayshortskip \z@ \@plus2\p@ - \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ - \def\@listi{\leftmargin\leftmargini - \parsep 0\p@ \@plus1\p@ \@minus\p@ - \topsep 8\p@ \@plus2\p@ \@minus4\p@ - \itemsep0\p@}% - \belowdisplayskip \abovedisplayskip -} - -\frenchspacing -\widowpenalty=10000 -\clubpenalty=10000 - -\setlength\oddsidemargin {63\p@} -\setlength\evensidemargin {63\p@} -\setlength\marginparwidth {90\p@} - -\setlength\headsep {16\p@} - -\setlength\footnotesep{7.7\p@} -\setlength\textfloatsep{8mm\@plus 2\p@ \@minus 4\p@} -\setlength\intextsep {8mm\@plus 2\p@ \@minus 2\p@} - -\setcounter{secnumdepth}{2} - -\newcounter {chapter} -\renewcommand\thechapter {\@arabic\c@chapter} - -\newif\if@mainmatter \@mainmattertrue -\newcommand\frontmatter{\cleardoublepage - \@mainmatterfalse\pagenumbering{Roman}} -\newcommand\mainmatter{\cleardoublepage - \@mainmattertrue\pagenumbering{arabic}} -\newcommand\backmatter{\if@openright\cleardoublepage\else\clearpage\fi - \@mainmatterfalse} - -\renewcommand\part{\cleardoublepage - \thispagestyle{empty}% - \if@twocolumn - \onecolumn - \@tempswatrue - \else - \@tempswafalse - \fi - \null\vfil - \secdef\@part\@spart} - -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >-2\relax - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% - \else - \addcontentsline{toc}{part}{#1}% - \fi - \markboth{}{}% - {\centering - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >-2\relax - \huge\bfseries \partname~\thepart - \par - \vskip 20\p@ - \fi - \Huge \bfseries #2\par}% - \@endpart} -\def\@spart#1{% - {\centering - \interlinepenalty \@M - \normalfont - \Huge \bfseries #1\par}% - \@endpart} -\def\@endpart{\vfil\newpage - \if@twoside - \null - \thispagestyle{empty}% - \newpage - \fi - \if@tempswa - \twocolumn - \fi} - -\newcommand\chapter{\clearpage - \thispagestyle{empty}% - \global\@topnum\z@ - \@afterindentfalse - \secdef\@chapter\@schapter} -\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}#1}% - \else - \addcontentsline{toc}{chapter}{#1}% - \fi - \else - \addcontentsline{toc}{chapter}{#1}% - \fi - \chaptermark{#1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{#2}]% - \else - \@makechapterhead{#2}% - \@afterheading - \fi} -\def\@makechapterhead#1{% -% \vspace*{50\p@}% - {\centering - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \large\bfseries \@chapapp{} \thechapter - \par\nobreak - \vskip 20\p@ - \fi - \fi - \interlinepenalty\@M - \Large \bfseries #1\par\nobreak - \vskip 40\p@ - }} -\def\@schapter#1{\if@twocolumn - \@topnewpage[\@makeschapterhead{#1}]% - \else - \@makeschapterhead{#1}% - \@afterheading - \fi} -\def\@makeschapterhead#1{% -% \vspace*{50\p@}% - {\centering - \normalfont - \interlinepenalty\@M - \Large \bfseries #1\par\nobreak - \vskip 40\p@ - }} - -\renewcommand\section{\@startsection{section}{1}{\z@}% - {-18\p@ \@plus -4\p@ \@minus -4\p@}% - {12\p@ \@plus 4\p@ \@minus 4\p@}% - {\normalfont\large\bfseries\boldmath - \rightskip=\z@ \@plus 8em\pretolerance=10000 }} -\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-18\p@ \@plus -4\p@ \@minus -4\p@}% - {8\p@ \@plus 4\p@ \@minus 4\p@}% - {\normalfont\normalsize\bfseries\boldmath - \rightskip=\z@ \@plus 8em\pretolerance=10000 }} -\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-18\p@ \@plus -4\p@ \@minus -4\p@}% - {-0.5em \@plus -0.22em \@minus -0.1em}% - {\normalfont\normalsize\bfseries\boldmath}} -\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% - {-12\p@ \@plus -4\p@ \@minus -4\p@}% - {-0.5em \@plus -0.22em \@minus -0.1em}% - {\normalfont\normalsize\itshape}} -\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use - \string\subparagraph\space with this class}\vskip0.5cm -You should not use \verb|\subparagraph| with this class.\vskip0.5cm} - -\DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00} -\DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01} -\DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02} -\DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03} -\DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04} -\DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05} -\DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06} -\DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07} -\DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08} -\DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09} -\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A} - -\let\footnotesize\small - -\if@custvec -\def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle#1$}} -{\mbox{\boldmath$\textstyle#1$}} -{\mbox{\boldmath$\scriptstyle#1$}} -{\mbox{\boldmath$\scriptscriptstyle#1$}}} -\fi - -\def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}} -\def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil -\penalty50\hskip1em\null\nobreak\hfil\squareforqed -\parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi} - -\def\getsto{\mathrel{\mathchoice {\vcenter{\offinterlineskip -\halign{\hfil -$\displaystyle##$\hfil\cr\gets\cr\to\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr\gets -\cr\to\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr\gets -\cr\to\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr -\gets\cr\to\cr}}}}} -\def\lid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil -$\displaystyle##$\hfil\cr<\cr\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr<\cr -\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr<\cr -\noalign{\vskip1pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr -<\cr -\noalign{\vskip0.9pt}=\cr}}}}} -\def\gid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil -$\displaystyle##$\hfil\cr>\cr\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr>\cr -\noalign{\vskip1.2pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr>\cr -\noalign{\vskip1pt}=\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr ->\cr -\noalign{\vskip0.9pt}=\cr}}}}} -\def\grole{\mathrel{\mathchoice {\vcenter{\offinterlineskip -\halign{\hfil -$\displaystyle##$\hfil\cr>\cr\noalign{\vskip-1pt}<\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr ->\cr\noalign{\vskip-1pt}<\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr ->\cr\noalign{\vskip-0.8pt}<\cr}}} -{\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr ->\cr\noalign{\vskip-0.3pt}<\cr}}}}} -\def\bbbr{{\rm I\!R}} %reelle Zahlen -\def\bbbm{{\rm I\!M}} -\def\bbbn{{\rm I\!N}} %natuerliche Zahlen -\def\bbbf{{\rm I\!F}} -\def\bbbh{{\rm I\!H}} -\def\bbbk{{\rm I\!K}} -\def\bbbp{{\rm I\!P}} -\def\bbbone{{\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} -{\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}} -\def\bbbc{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm C$}\hbox{\hbox -to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}}} -\def\bbbq{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm -Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle\rm Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle\rm Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm Q$}\hbox{\raise -0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}}} -\def\bbbt{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm -T$}\hbox{\hbox to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle\rm T$}\hbox{\hbox -to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle\rm T$}\hbox{\hbox -to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm T$}\hbox{\hbox -to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}}} -\def\bbbs{{\mathchoice -{\setbox0=\hbox{$\displaystyle \rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox -to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}} -{\setbox0=\hbox{$\textstyle \rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox -to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptstyle \rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox -to0pt{\kern0.5\wd0\vrule height0.45\ht0\hss}\box0}} -{\setbox0=\hbox{$\scriptscriptstyle\rm S$}\hbox{\raise0.5\ht0\hbox -to0pt{\kern0.4\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox -to0pt{\kern0.55\wd0\vrule height0.45\ht0\hss}\box0}}}} -\def\bbbz{{\mathchoice {\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}} -{\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}} -{\hbox{$\mathsf\scriptstyle Z\kern-0.3em Z$}} -{\hbox{$\mathsf\scriptscriptstyle Z\kern-0.2em Z$}}}} - -\let\ts\, - -\setlength\leftmargini {17\p@} -\setlength\leftmargin {\leftmargini} -\setlength\leftmarginii {\leftmargini} -\setlength\leftmarginiii {\leftmargini} -\setlength\leftmarginiv {\leftmargini} -\setlength \labelsep {.5em} -\setlength \labelwidth{\leftmargini} -\addtolength\labelwidth{-\labelsep} - -\def\@listI{\leftmargin\leftmargini - \parsep 0\p@ \@plus1\p@ \@minus\p@ - \topsep 8\p@ \@plus2\p@ \@minus4\p@ - \itemsep0\p@} -\let\@listi\@listI -\@listi -\def\@listii {\leftmargin\leftmarginii - \labelwidth\leftmarginii - \advance\labelwidth-\labelsep - \topsep 0\p@ \@plus2\p@ \@minus\p@} -\def\@listiii{\leftmargin\leftmarginiii - \labelwidth\leftmarginiii - \advance\labelwidth-\labelsep - \topsep 0\p@ \@plus\p@\@minus\p@ - \parsep \z@ - \partopsep \p@ \@plus\z@ \@minus\p@} - -\renewcommand\labelitemi{\normalfont\bfseries --} -\renewcommand\labelitemii{$\m@th\bullet$} - -\setlength\arraycolsep{1.4\p@} -\setlength\tabcolsep{1.4\p@} - -\def\tableofcontents{\chapter*{\contentsname\@mkboth{{\contentsname}}% - {{\contentsname}}} - \def\authcount##1{\setcounter{auco}{##1}\setcounter{@auth}{1}} - \def\lastand{\ifnum\value{auco}=2\relax - \unskip{} \andname\ - \else - \unskip \lastandname\ - \fi}% - \def\and{\stepcounter{@auth}\relax - \ifnum\value{@auth}=\value{auco}% - \lastand - \else - \unskip, - \fi}% - \@starttoc{toc}\if@restonecol\twocolumn\fi} - -\def\l@part#1#2{\addpenalty{\@secpenalty}% - \addvspace{2em plus\p@}% % space above part line - \begingroup - \parindent \z@ - \rightskip \z@ plus 5em - \hrule\vskip5pt - \large % same size as for a contribution heading - \bfseries\boldmath % set line in boldface - \leavevmode % TeX command to enter horizontal mode. - #1\par - \vskip5pt - \hrule - \vskip1pt - \nobreak % Never break after part entry - \endgroup} - -\def\@dotsep{2} - -\let\phantomsection=\relax - -\def\hyperhrefextend{\ifx\hyper@anchor\@undefined\else -{}\fi} - -\def\addnumcontentsmark#1#2#3{% -\addtocontents{#1}{\protect\contentsline{#2}{\protect\numberline - {\thechapter}#3}{\thepage}\hyperhrefextend}}% -\def\addcontentsmark#1#2#3{% -\addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}\hyperhrefextend}}% -\def\addcontentsmarkwop#1#2#3{% -\addtocontents{#1}{\protect\contentsline{#2}{#3}{0}\hyperhrefextend}}% - -\def\@adcmk[#1]{\ifcase #1 \or -\def\@gtempa{\addnumcontentsmark}% - \or \def\@gtempa{\addcontentsmark}% - \or \def\@gtempa{\addcontentsmarkwop}% - \fi\@gtempa{toc}{chapter}% -} -\def\addtocmark{% -\phantomsection -\@ifnextchar[{\@adcmk}{\@adcmk[3]}% -} - -\def\l@chapter#1#2{\addpenalty{-\@highpenalty} - \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup - \parindent \z@ \rightskip \@tocrmarg - \advance\rightskip by 0pt plus 2cm - \parfillskip -\rightskip \pretolerance=10000 - \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip - {\large\bfseries\boldmath#1}\ifx0#2\hfil\null - \else - \nobreak - \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern - \@dotsep mu$}\hfill - \nobreak\hbox to\@pnumwidth{\hss #2}% - \fi\par - \penalty\@highpenalty \endgroup} - -\def\l@title#1#2{\addpenalty{-\@highpenalty} - \addvspace{8pt plus 1pt} - \@tempdima \z@ - \begingroup - \parindent \z@ \rightskip \@tocrmarg - \advance\rightskip by 0pt plus 2cm - \parfillskip -\rightskip \pretolerance=10000 - \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip - #1\nobreak - \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern - \@dotsep mu$}\hfill - \nobreak\hbox to\@pnumwidth{\hss #2}\par - \penalty\@highpenalty \endgroup} - -\def\l@author#1#2{\addpenalty{\@highpenalty} - \@tempdima=15\p@ %\z@ - \begingroup - \parindent \z@ \rightskip \@tocrmarg - \advance\rightskip by 0pt plus 2cm - \pretolerance=10000 - \leavevmode \advance\leftskip\@tempdima %\hskip -\leftskip - \textit{#1}\par - \penalty\@highpenalty \endgroup} - -\setcounter{tocdepth}{0} -\newdimen\tocchpnum -\newdimen\tocsecnum -\newdimen\tocsectotal -\newdimen\tocsubsecnum -\newdimen\tocsubsectotal -\newdimen\tocsubsubsecnum -\newdimen\tocsubsubsectotal -\newdimen\tocparanum -\newdimen\tocparatotal -\newdimen\tocsubparanum -\tocchpnum=\z@ % no chapter numbers -\tocsecnum=15\p@ % section 88. plus 2.222pt -\tocsubsecnum=23\p@ % subsection 88.8 plus 2.222pt -\tocsubsubsecnum=27\p@ % subsubsection 88.8.8 plus 1.444pt -\tocparanum=35\p@ % paragraph 88.8.8.8 plus 1.666pt -\tocsubparanum=43\p@ % subparagraph 88.8.8.8.8 plus 1.888pt -\def\calctocindent{% -\tocsectotal=\tocchpnum -\advance\tocsectotal by\tocsecnum -\tocsubsectotal=\tocsectotal -\advance\tocsubsectotal by\tocsubsecnum -\tocsubsubsectotal=\tocsubsectotal -\advance\tocsubsubsectotal by\tocsubsubsecnum -\tocparatotal=\tocsubsubsectotal -\advance\tocparatotal by\tocparanum} -\calctocindent - -\def\l@section{\@dottedtocline{1}{\tocchpnum}{\tocsecnum}} -\def\l@subsection{\@dottedtocline{2}{\tocsectotal}{\tocsubsecnum}} -\def\l@subsubsection{\@dottedtocline{3}{\tocsubsectotal}{\tocsubsubsecnum}} -\def\l@paragraph{\@dottedtocline{4}{\tocsubsubsectotal}{\tocparanum}} -\def\l@subparagraph{\@dottedtocline{5}{\tocparatotal}{\tocsubparanum}} - -\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn - \fi\section*{\listfigurename\@mkboth{{\listfigurename}}{{\listfigurename}}} - \@starttoc{lof}\if@restonecol\twocolumn\fi} -\def\l@figure{\@dottedtocline{1}{0em}{1.5em}} - -\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn - \fi\section*{\listtablename\@mkboth{{\listtablename}}{{\listtablename}}} - \@starttoc{lot}\if@restonecol\twocolumn\fi} -\let\l@table\l@figure - -\renewcommand\listoffigures{% - \section*{\listfigurename - \@mkboth{\listfigurename}{\listfigurename}}% - \@starttoc{lof}% - } - -\renewcommand\listoftables{% - \section*{\listtablename - \@mkboth{\listtablename}{\listtablename}}% - \@starttoc{lot}% - } - -\ifx\oribibl\undefined -\ifx\citeauthoryear\undefined -\renewenvironment{thebibliography}[1] - {\section*{\refname} - \def\@biblabel##1{##1.} - \small - \list{\@biblabel{\@arabic\c@enumiv}}% - {\settowidth\labelwidth{\@biblabel{#1}}% - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \if@openbib - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \fi - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{\@arabic\c@enumiv}}% - \if@openbib - \renewcommand\newblock{\par}% - \else - \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}% - \fi - \sloppy\clubpenalty4000\widowpenalty4000% - \sfcode`\.=\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} -\def\@lbibitem[#1]#2{\item[{[#1]}\hfill]\if@filesw - {\let\protect\noexpand\immediate - \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} -\newcount\@tempcntc -\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi - \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do - {\@ifundefined - {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bfseries - ?}\@warning - {Citation `\@citeb' on page \thepage \space undefined}}% - {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}% - \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne - \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}% - \else - \advance\@tempcntb\@ne - \ifnum\@tempcntb=\@tempcntc - \else\advance\@tempcntb\m@ne\@citeo - \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}} -\def\@citeo{\ifnum\@tempcnta>\@tempcntb\else - \@citea\def\@citea{,\,\hskip\z@skip}% - \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else - {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else - \def\@citea{--}\fi - \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi} -\else -\renewenvironment{thebibliography}[1] - {\section*{\refname} - \small - \list{}% - {\settowidth\labelwidth{}% - \leftmargin\parindent - \itemindent=-\parindent - \labelsep=\z@ - \if@openbib - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - \fi - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{}}% - \if@openbib - \renewcommand\newblock{\par}% - \else - \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}% - \fi - \sloppy\clubpenalty4000\widowpenalty4000% - \sfcode`\.=\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} - \def\@cite#1{#1}% - \def\@lbibitem[#1]#2{\item[]\if@filesw - {\def\protect##1{\string ##1\space}\immediate - \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} - \fi -\else -\@cons\@openbib@code{\noexpand\small} -\fi - -\def\idxquad{\hskip 10\p@}% space that divides entry from number - -\def\@idxitem{\par\hangindent 10\p@} - -\def\subitem{\par\setbox0=\hbox{--\enspace}% second order - \noindent\hangindent\wd0\box0}% index entry - -\def\subsubitem{\par\setbox0=\hbox{--\,--\enspace}% third - \noindent\hangindent\wd0\box0}% order index entry - -\def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax} - -\renewenvironment{theindex} - {\@mkboth{\indexname}{\indexname}% - \thispagestyle{empty}\parindent\z@ - \parskip\z@ \@plus .3\p@\relax - \let\item\par - \def\,{\relax\ifmmode\mskip\thinmuskip - \else\hskip0.2em\ignorespaces\fi}% - \normalfont\small - \begin{multicols}{2}[\@makeschapterhead{\indexname}]% - } - {\end{multicols}} - -\renewcommand\footnoterule{% - \kern-3\p@ - \hrule\@width 2truecm - \kern2.6\p@} - \newdimen\fnindent - \fnindent1em -\long\def\@makefntext#1{% - \parindent \fnindent% - \leftskip \fnindent% - \noindent - \llap{\hb@xt@1em{\hss\@makefnmark\ }}\ignorespaces#1} - -\long\def\@makecaption#1#2{% - \small - \vskip\abovecaptionskip - \sbox\@tempboxa{{\bfseries #1.} #2}% - \ifdim \wd\@tempboxa >\hsize - {\bfseries #1.} #2\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% - \fi - \vskip\belowcaptionskip} - -\def\fps@figure{htbp} -\def\fnum@figure{\figurename\thinspace\thefigure} -\def \@floatboxreset {% - \reset@font - \small - \@setnobreak - \@setminipage -} -\def\fps@table{htbp} -\def\fnum@table{\tablename~\thetable} -\renewenvironment{table} - {\setlength\abovecaptionskip{0\p@}% - \setlength\belowcaptionskip{10\p@}% - \@float{table}} - {\end@float} -\renewenvironment{table*} - {\setlength\abovecaptionskip{0\p@}% - \setlength\belowcaptionskip{10\p@}% - \@dblfloat{table}} - {\end@dblfloat} - -\long\def\@caption#1[#2]#3{\par\addcontentsline{\csname - ext@#1\endcsname}{#1}{\protect\numberline{\csname - the#1\endcsname}{\ignorespaces #2}}\begingroup - \@parboxrestore - \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par - \endgroup} - -% LaTeX does not provide a command to enter the authors institute -% addresses. The \institute command is defined here. - -\newcounter{@inst} -\newcounter{@auth} -\newcounter{auco} -\newdimen\instindent -\newbox\authrun -\newtoks\authorrunning -\newtoks\tocauthor -\newbox\titrun -\newtoks\titlerunning -\newtoks\toctitle - -\def\clearheadinfo{\gdef\@author{No Author Given}% - \gdef\@title{No Title Given}% - \gdef\@subtitle{}% - \gdef\@institute{No Institute Given}% - \gdef\@thanks{}% - \global\titlerunning={}\global\authorrunning={}% - \global\toctitle={}\global\tocauthor={}} - -\def\institute#1{\gdef\@institute{#1}} - -\def\institutename{\par - \begingroup - \parskip=\z@ - \parindent=\z@ - \setcounter{@inst}{1}% - \def\and{\par\stepcounter{@inst}% - \noindent$^{\the@inst}$\enspace\ignorespaces}% - \setbox0=\vbox{\def\thanks##1{}\@institute}% - \ifnum\c@@inst=1\relax - \gdef\fnnstart{0}% - \else - \xdef\fnnstart{\c@@inst}% - \setcounter{@inst}{1}% - \noindent$^{\the@inst}$\enspace - \fi - \ignorespaces - \@institute\par - \endgroup} - -\def\@fnsymbol#1{\ensuremath{\ifcase#1\or\star\or{\star\star}\or - {\star\star\star}\or \dagger\or \ddagger\or - \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger - \or \ddagger\ddagger \else\@ctrerr\fi}} - -\def\inst#1{\unskip$^{#1}$} -\def\fnmsep{\unskip$^,$} -\def\email#1{{\tt#1}} -\AtBeginDocument{\@ifundefined{url}{\def\url#1{#1}}{}% -\@ifpackageloaded{babel}{% -\@ifundefined{extrasenglish}{}{\addto\extrasenglish{\switcht@albion}}% -\@ifundefined{extrasfrenchb}{}{\addto\extrasfrenchb{\switcht@francais}}% -\@ifundefined{extrasgerman}{}{\addto\extrasgerman{\switcht@deutsch}}% -\@ifundefined{extrasngerman}{}{\addto\extrasngerman{\switcht@deutsch}}% -}{\switcht@@therlang}% -\providecommand{\keywords}[1]{\par\addvspace\baselineskip -\noindent\keywordname\enspace\ignorespaces#1}% -} -\def\homedir{\~{ }} - -\def\subtitle#1{\gdef\@subtitle{#1}} -\clearheadinfo -% -%%% to avoid hyperref warnings -\providecommand*{\toclevel@author}{999} -%%% to make title-entry parent of section-entries -\providecommand*{\toclevel@title}{0} -% -\renewcommand\maketitle{\newpage -\phantomsection - \refstepcounter{chapter}% - \stepcounter{section}% - \setcounter{section}{0}% - \setcounter{subsection}{0}% - \setcounter{figure}{0} - \setcounter{table}{0} - \setcounter{equation}{0} - \setcounter{footnote}{0}% - \begingroup - \parindent=\z@ - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle - \else - \twocolumn[\@maketitle]% - \fi - \else - \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{empty}\@thanks -% - \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}% - \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}% - \instindent=\hsize - \advance\instindent by-\headlineindent - \if!\the\toctitle!\addcontentsline{toc}{title}{\@title}\else - \addcontentsline{toc}{title}{\the\toctitle}\fi - \if@runhead - \if!\the\titlerunning!\else - \edef\@title{\the\titlerunning}% - \fi - \global\setbox\titrun=\hbox{\small\rm\unboldmath\ignorespaces\@title}% - \ifdim\wd\titrun>\instindent - \typeout{Title too long for running head. Please supply}% - \typeout{a shorter form with \string\titlerunning\space prior to - \string\maketitle}% - \global\setbox\titrun=\hbox{\small\rm - Title Suppressed Due to Excessive Length}% - \fi - \xdef\@title{\copy\titrun}% - \fi -% - \if!\the\tocauthor!\relax - {\def\and{\noexpand\protect\noexpand\and}% - \protected@xdef\toc@uthor{\@author}}% - \else - \def\\{\noexpand\protect\noexpand\newline}% - \protected@xdef\scratch{\the\tocauthor}% - \protected@xdef\toc@uthor{\scratch}% - \fi - \addtocontents{toc}{\noexpand\protect\noexpand\authcount{\the\c@auco}}% - \addcontentsline{toc}{author}{\toc@uthor}% - \if@runhead - \if!\the\authorrunning! - \value{@inst}=\value{@auth}% - \setcounter{@auth}{1}% - \else - \edef\@author{\the\authorrunning}% - \fi - \global\setbox\authrun=\hbox{\small\unboldmath\@author\unskip}% - \ifdim\wd\authrun>\instindent - \typeout{Names of authors too long for running head. Please supply}% - \typeout{a shorter form with \string\authorrunning\space prior to - \string\maketitle}% - \global\setbox\authrun=\hbox{\small\rm - Authors Suppressed Due to Excessive Length}% - \fi - \xdef\@author{\copy\authrun}% - \markboth{\@author}{\@title}% - \fi - \endgroup - \setcounter{footnote}{\fnnstart}% - \clearheadinfo} -% -\def\@maketitle{\newpage - \markboth{}{}% - \def\lastand{\ifnum\value{@inst}=2\relax - \unskip{} \andname\ - \else - \unskip \lastandname\ - \fi}% - \def\and{\stepcounter{@auth}\relax - \ifnum\value{@auth}=\value{@inst}% - \lastand - \else - \unskip, - \fi}% - \begin{center}% - \let\newline\\ - {\Large \bfseries\boldmath - \pretolerance=10000 - \@title \par}\vskip .8cm -\if!\@subtitle!\else {\large \bfseries\boldmath - \vskip -.65cm - \pretolerance=10000 - \@subtitle \par}\vskip .8cm\fi - \setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}% - \def\thanks##1{}\@author}% - \global\value{@inst}=\value{@auth}% - \global\value{auco}=\value{@auth}% - \setcounter{@auth}{1}% -{\lineskip .5em -\noindent\ignorespaces -\@author\vskip.35cm} - {\small\institutename} - \end{center}% - } - -% definition of the "\spnewtheorem" command. -% -% Usage: -% -% \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font} -% or \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font} -% or \spnewtheorem*{env_nam}{caption}{cap_font}{body_font} -% -% New is "cap_font" and "body_font". It stands for -% fontdefinition of the caption and the text itself. -% -% "\spnewtheorem*" gives a theorem without number. -% -% A defined spnewthoerem environment is used as described -% by Lamport. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\def\@thmcountersep{} -\def\@thmcounterend{.} - -\def\spnewtheorem{\@ifstar{\@sthm}{\@Sthm}} - -% definition of \spnewtheorem with number - -\def\@spnthm#1#2{% - \@ifnextchar[{\@spxnthm{#1}{#2}}{\@spynthm{#1}{#2}}} -\def\@Sthm#1{\@ifnextchar[{\@spothm{#1}}{\@spnthm{#1}}} - -\def\@spxnthm#1#2[#3]#4#5{\expandafter\@ifdefinable\csname #1\endcsname - {\@definecounter{#1}\@addtoreset{#1}{#3}% - \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand - \csname the#3\endcsname \noexpand\@thmcountersep \@thmcounter{#1}}% - \expandafter\xdef\csname #1name\endcsname{#2}% - \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% - \global\@namedef{end#1}{\@endtheorem}}} - -\def\@spynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname - {\@definecounter{#1}% - \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}% - \expandafter\xdef\csname #1name\endcsname{#2}% - \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#3}{#4}}% - \global\@namedef{end#1}{\@endtheorem}}} - -\def\@spothm#1[#2]#3#4#5{% - \@ifundefined{c@#2}{\@latexerr{No theorem environment `#2' defined}\@eha}% - {\expandafter\@ifdefinable\csname #1\endcsname - {\newaliascnt{#1}{#2}% - \expandafter\xdef\csname #1name\endcsname{#3}% - \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% - \global\@namedef{end#1}{\@endtheorem}}}} - -\def\@spthm#1#2#3#4{\topsep 7\p@ \@plus2\p@ \@minus4\p@ -\refstepcounter{#1}% -\@ifnextchar[{\@spythm{#1}{#2}{#3}{#4}}{\@spxthm{#1}{#2}{#3}{#4}}} - -\def\@spxthm#1#2#3#4{\@spbegintheorem{#2}{\csname the#1\endcsname}{#3}{#4}% - \ignorespaces} - -\def\@spythm#1#2#3#4[#5]{\@spopargbegintheorem{#2}{\csname - the#1\endcsname}{#5}{#3}{#4}\ignorespaces} - -\def\@spbegintheorem#1#2#3#4{\trivlist - \item[\hskip\labelsep{#3#1\ #2\@thmcounterend}]#4} - -\def\@spopargbegintheorem#1#2#3#4#5{\trivlist - \item[\hskip\labelsep{#4#1\ #2}]{#4(#3)\@thmcounterend\ }#5} - -% definition of \spnewtheorem* without number - -\def\@sthm#1#2{\@Ynthm{#1}{#2}} - -\def\@Ynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname - {\global\@namedef{#1}{\@Thm{\csname #1name\endcsname}{#3}{#4}}% - \expandafter\xdef\csname #1name\endcsname{#2}% - \global\@namedef{end#1}{\@endtheorem}}} - -\def\@Thm#1#2#3{\topsep 7\p@ \@plus2\p@ \@minus4\p@ -\@ifnextchar[{\@Ythm{#1}{#2}{#3}}{\@Xthm{#1}{#2}{#3}}} - -\def\@Xthm#1#2#3{\@Begintheorem{#1}{#2}{#3}\ignorespaces} - -\def\@Ythm#1#2#3[#4]{\@Opargbegintheorem{#1} - {#4}{#2}{#3}\ignorespaces} - -\def\@Begintheorem#1#2#3{#3\trivlist - \item[\hskip\labelsep{#2#1\@thmcounterend}]} - -\def\@Opargbegintheorem#1#2#3#4{#4\trivlist - \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }} - -\if@envcntsect - \def\@thmcountersep{.} - \spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape} -\else - \spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape} - \if@envcntreset - \@addtoreset{theorem}{section} - \else - \@addtoreset{theorem}{chapter} - \fi -\fi - -%definition of divers theorem environments -\spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily} -\spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily} -\if@envcntsame % alle Umgebungen wie Theorem. - \def\spn@wtheorem#1#2#3#4{\@spothm{#1}[theorem]{#2}{#3}{#4}} -\else % alle Umgebungen mit eigenem Zaehler - \if@envcntsect % mit section numeriert - \def\spn@wtheorem#1#2#3#4{\@spxnthm{#1}{#2}[section]{#3}{#4}} - \else % nicht mit section numeriert - \if@envcntreset - \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} - \@addtoreset{#1}{section}} - \else - \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} - \@addtoreset{#1}{chapter}}% - \fi - \fi -\fi -\spn@wtheorem{case}{Case}{\itshape}{\rmfamily} -\spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily} -\spn@wtheorem{corollary}{Corollary}{\bfseries}{\itshape} -\spn@wtheorem{definition}{Definition}{\bfseries}{\itshape} -\spn@wtheorem{example}{Example}{\itshape}{\rmfamily} -\spn@wtheorem{exercise}{Exercise}{\itshape}{\rmfamily} -\spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape} -\spn@wtheorem{note}{Note}{\itshape}{\rmfamily} -\spn@wtheorem{problem}{Problem}{\itshape}{\rmfamily} -\spn@wtheorem{property}{Property}{\itshape}{\rmfamily} -\spn@wtheorem{proposition}{Proposition}{\bfseries}{\itshape} -\spn@wtheorem{question}{Question}{\itshape}{\rmfamily} -\spn@wtheorem{solution}{Solution}{\itshape}{\rmfamily} -\spn@wtheorem{remark}{Remark}{\itshape}{\rmfamily} - -\def\@takefromreset#1#2{% - \def\@tempa{#1}% - \let\@tempd\@elt - \def\@elt##1{% - \def\@tempb{##1}% - \ifx\@tempa\@tempb\else - \@addtoreset{##1}{#2}% - \fi}% - \expandafter\expandafter\let\expandafter\@tempc\csname cl@#2\endcsname - \expandafter\def\csname cl@#2\endcsname{}% - \@tempc - \let\@elt\@tempd} - -\def\theopargself{\def\@spopargbegintheorem##1##2##3##4##5{\trivlist - \item[\hskip\labelsep{##4##1\ ##2}]{##4##3\@thmcounterend\ }##5} - \def\@Opargbegintheorem##1##2##3##4{##4\trivlist - \item[\hskip\labelsep{##3##1}]{##3##2\@thmcounterend\ }} - } - -\renewenvironment{abstract}{% - \list{}{\advance\topsep by0.35cm\relax\small - \leftmargin=1cm - \labelwidth=\z@ - \listparindent=\z@ - \itemindent\listparindent - \rightmargin\leftmargin}\item[\hskip\labelsep - \bfseries\abstractname]} - {\endlist} - -\newdimen\headlineindent % dimension for space between -\headlineindent=1.166cm % number and text of headings. - -\def\ps@headings{\let\@mkboth\@gobbletwo - \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}% - \leftmark\hfil} - \def\@oddhead{\normalfont\small\hfil\rightmark\hspace{\headlineindent}% - \llap{\thepage}} - \def\chaptermark##1{}% - \def\sectionmark##1{}% - \def\subsectionmark##1{}} - -\def\ps@titlepage{\let\@mkboth\@gobbletwo - \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}% - \hfil} - \def\@oddhead{\normalfont\small\hfil\hspace{\headlineindent}% - \llap{\thepage}} - \def\chaptermark##1{}% - \def\sectionmark##1{}% - \def\subsectionmark##1{}} - -\if@runhead\ps@headings\else -\ps@empty\fi - -\setlength\arraycolsep{1.4\p@} -\setlength\tabcolsep{1.4\p@} - -\endinput -%end of file llncs.cls diff --git a/doc/splncs03.bst b/doc/splncs03.bst deleted file mode 100644 index 3279169..0000000 --- a/doc/splncs03.bst +++ /dev/null @@ -1,1519 +0,0 @@ -%% BibTeX bibliography style `splncs03' -%% -%% BibTeX bibliography style for use with numbered references in -%% Springer Verlag's "Lecture Notes in Computer Science" series. -%% (See Springer's documentation for llncs.cls for -%% more details of the suggested reference format.) Note that this -%% file will not work for author-year style citations. -%% -%% Use \documentclass{llncs} and \bibliographystyle{splncs03}, and cite -%% a reference with (e.g.) \cite{smith77} to get a "[1]" in the text. -%% -%% This file comes to you courtesy of Maurizio "Titto" Patrignani of -%% Dipartimento di Informatica e Automazione Universita' Roma Tre -%% -%% ================================================================================================ -%% This was file `titto-lncs-02.bst' produced on Wed Apr 1, 2009 -%% Edited by hand by titto based on `titto-lncs-01.bst' (see below) -%% -%% CHANGES (with respect to titto-lncs-01.bst): -%% - Removed the call to \urlprefix (thus no "URL" string is added to the output) -%% ================================================================================================ -%% This was file `titto-lncs-01.bst' produced on Fri Aug 22, 2008 -%% Edited by hand by titto based on `titto.bst' (see below) -%% -%% CHANGES (with respect to titto.bst): -%% - Removed the "capitalize" command for editors string "(eds.)" and "(ed.)" -%% - Introduced the functions titto.bbl.pages and titto.bbl.page for journal pages (without "pp.") -%% - Added a new.sentence command to separate with a dot booktitle and series in the inproceedings -%% - Commented all new.block commands before urls and notes (to separate them with a comma) -%% - Introduced the functions titto.bbl.volume for handling journal volumes (without "vol." label) -%% - Used for editors the same name conventions used for authors (see function format.in.ed.booktitle) -%% - Removed a \newblock to avoid long spaces between title and "In: ..." -%% - Added function titto.space.prefix to add a space instead of "~" after the (removed) "vol." label -%% ================================================================================================ -%% This was file `titto.bst', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% merlin.mbs (with options: `vonx,nm-rvvc,yr-par,jttl-rm,volp-com,jwdpg,jwdvol,numser,ser-vol,jnm-x,btit-rm,bt-rm,edparxc,bkedcap,au-col,in-col,fin-bare,pp,ed,abr,mth-bare,xedn,jabr,and-com,and-com-ed,xand,url,url-blk,em-x,nfss,') -%% ---------------------------------------- -%% *** Tentative .bst file for Springer LNCS *** -%% -%% Copyright 1994-2007 Patrick W Daly - % =============================================================== - % IMPORTANT NOTICE: - % This bibliographic style (bst) file has been generated from one or - % more master bibliographic style (mbs) files, listed above. - % - % This generated file can be redistributed and/or modified under the terms - % of the LaTeX Project Public License Distributed from CTAN - % archives in directory macros/latex/base/lppl.txt; either - % version 1 of the License, or any later version. - % =============================================================== - % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)] - % For use with BibTeX version 0.99a or later - %------------------------------------------------------------------- - % This bibliography style file is intended for texts in ENGLISH - % This is a numerical citation style, and as such is standard LaTeX. - % It requires no extra package to interface to the main text. - % The form of the \bibitem entries is - % \bibitem{key}... - % Usage of \cite is as follows: - % \cite{key} ==>> [#] - % \cite[chap. 2]{key} ==>> [#, chap. 2] - % where # is a number determined by the ordering in the reference list. - % The order in the reference list is alphabetical by authors. - %--------------------------------------------------------------------- - -ENTRY - { address - author - booktitle - chapter - edition - editor - eid - howpublished - institution - journal - key - month - note - number - organization - pages - publisher - school - series - title - type - url - volume - year - } - {} - { label } -INTEGERS { output.state before.all mid.sentence after.sentence after.block } -FUNCTION {init.state.consts} -{ #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := -} -STRINGS { s t} -FUNCTION {output.nonnull} -{ 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ -% newline$ -% "\newblock " write$ % removed for titto-lncs-01 - " " write$ % to avoid long spaces between title and "In: ..." - } - { output.state before.all = - 'write$ - { add.period$ " " * write$ } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} -FUNCTION {output} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull - if$ -} -FUNCTION {output.check} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ -} -FUNCTION {fin.entry} -{ duplicate$ empty$ - 'pop$ - 'write$ - if$ - newline$ -} - -FUNCTION {new.block} -{ output.state before.all = - 'skip$ - { after.block 'output.state := } - if$ -} -FUNCTION {new.sentence} -{ output.state after.block = - 'skip$ - { output.state before.all = - 'skip$ - { after.sentence 'output.state := } - if$ - } - if$ -} -FUNCTION {add.blank} -{ " " * before.all 'output.state := -} - - -FUNCTION {add.colon} -{ duplicate$ empty$ - 'skip$ - { ":" * add.blank } - if$ -} - -FUNCTION {date.block} -{ - new.block -} - -FUNCTION {not} -{ { #0 } - { #1 } - if$ -} -FUNCTION {and} -{ 'skip$ - { pop$ #0 } - if$ -} -FUNCTION {or} -{ { pop$ #1 } - 'skip$ - if$ -} -STRINGS {z} -FUNCTION {remove.dots} -{ 'z := - "" - { z empty$ not } - { z #1 #1 substring$ - z #2 global.max$ substring$ 'z := - duplicate$ "." = 'pop$ - { * } - if$ - } - while$ -} -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ -} -FUNCTION {new.block.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ -} -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} -FUNCTION {field.or.null} -{ duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ -} -FUNCTION {emphasize} -{ skip$ } -FUNCTION {tie.or.space.prefix} -{ duplicate$ text.length$ #3 < - { "~" } - { " " } - if$ - swap$ -} -FUNCTION {titto.space.prefix} % always introduce a space -{ duplicate$ text.length$ #3 < - { " " } - { " " } - if$ - swap$ -} - - -FUNCTION {capitalize} -{ "u" change.case$ "t" change.case$ } - -FUNCTION {space.word} -{ " " swap$ * " " * } - % Here are the language-specific definitions for explicit words. - % Each function has a name bbl.xxx where xxx is the English word. - % The language selected here is ENGLISH -FUNCTION {bbl.and} -{ "and"} - -FUNCTION {bbl.etal} -{ "et~al." } - -FUNCTION {bbl.editors} -{ "eds." } - -FUNCTION {bbl.editor} -{ "ed." } - -FUNCTION {bbl.edby} -{ "edited by" } - -FUNCTION {bbl.edition} -{ "edn." } - -FUNCTION {bbl.volume} -{ "vol." } - -FUNCTION {titto.bbl.volume} % for handling journals -{ "" } - -FUNCTION {bbl.of} -{ "of" } - -FUNCTION {bbl.number} -{ "no." } - -FUNCTION {bbl.nr} -{ "no." } - -FUNCTION {bbl.in} -{ "in" } - -FUNCTION {bbl.pages} -{ "pp." } - -FUNCTION {bbl.page} -{ "p." } - -FUNCTION {titto.bbl.pages} % for journals -{ "" } - -FUNCTION {titto.bbl.page} % for journals -{ "" } - -FUNCTION {bbl.chapter} -{ "chap." } - -FUNCTION {bbl.techrep} -{ "Tech. Rep." } - -FUNCTION {bbl.mthesis} -{ "Master's thesis" } - -FUNCTION {bbl.phdthesis} -{ "Ph.D. thesis" } - -MACRO {jan} {"Jan."} - -MACRO {feb} {"Feb."} - -MACRO {mar} {"Mar."} - -MACRO {apr} {"Apr."} - -MACRO {may} {"May"} - -MACRO {jun} {"Jun."} - -MACRO {jul} {"Jul."} - -MACRO {aug} {"Aug."} - -MACRO {sep} {"Sep."} - -MACRO {oct} {"Oct."} - -MACRO {nov} {"Nov."} - -MACRO {dec} {"Dec."} - -MACRO {acmcs} {"ACM Comput. Surv."} - -MACRO {acta} {"Acta Inf."} - -MACRO {cacm} {"Commun. ACM"} - -MACRO {ibmjrd} {"IBM J. Res. Dev."} - -MACRO {ibmsj} {"IBM Syst.~J."} - -MACRO {ieeese} {"IEEE Trans. Software Eng."} - -MACRO {ieeetc} {"IEEE Trans. Comput."} - -MACRO {ieeetcad} - {"IEEE Trans. Comput. Aid. Des."} - -MACRO {ipl} {"Inf. Process. Lett."} - -MACRO {jacm} {"J.~ACM"} - -MACRO {jcss} {"J.~Comput. Syst. Sci."} - -MACRO {scp} {"Sci. Comput. Program."} - -MACRO {sicomp} {"SIAM J. Comput."} - -MACRO {tocs} {"ACM Trans. Comput. Syst."} - -MACRO {tods} {"ACM Trans. Database Syst."} - -MACRO {tog} {"ACM Trans. Graphic."} - -MACRO {toms} {"ACM Trans. Math. Software"} - -MACRO {toois} {"ACM Trans. Office Inf. Syst."} - -MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} - -MACRO {tcs} {"Theor. Comput. Sci."} - -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$ -} -FUNCTION {format.url} -{ url empty$ - { "" } -% { "\urlprefix\url{" url * "}" * } - { "\url{" url * "}" * } % changed in titto-lncs-02.bst - if$ -} - -INTEGERS { nameptr namesleft numnames } - - -STRINGS { bibinfo} - -FUNCTION {format.names} -{ 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{vv~}{ll}{, jj}{, f{.}.}" - format.name$ - bibinfo bibinfo.check - 't := - nameptr #1 > - { - namesleft #1 > - { ", " * t * } - { - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - "," * - t "others" = - { - " " * bbl.etal * - } - { " " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } if$ -} -FUNCTION {format.names.ed} -{ - 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f{.}.~}{vv~}{ll}{ jj}" - format.name$ - bibinfo bibinfo.check - 't := - nameptr #1 > - { - namesleft #1 > - { ", " * t * } - { - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - "," * - t "others" = - { - - " " * bbl.etal * - } - { " " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } if$ -} -FUNCTION {format.authors} -{ author "author" format.names -} -FUNCTION {get.bbl.editor} -{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } - -FUNCTION {format.editors} -{ editor "editor" format.names duplicate$ empty$ 'skip$ - { - " " * - get.bbl.editor -% capitalize - "(" swap$ * ")" * - * - } - if$ -} -FUNCTION {format.note} -{ - note empty$ - { "" } - { note #1 #1 substring$ - duplicate$ "{" = - 'skip$ - { output.state mid.sentence = - { "l" } - { "u" } - if$ - change.case$ - } - if$ - note #2 global.max$ substring$ * "note" bibinfo.check - } - if$ -} - -FUNCTION {format.title} -{ title - duplicate$ empty$ 'skip$ - { "t" change.case$ } - if$ - "title" bibinfo.check -} -FUNCTION {output.bibitem} -{ newline$ - "\bibitem{" write$ - cite$ write$ - "}" write$ - newline$ - "" - before.all 'output.state := -} - -FUNCTION {n.dashify} -{ - 't := - "" - { t empty$ not } - { t #1 #1 substring$ "-" = - { t #1 #2 substring$ "--" = not - { "--" * - t #2 global.max$ substring$ 't := - } - { { t #1 #1 substring$ "-" = } - { "-" * - t #2 global.max$ substring$ 't := - } - while$ - } - if$ - } - { t #1 #1 substring$ * - t #2 global.max$ substring$ 't := - } - if$ - } - while$ -} - -FUNCTION {word.in} -{ bbl.in capitalize - ":" * - " " * } - -FUNCTION {format.date} -{ - month "month" bibinfo.check - duplicate$ empty$ - year "year" bibinfo.check duplicate$ empty$ - { swap$ 'skip$ - { "there's a month but no year in " cite$ * warning$ } - if$ - * - } - { swap$ 'skip$ - { - swap$ - " " * swap$ - } - if$ - * - remove.dots - } - if$ - duplicate$ empty$ - 'skip$ - { - before.all 'output.state := - " (" swap$ * ")" * - } - if$ -} -FUNCTION {format.btitle} -{ title "title" bibinfo.check - duplicate$ empty$ 'skip$ - { - } - if$ -} -FUNCTION {either.or.check} -{ empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ -} -FUNCTION {format.bvolume} -{ volume empty$ - { "" } - { bbl.volume volume tie.or.space.prefix - "volume" bibinfo.check * * - series "series" bibinfo.check - duplicate$ empty$ 'pop$ - { emphasize ", " * swap$ * } - if$ - "volume and number" number either.or.check - } - if$ -} -FUNCTION {format.number.series} -{ volume empty$ - { number empty$ - { series field.or.null } - { output.state mid.sentence = - { bbl.number } - { bbl.number capitalize } - if$ - number tie.or.space.prefix "number" bibinfo.check * * - series empty$ - { "there's a number but no series in " cite$ * warning$ } - { bbl.in space.word * - series "series" bibinfo.check * - } - if$ - } - if$ - } - { "" } - if$ -} - -FUNCTION {format.edition} -{ edition duplicate$ empty$ 'skip$ - { - output.state mid.sentence = - { "l" } - { "t" } - if$ change.case$ - "edition" bibinfo.check - " " * bbl.edition * - } - if$ -} -INTEGERS { multiresult } -FUNCTION {multi.page.check} -{ 't := - #0 'multiresult := - { multiresult not - t empty$ not - and - } - { t #1 #1 substring$ - duplicate$ "-" = - swap$ duplicate$ "," = - swap$ "+" = - or or - { #1 'multiresult := } - { t #2 global.max$ substring$ 't := } - if$ - } - while$ - multiresult -} -FUNCTION {format.pages} -{ pages duplicate$ empty$ 'skip$ - { duplicate$ multi.page.check - { - bbl.pages swap$ - n.dashify - } - { - bbl.page swap$ - } - if$ - tie.or.space.prefix - "pages" bibinfo.check - * * - } - if$ -} -FUNCTION {format.journal.pages} -{ pages duplicate$ empty$ 'pop$ - { swap$ duplicate$ empty$ - { pop$ pop$ format.pages } - { - ", " * - swap$ - n.dashify - pages multi.page.check - 'titto.bbl.pages - 'titto.bbl.page - if$ - swap$ tie.or.space.prefix - "pages" bibinfo.check - * * - * - } - if$ - } - if$ -} -FUNCTION {format.journal.eid} -{ eid "eid" bibinfo.check - duplicate$ empty$ 'pop$ - { swap$ duplicate$ empty$ 'skip$ - { - ", " * - } - if$ - swap$ * - } - if$ -} -FUNCTION {format.vol.num.pages} % this function is used only for journal entries -{ volume field.or.null - duplicate$ empty$ 'skip$ - { -% bbl.volume swap$ tie.or.space.prefix - titto.bbl.volume swap$ titto.space.prefix -% rationale for the change above: for journals you don't want "vol." label -% hence it does not make sense to attach the journal number to the label when -% it is short - "volume" bibinfo.check - * * - } - if$ - number "number" bibinfo.check duplicate$ empty$ 'skip$ - { - swap$ duplicate$ empty$ - { "there's a number but no volume in " cite$ * warning$ } - 'skip$ - if$ - swap$ - "(" swap$ * ")" * - } - if$ * - eid empty$ - { format.journal.pages } - { format.journal.eid } - if$ -} - -FUNCTION {format.chapter.pages} -{ chapter empty$ - 'format.pages - { type empty$ - { bbl.chapter } - { type "l" change.case$ - "type" bibinfo.check - } - if$ - chapter tie.or.space.prefix - "chapter" bibinfo.check - * * - pages empty$ - 'skip$ - { ", " * format.pages * } - if$ - } - if$ -} - -FUNCTION {format.booktitle} -{ - booktitle "booktitle" bibinfo.check -} -FUNCTION {format.in.ed.booktitle} -{ format.booktitle duplicate$ empty$ 'skip$ - { -% editor "editor" format.names.ed duplicate$ empty$ 'pop$ % changed by titto - editor "editor" format.names duplicate$ empty$ 'pop$ - { - " " * - get.bbl.editor -% capitalize - "(" swap$ * ") " * - * swap$ - * } - if$ - word.in swap$ * - } - if$ -} -FUNCTION {empty.misc.check} -{ author empty$ title empty$ howpublished empty$ - month empty$ year empty$ note empty$ - and and and and and - key empty$ not and - { "all relevant fields are empty in " cite$ * warning$ } - 'skip$ - if$ -} -FUNCTION {format.thesis.type} -{ type duplicate$ empty$ - 'pop$ - { swap$ pop$ - "t" change.case$ "type" bibinfo.check - } - if$ -} -FUNCTION {format.tr.number} -{ number "number" bibinfo.check - type duplicate$ empty$ - { pop$ bbl.techrep } - 'skip$ - if$ - "type" bibinfo.check - swap$ duplicate$ empty$ - { pop$ "t" change.case$ } - { tie.or.space.prefix * * } - if$ -} -FUNCTION {format.article.crossref} -{ - key duplicate$ empty$ - { pop$ - journal duplicate$ empty$ - { "need key or journal for " cite$ * " to crossref " * crossref * warning$ } - { "journal" bibinfo.check emphasize word.in swap$ * } - if$ - } - { word.in swap$ * " " *} - if$ - " \cite{" * crossref * "}" * -} -FUNCTION {format.crossref.editor} -{ editor #1 "{vv~}{ll}" format.name$ - "editor" bibinfo.check - editor num.names$ duplicate$ - #2 > - { pop$ - "editor" bibinfo.check - " " * bbl.etal - * - } - { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { - "editor" bibinfo.check - " " * bbl.etal - * - } - { - bbl.and space.word - * editor #2 "{vv~}{ll}" format.name$ - "editor" bibinfo.check - * - } - if$ - } - if$ - } - if$ -} -FUNCTION {format.book.crossref} -{ volume duplicate$ empty$ - { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ - pop$ word.in - } - { bbl.volume - capitalize - swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * - } - if$ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { series emphasize * } - if$ - } - { key * } - if$ - } - { format.crossref.editor * } - if$ - " \cite{" * crossref * "}" * -} -FUNCTION {format.incoll.inproc.crossref} -{ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { format.booktitle duplicate$ empty$ - { "need editor, key, or booktitle for " cite$ * " to crossref " * - crossref * warning$ - } - { word.in swap$ * } - if$ - } - { word.in key * " " *} - if$ - } - { word.in format.crossref.editor * " " *} - if$ - " \cite{" * crossref * "}" * -} -FUNCTION {format.org.or.pub} -{ 't := - "" - address empty$ t empty$ and - 'skip$ - { - t empty$ - { address "address" bibinfo.check * - } - { t * - address empty$ - 'skip$ - { ", " * address "address" bibinfo.check * } - if$ - } - if$ - } - if$ -} -FUNCTION {format.publisher.address} -{ publisher "publisher" bibinfo.warn format.org.or.pub -} - -FUNCTION {format.organization.address} -{ organization "organization" bibinfo.check format.org.or.pub -} - -FUNCTION {article} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - new.block - crossref missing$ - { - journal - "journal" bibinfo.check - "journal" output.check - add.blank - format.vol.num.pages output - format.date "year" output.check - } - { format.article.crossref output.nonnull - format.pages output - } - if$ -% new.block - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {book} -{ output.bibitem - author empty$ - { format.editors "author and editor" output.check - add.colon - } - { format.authors output.nonnull - add.colon - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - new.block - format.btitle "title" output.check - crossref missing$ - { format.bvolume output - new.block - new.sentence - format.number.series output - format.publisher.address output - } - { - new.block - format.book.crossref output.nonnull - } - if$ - format.edition output - format.date "year" output.check -% new.block - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {booklet} -{ output.bibitem - format.authors output - add.colon - new.block - format.title "title" output.check - new.block - howpublished "howpublished" bibinfo.check output - address "address" bibinfo.check output - format.date output -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {inbook} -{ output.bibitem - author empty$ - { format.editors "author and editor" output.check - add.colon - } - { format.authors output.nonnull - add.colon - crossref missing$ - { "author and editor" editor either.or.check } - 'skip$ - if$ - } - if$ - new.block - format.btitle "title" output.check - crossref missing$ - { - format.bvolume output - format.chapter.pages "chapter and pages" output.check - new.block - new.sentence - format.number.series output - format.publisher.address output - } - { - format.chapter.pages "chapter and pages" output.check - new.block - format.book.crossref output.nonnull - } - if$ - format.edition output - format.date "year" output.check -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {incollection} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle "booktitle" output.check - format.bvolume output - format.chapter.pages output - new.sentence - format.number.series output - format.publisher.address output - format.edition output - format.date "year" output.check - } - { format.incoll.inproc.crossref output.nonnull - format.chapter.pages output - } - if$ -% new.block - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {inproceedings} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - new.block - crossref missing$ - { format.in.ed.booktitle "booktitle" output.check - new.sentence % added by titto - format.bvolume output - format.pages output - new.sentence - format.number.series output - publisher empty$ - { format.organization.address output } - { organization "organization" bibinfo.check output - format.publisher.address output - } - if$ - format.date "year" output.check - } - { format.incoll.inproc.crossref output.nonnull - format.pages output - } - if$ -% new.block - format.url output -% new.block - format.note output - fin.entry -} -FUNCTION {conference} { inproceedings } -FUNCTION {manual} -{ output.bibitem - author empty$ - { organization "organization" bibinfo.check - duplicate$ empty$ 'pop$ - { output - address "address" bibinfo.check output - } - if$ - } - { format.authors output.nonnull } - if$ - add.colon - new.block - format.btitle "title" output.check - author empty$ - { organization empty$ - { - address new.block.checka - address "address" bibinfo.check output - } - 'skip$ - if$ - } - { - organization address new.block.checkb - organization "organization" bibinfo.check output - address "address" bibinfo.check output - } - if$ - format.edition output - format.date output -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {mastersthesis} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.btitle - "title" output.check - new.block - bbl.mthesis format.thesis.type output.nonnull - school "school" bibinfo.warn output - address "address" bibinfo.check output - format.date "year" output.check -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {misc} -{ output.bibitem - format.authors output - add.colon - title howpublished new.block.checkb - format.title output - howpublished new.block.checka - howpublished "howpublished" bibinfo.check output - format.date output -% new.block - format.url output -% new.block - format.note output - fin.entry - empty.misc.check -} -FUNCTION {phdthesis} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.btitle - "title" output.check - new.block - bbl.phdthesis format.thesis.type output.nonnull - school "school" bibinfo.warn output - address "address" bibinfo.check output - format.date "year" output.check -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {proceedings} -{ output.bibitem - editor empty$ - { organization "organization" bibinfo.check output - } - { format.editors output.nonnull } - if$ - add.colon - new.block - format.btitle "title" output.check - format.bvolume output - editor empty$ - { publisher empty$ - { format.number.series output } - { - new.sentence - format.number.series output - format.publisher.address output - } - if$ - } - { publisher empty$ - { - new.sentence - format.number.series output - format.organization.address output } - { - new.sentence - format.number.series output - organization "organization" bibinfo.check output - format.publisher.address output - } - if$ - } - if$ - format.date "year" output.check -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {techreport} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title - "title" output.check - new.block - format.tr.number output.nonnull - institution "institution" bibinfo.warn output - address "address" bibinfo.check output - format.date "year" output.check -% new.block - format.url output -% new.block - format.note output - fin.entry -} - -FUNCTION {unpublished} -{ output.bibitem - format.authors "author" output.check - add.colon - new.block - format.title "title" output.check - format.date output -% new.block - format.url output -% new.block - format.note "note" output.check - fin.entry -} - -FUNCTION {default.type} { misc } -READ -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 > } - { s nameptr - "{ll{ }}{ ff{ }}{ jj{ }}" - format.name$ 't := - nameptr #1 > - { - " " * - namesleft #1 = t "others" = and - { "zzzzz" * } - { t sortify * } - if$ - } - { 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 {presort} -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.sort - { type$ "proceedings" = - 'editor.organization.sort - { type$ "manual" = - 'author.organization.sort - 'author.sort - if$ - } - if$ - } - if$ - " " - * - year field.or.null sortify - * - " " - * - title field.or.null - sort.format.title - * - #1 entry.max$ substring$ - 'sort.key$ := -} -ITERATE {presort} -SORT -STRINGS { longest.label } -INTEGERS { number.label longest.label.width } -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$ -} -EXECUTE {initialize.longest.label} -ITERATE {longest.label.pass} -FUNCTION {begin.bib} -{ preamble$ empty$ - 'skip$ - { preamble$ write$ newline$ } - if$ - "\begin{thebibliography}{" longest.label * "}" * - write$ newline$ - "\providecommand{\url}[1]{\texttt{#1}}" - write$ newline$ - "\providecommand{\urlprefix}{URL }" - write$ newline$ -} -EXECUTE {begin.bib} -EXECUTE {init.state.consts} -ITERATE {call.type$} -FUNCTION {end.bib} -{ newline$ - "\end{thebibliography}" write$ newline$ -} -EXECUTE {end.bib} -%% End of customized bst file -%% -%% End of file `titto.bst'. - - diff --git a/doc/tree.tex b/doc/tree.tex deleted file mode 100644 index fd44e74..0000000 --- a/doc/tree.tex +++ /dev/null @@ -1,57 +0,0 @@ -\begin{tikzpicture}[font=\scriptsize] -%\draw[step=1ex,gray,very thin] (0,0) grid (50ex,50ex); -%\draw (0,0ex) -- (40ex,0ex) -- (40ex,50ex) -- (0ex,50ex) -- (0ex,0ex); - -\draw [-,thick] (0ex,25ex) -- (2ex,25ex); - -\draw [-,thick] (2ex,25ex) -- (2ex,13ex); % 4xu -\draw [-,thick] (2ex,25ex) -- (2ex,37ex); % 4xu - -\draw [-,thick] (2ex,37ex) -- (8ex,37ex); % 2xu - -\draw [-,thick] (8ex,37ex) -- (8ex,43ex); % 2xu -\draw [-,thick] (8ex,37ex) -- (8ex,31ex); % 2xu - -\draw [-,thick] (8ex,43ex) -- (26ex,43ex); %6xu -\draw [-,thick] (26ex,43ex) -- (26ex,46ex); %1xu -\draw [-,thick] (26ex,43ex) -- (26ex,40ex); %1xu -\draw [-,thick] (26ex,46ex) -- (32ex,46ex); %2xu -\draw [-,thick] (26ex,40ex) -- (32ex,40ex); %2xu - - -\draw [-,thick] (8ex,31ex) -- (20ex,31ex); % 4xu -\draw [-,thick] (20ex,31ex) -- (20ex,28ex); % 1xu -\draw [-,thick] (20ex,31ex) -- (20ex,34ex); % 1xu -\draw [-,thick] (20ex,34ex) -- (32ex,34ex); % 4xu -\draw [-,thick] (20ex,28ex) -- (32ex,28ex); % 4xu - -\draw [-,thick] (2ex,13ex) -- (26ex,13ex); % 8xu -\draw [-,thick] (26ex,13ex) -- (26ex,10ex); % 1xu -\draw [-,thick] (26ex,13ex) -- (26ex,16ex); % 1xu -\draw [-,thick] (26ex,16ex) -- (32ex,16ex); % 2xu -\draw [-,thick] (26ex,10ex) -- (32ex,10ex); % 2xu - -\draw [-, dashed] (2ex,48ex) -- (2ex, 4ex); -\draw [-, dashed] (8ex,48ex) -- (8ex, 4ex); -\draw [-, dashed] (20ex,48ex) -- (20ex, 4ex); -\draw [-, dashed] (26ex,48ex) -- (26ex, 4ex); -\draw [-, dashed] (32ex,48ex) -- (32ex, 4ex); - -\node at (2ex,2ex) {$s_1$}; -\node at (8ex,2ex) {$s_2$}; -\node at (20ex,2ex) {$s_3$}; -\node at (26ex,2ex) {$s_4$}; -\node at (32ex,2ex) {$s_5$}; - -\node at (5ex,6ex) {$x_1$}; -\node at (14ex,6ex) {$x_2$}; -\node at (23ex,6ex) {$x_3$}; -\node at (29ex,6ex) {$x_4$}; - -\node at (34ex,46ex) {A}; -\node at (34ex,40ex) {B}; -\node at (34ex,34ex) {C}; -\node at (34ex,28ex) {D}; -\node at (34ex,16ex) {E}; -\node at (34ex,10ex) {F}; -\end{tikzpicture}