diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-nef/LICENSE | 21 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-nef/README.md | 46 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-nef/example-net.tex | 20 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-nef/nef.bib | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf | bin | 0 -> 98569 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex | 133 |
6 files changed, 236 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-nef/LICENSE b/Master/texmf-dist/doc/latex/tikz-nef/LICENSE new file mode 100644 index 00000000000..c20a0e47443 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-nef/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Jan Gosmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Master/texmf-dist/doc/latex/tikz-nef/README.md b/Master/texmf-dist/doc/latex/tikz-nef/README.md new file mode 100644 index 00000000000..f0dec40afef --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-nef/README.md @@ -0,0 +1,46 @@ +# tikz-nef +The *nef* TikZ library provides predefined styles and shapes to create diagrams + for neural networks constructed with the methods of the Neural Engineering + Framework (NEF) [1]. + +![Gated difference integrator example.](https://raw.githubusercontent.com/jgosmann/tikz-nef/master/example-net.png) + +The example above was generated with this code: + +```latex +\begin{tikzpicture}[nef] + \graph { + input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext]; + integrator -> [bend right, "$-1$"] gate; + integrator -> [recurrent] integrator; + store -> [inhibit] gate; + }; +\end{tikzpicture} +``` + +The following styles are supported: + +* ea: ensemble array +* ens: ensemble +* ext: external input or output +* inhibt: inhibitory connection +* net: network +* pnode: pass-through node +* rect: rectification ensemble +* recurrent: recurrent connection + +## Installation + +While this package is not available in [CTAN](https://ctan.org/) follow these +instruction: + +1. Create the required installation directory (if not already existing): + `mkdir -p "$(kpsewhich -var-value TEXMFHOME)/tex/generic"` +2. `cd "$(kpsewhich -var-value TEXMFHOME)/tex/generic"` +3. `git clone https://github.com/jgosmann/tikz-nef.git` + +## References + +[1]: Chris Eliasmith and Charles H. Anderson. Neural engineering: Computation, + representation, and dynamics in neurobiological systems. MIT Press, + Cambridge, MA, 2003. diff --git a/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex b/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex new file mode 100644 index 00000000000..f91c2015eed --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-nef/example-net.tex @@ -0,0 +1,20 @@ +\RequirePackage{luatex85} +\documentclass{standalone} + +\usepackage{fontspec} + +\usepackage{tikz} +\usetikzlibrary{graphs} +\usetikzlibrary{nef} +\usetikzlibrary{quotes} + +\begin{document} +\begin{tikzpicture}[nef] + \graph { + input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext]; + integrator -> [bend right, "$-1$"] gate; + integrator -> [recurrent] integrator; + store -> [inhibit] gate; + }; +\end{tikzpicture} +\end{document} diff --git a/Master/texmf-dist/doc/latex/tikz-nef/nef.bib b/Master/texmf-dist/doc/latex/tikz-nef/nef.bib new file mode 100644 index 00000000000..0d3c33c2407 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-nef/nef.bib @@ -0,0 +1,16 @@ + +@book{eliasmith2003, + address = {Cambridge, MA}, + title = {Neural Engineering: Computation, Representation, and Dynamics in Neurobiological Systems}, + isbn = {978-0-262-55060-4}, + shorttitle = {Neural {{Engineering}}}, + abstract = {A synthesis of current approaches to adapting engineering tools to the study of neurobiological systems.}, + timestamp = {2017-01-27T23:37:38Z}, + publisher = {{MIT Press}}, + author = {Eliasmith, Chris and Anderson, Charles H.}, + year = {2003}, + keywords = {verified}, + file = {Neural Engineering - Eliasmith, Aug 1 2004.pdf:/Volumes/Home/blubb/Library/Application Support/Zotero/Profiles/b4t24zu4.default/zotero/storage/FCD2HVIA/Neural Engineering - Eliasmith, Aug 1 2004.pdf:application/pdf} +} + + diff --git a/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf Binary files differnew file mode 100644 index 00000000000..c78204e0a74 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.pdf diff --git a/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex new file mode 100644 index 00000000000..319575b0449 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tikz-nef/tikz-nef-doc.tex @@ -0,0 +1,133 @@ +\documentclass{ltxdoc} + +\usepackage{fontspec} + +\GetFileInfo{tikzlibrarynef.code.tex} + +\title{The \textsf{nef} TikZ library\thanks{This document corresponds to \textsf{tikz-nef}~\fileversion, dated~\filedate.}} +\author{Jan Gosmann \\ \texttt{jan@hyper-world.de}} + +\usepackage[backend=biber]{biblatex} +\usepackage{tikz} +\usetikzlibrary{graphs} +\usetikzlibrary{nef} +\usetikzlibrary{quotes} + +\addbibresource{nef.bib} + +\newcommand{\nef}{\emph{nef}} + +\begin{document} +\maketitle +\begin{abstract} + The \nef\ TikZ library provides predefined styles and shapes to create diagrams for neural networks constructed with the methods of the Neural Engineering Framework (NEF)~\cite{eliasmith2003}. +\end{abstract} +\tableofcontents + +\section{Usage} + +To use the \nef\ TikZ library load the \emph{tikz} package and the library with: +\begin{verbatim} + \usepackage{tikz} + \usetikzlibrary{nef} +\end{verbatim} + +\subsection{Global styles} +\paragraph{nef} +This style provides basic general settings like minimum node sizes and arrow tips for the diagrams. It also sets some layout options on for graphs. The style can be applied to the \texttt{tikzpicture} environment or to more narrow scopes. + +\subsection{Node styles and shapes} +\begin{figure} + \centering + \begin{tikzpicture} + \matrix [row sep=4pt, column sep=4pt] { + \node {Style/shape}; & & \node [right] {Usage}; \\ + \node {\texttt{ea}}; & \node [nef,ea] {}; & \node [right] {ensemble array}; \\ + \node {\texttt{ens}}; & \node [nef,ens] {ens}; & \node [right] {ensemble}; \\ + \node {\texttt{ext}}; & \node [nef,ext] {ext}; & \node [right] {external inputs and outputs}; \\ + \node {\texttt{net}}; & \node [nef,net] {net}; & \node [right] {network}; \\ + \node {\texttt{pnode}}; & \node [nef,pnode] {}; & \node [right] {pass-through node}; \\ + \node {\texttt{rect}}; & \node [nef,rect] {}; & \node [right] {rectification ensemble}; \\ + }; + \end{tikzpicture} + \caption{Node styles and shapes.} +\end{figure} + +\paragraph{ea} +Use this style for ensemble arrays. + +\paragraph{ens} +Use this style for single ensembles. + +\paragraph{ext} +Use this style for inputs and outputs external to the displayed network. + +\paragraph{net} +Use this style for networks. + +\paragraph{pnode} +Use this style for pass-through nodes. + +\paragraph{rect} +Use this style for rectification ensembles (i.e., all encoders are 1). + +\subsection{Edge styles} +\begin{figure} + \centering + \begin{tikzpicture} + \matrix [row sep=4pt, column sep=4pt] { + \node {Style}; & & \node [right] {Usage}; \\ + \node {\texttt{inhibit}}; & \draw (-10pt, 0) -- (10pt, 0) [inhibit]; & \node [right] {inhibitory connection}; \\ + \node {\texttt{modulatory}}; & \draw (-10pt, 0) -- (10pt, 0) [modulatory]; & \node [right] {modulatory connection}; \\ + \node {\texttt{recurrent}}; & \node (ens) [nef,ens] {}; \path [nef] (ens) edge [nef,recurrent] (ens) ; & \node [right] {recurrent connection}; \\ + }; + \end{tikzpicture} + \caption{Edge styles.} +\end{figure} + +\paragraph{inhibit} +Use this style for inhibitory connections. + +\paragraph{modulatory} +Use this style for modulatory connections. + +\paragraph{recurrent} +Use this style for recurrent connections. It will add a loop above an ensemble or network. + + + +\section{Examples} + +\subsection{Gated difference integrator (working memory)} +\begin{center} + \begin{tikzpicture}[nef] + \graph { + input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext]; + integrator -> [bend right, "$-1$"] gate; + integrator -> [recurrent] integrator; + store -> [inhibit] gate; + }; + \end{tikzpicture} +\end{center} + +\begin{verbatim} +\usepackage{tikz} +\usetikzlibrary{graphs} +\usetikzlibrary{nef} +\usetikzlibrary{quotes} + +%% .... + +\begin{tikzpicture}[nef] + \graph { + input [ext] -> gate [ens] -> integrator/$x$ [ens] -> output [ext]; + integrator -> [bend right, "$-1$"] gate; + integrator -> [recurrent] integrator; + store -> [inhibit] gate; + }; +\end{tikzpicture} +\end{verbatim} + + +\printbibliography{} +\end{document} |