figure-solution-space-tree-of-enumeration-search.tex 2.76 KB
Newer Older
1
\begin{tikzpicture}
单韦乔 committed
2
	\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=4em,minimum height=2em,font=\large]
3
		
4 5
	\node[fill=red!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
	\node[fill=red!20,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){I\\[-0.5ex]agree};
6
	\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
单韦乔 committed
7
	\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$sos$>$\\[-0.5ex]$<$eos$>$};
8
		
单韦乔 committed
9
	\node[anchor=north,unit] (w1) at ([xshift=2.5em,yshift=-1em]eos.south){$w_1$};
10
	\node[anchor=north,unit,fill=blue!10] (n11) at ([yshift=-0.5em]w1.south){{{$<$sos$>$}}};
11
		
12 13 14
	\node[anchor=west,unit,fill=red!20] (n22) at ([xshift=3em]n11.east){{{agree}}};
	\node[anchor=south,unit,fill=red!20] (n21) at ([yshift=5.5em]n22.north){{{I}}};
	\node[anchor=north,unit,fill=blue!10] (n23) at ([yshift=-3em]n22.south){{{$<$eos$>$}}};
单韦乔 committed
15
	\node[anchor=south,unit] (w2) at ([yshift=0.5em]n21.north){$w_2$};
16
	
17 18 19 20 21 22
	\node[anchor=west,unit,fill=red!20] (n32) at ([xshift=3em]n21.east){{{agree}}};
	\node[anchor=south,unit,fill=red!20] (n31) at ([yshift=0.3em]n32.north){{{I}}};
	\node[anchor=north,unit,fill=blue!10] (n33) at ([yshift=-0.3em]n32.south){{{$<$eos$>$}}};
	\node[anchor=west,unit,fill=red!20] (n35) at ([xshift=3em]n22.east){{{agree}}};
	\node[anchor=south,unit,fill=red!20] (n34) at ([yshift=0.3em]n35.north){{{I}}};
	\node[anchor=north,unit,fill=blue!10] (n36) at ([yshift=-0.3em]n35.south){{{$<$eos$>$}}};
单韦乔 committed
23
	\node[anchor=south,unit] (w3) at ([yshift=0.5em]n31.north){$w_3$};
24
		
25 26 27 28
	\node[anchor=west,unit,fill=blue!10] (n41) at ([xshift=3em]n31.east){{{$<$eos$>$}}};
	\node[anchor=west,unit,fill=blue!10] (n42) at ([xshift=3em]n32.east){{{$<$eos$>$}}};
	\node[anchor=west,unit,fill=blue!10] (n43) at ([xshift=3em]n34.east){{{$<$eos$>$}}};
	\node[anchor=west,unit,fill=blue!10] (n44) at ([xshift=3em]n35.east){{{$<$eos$>$}}};
单韦乔 committed
29
	\node[anchor=south,unit] (w4) at ([yshift=0.5em]n41.north){$w_4$};
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
		
	\draw[->,ublue,very thick] (n11.east) -- (n21.west);
	\draw[->,ublue,very thick] (n11.east) -- (n22.west);
	\draw[->,ublue,very thick] (n11.east) -- (n23.west);
		
	\draw[->,ublue,very thick] (n21.east) -- (n31.west);
	\draw[->,ublue,very thick] (n21.east) -- (n32.west);
	\draw[->,ublue,very thick] (n21.east) -- (n33.west);
	\draw[->,ublue,very thick] (n22.east) -- (n34.west);
	\draw[->,ublue,very thick] (n22.east) -- (n35.west);
	\draw[->,ublue,very thick] (n22.east) -- (n36.west);
	
	\draw[->,ublue,very thick] (n31.east) -- (n41.west);
	\draw[->,ublue,very thick] (n32.east) -- (n42.west);
	\draw[->,ublue,very thick] (n34.east) -- (n43.west);
	\draw[->,ublue,very thick] (n35.east) -- (n44.west);
\end{tikzpicture}