| 1234567891011121314151617181920212223242526272829 |
- \documentclass[varwidth=true, border=2pt]{standalone}
- \usepackage{tikz}
- \tikzstyle{neuron}=[draw,circle,minimum size=20pt,inner sep=0pt, fill=white]
- \tikzstyle{stateTransition}=[very thick]
- \tikzstyle{learned}=[text=red]
- \begin{document}
- \newcommand\n{5}
- \begin{tikzpicture}[scale=1.3]
- \begin{scope}[rotate=17]
- %the multiplication with floats is not possible. Thus I split the loop in two.
- \foreach \number in {1,...,\n}{
- \node[neuron] (N-\number) at ({\number*(360/\n)}:1.5cm) {$x_\number$};
- }
- \foreach \number in {1,...,\n}{
- \foreach \y in {1,...,\n}{
- \draw[stateTransition] (N-\number) -- (N-\y);
- }
- }
- \end{scope}
- \begin{scope}[rotate=-1]
- \draw[learned,stateTransition] (N-1) -- (N-2) node [midway,above=-0.15cm,sloped] {$w_{1,2}$};
- \draw[learned,stateTransition] (N-1) -- (N-5) node [midway,above=-0.15cm,sloped] {$w_{1,5}$};
- \end{scope}
- \end{tikzpicture}
- \end{document}
|