Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tikz plot for performance #651

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ when they outgrow the memory limit of the given machine.


<div align="center">
<img src="/docs/img/queens_time.png"
<img src="/docs/tikz/queens.png"
alt="Running Time of Adiar and other BDD packages solving the N-Queens problem"
style="max-width:32rem; width:32rem;" />
</div>
<div align="center">
<p style="margin-bottom:1rem;">Figure: Running time solving *N* Queens (lower is better).</p>
<p style="margin-bottom:1rem;">Figure: Running time solving N Queens (lower is better).</p>
</div>


Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).

IMAGE_PATH = @CMAKE_SOURCE_DIR@/docs/img/
IMAGE_PATH = @CMAKE_SOURCE_DIR@/docs/tikz/

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down
Binary file removed docs/img/queens_time.png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ are created as streaming algorithms that exploit a specific sorting of diagram
nodes on disk to delay recursion.

<div align="center">
<img src="queens_time.png"
<img src="queens.png"
alt="Running Time of Adiar and other BDD packages solving the N-Queens problem"
style="max-width:32rem; width:32rem"
/>
Expand Down
3 changes: 3 additions & 0 deletions docs/tikz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.aux
*.log
*.pdf
Binary file added docs/tikz/queens.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
136 changes: 136 additions & 0 deletions docs/tikz/queens.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
\documentclass[tikz, border=1mm]{standalone}

\tikzstyle{plot_adiar} =[color=cyan, opacity=0.8, mark=o, mark size=0.5pt, line width=0.9pt]
\tikzstyle{plot_buddy} =[color=orange, opacity=0.7, mark=triangle, mark size=0.4pt, line width=0.7pt]
\tikzstyle{plot_cal} =[color=purple, opacity=0.7, mark=+, mark size=0.9pt, line width=0.9pt]
\tikzstyle{plot_cudd} =[color=orange, opacity=0.7, mark=diamond, mark size=0.4pt, line width=0.7pt]
\tikzstyle{plot_sylvan}=[color=orange, opacity=0.7, mark=square, mark size=0.4pt, line width=0.7pt]

% graphics
\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes}
\usetikzlibrary{patterns}
\usetikzlibrary{arrows}
\tikzset{every picture/.style={>=stealth'}}

\usepackage{graphicx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepgfplotslibrary{fillbetween}

\begin{document}

\begin{tikzpicture}

\begin{axis}[%
width=0.6\linewidth,
height=0.322\linewidth,
every tick label/.append style={font=\tiny},
% x-axis
xlabel={\footnotesize N},
xmajorgrids=false,
xtick={7,...,17},
% y-axis
ylabel={\footnotesize s},
ytick distance={10},
ymode=log,
yminorgrids=false,
ymajorgrids=false,
grid style={dashed,black!5},
% legend
legend style={at={(1,1.001)}, anchor=north west},
]

\begin{scope}[blend mode=soft light]
% depth-first implementations
\addplot+ [style=plot_buddy, forget plot] coordinates {
(7, 0.009)
(8, 0.020)
(9, 0.052)
(10, 0.186)
(11, 0.821)
(12, 4.117)
(13, 23.255)
(14, 142.423)
};

\addplot+ [style=plot_cudd, forget plot] coordinates {
(7, 0.002)
(8, 0.009)
(9, 0.040)
(10, 0.526)
(11, 1.593)
(12, 8.967)
(13, 52.881)
(14, 316.093)
(15, 2687.585)
};

\addplot+ [style=plot_sylvan, forget plot] coordinates {
(7, 0.012)
(8, 0.021)
(9, 0.048)
(10, 0.155)
(11, 0.868)
(12, 5.321)
(13, 33.840)
(14, 219.785)
(15, 1508.866)
};

% breadth-first implementations
\addplot+ [style=plot_cal, forget plot] coordinates {
(7, 0.005)
(8, 0.014)
(9, 0.049)
(10, 0.231)
(11, 1.592)
(12, 10.696)
(13, 86.135)
(14, 685.696)
(15, 5580.124)
};
\addplot+ [style=plot_cal, dashed, forget plot] coordinates {
% Projection, assuming CAL does not slow down due to swap memory.
(15, 5580.124)
(16, 45198)
(17, 366103.8)
};

% time-forward processing, i.e. Adiar
\addplot+ [style=plot_adiar, forget plot] coordinates {
(7, 0.141)
(8, 0.174)
(9, 0.333)
(10, 0.871)
(11, 2.828)
(12, 12.530)
(13, 70.100)
(14, 434.766)
(15, 2829.750)
(16, 19400.135)
(17, 173650.677)
};

% legend
\addlegendimage{plot_adiar};
\addlegendentry{Adiar};

\addlegendimage{plot_buddy};
\addlegendentry{BuDDy};

\addlegendimage{plot_cal};
\addlegendentry{CAL};

\addlegendimage{plot_cudd};
\addlegendentry{CUDD};

\addlegendimage{plot_sylvan};
\addlegendentry{Sylvan};
\end{scope}
\end{axis}
\end{tikzpicture}

\end{document}
Loading