diff options
Diffstat (limited to 'sem1/algo/mm9')
-rw-r--r-- | sem1/algo/mm9/Untitled.ipynb | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/sem1/algo/mm9/Untitled.ipynb b/sem1/algo/mm9/Untitled.ipynb deleted file mode 100644 index a2bd59e..0000000 --- a/sem1/algo/mm9/Untitled.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Bare lige noget preamble" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "import networkx as nx\n", - "from networkx.drawing.nx_agraph import to_agraph\n", - "from nxpd import draw, nxpdParams\n", - "from numpy.linalg\n", - "nxpdParams['show'] = 'ipynb'\n", - "import warnings\n", - "warnings.filterwarnings('ignore')\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "G = nx.DiGraph()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "G.add_edge(1, 2)\n", - "G.add_edge(1, 3)\n", - "G.add_node(1)\n", - "G.add_edge(1, 4)\n", - "G.add_edge(1, 4)\n", - "G.add_edge(4, 4)" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAASsAAACbCAYAAAA6Gb11AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO3deVhTZ9oG8PtkIYAsAlYWd1R2N0YUWgVEFhGhYNW6i1pGnS5aHdtp1bbqVMft02q17Uxn3NrRgpdUEFC0ggFHFEE/BXdRYEQWUSugEJI83x/94KoCikryJuH9XZd/NAk5N0/h5pyTswhEROA4jtNtcSLWCTiO41qDlxXHcXqBlxXHcXpBwjoApztUKhXKyspQVlaGBw8eQKVSoaqqCkqlEqamppDJZDAxMUHHjh1hb28Pa2tr1pG5doSXVTv0+PFjZGdn4/z588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FQqXzWUVpSXl9PHH39MJiYm5ObmRmlpaawjvTA+f7YMcf61tbW0c+dOcnR0JEEQWrV2ZW9vT2+88QZNmzaNPvvsM9q9ezcVFha2deRXK6sGxcXFNGPGDJJIJOTs7Ezbt2/X2aN+i4qKaPHixWRmZkadO3emjRs36v2+Bz5/tgxx/iqVihISEhrvBt3S/ipBEGjcuHHaiN42ZdXg2rVrFB0dTUZGRmRtbU0LFizQif0PCoWCEhMTKTw8nMRiMdnZ2dH69euppqaGdbQ2xefPlqHOPyMjg0aNGkWCIJBUKm2yv+qDDz7Q8HdARG1dVg1KS0tp1apV1KtXLwJALi4utGTJEsrOztbaavLDhw/pwIEDNGPGjMbt8JEjR1JsbCzV1dVpJQMrfP5sGer8z5w5Q+PGjSORSNRYWkZGRrRq1ao2Tt+sWIGI6CWuk9UqarUaJ06cwP79+xEfH4/CwkJYWlpi2LBhGDZsGDw9PeHh4fHKt4RXKpW4du0a8vLykJWVhYyMDJw9exZqtRo+Pj4YO3Ysxo4di549e7bNN6Yn+PzZMtT5X79+HevXr8e//vUv1NfXY8eOHZgxY0abvPczxGm0rJ6Wl5eH48ePQy6XIzMzEyUlJQB+u1eYk5MT7Ozs0K1bN3Tu3BmWlpaQyWQwNTWFTCZDVVUVlEolqqqq8PDhQxQXF6OsrAxFRUW4evUqFAoFJBIJXF1d4efnB19fX/j6+jbekYXj82fN0OZfVlaGr776CmFhYXjjjTc0tpz/p92yelplZSUuXLiA/Px8XL9+HaWlpbh9+zbKysrw8OFD1NXVoaamBgqFAmZmZpBKpTA3N4eFhQW6dOkCOzs7dO3aFS4uLnB3d4ebmxvT2xTpGz5/tvj8XwjbsuI4jmulOHZ3X+A4jnsBvKw4jtMLvKw4jtMLEgBxrENwHMc9R9b/AfIyRalrdEg/AAAAAElFTkSuQmCC\n", - "text/plain": [ - "<IPython.core.display.Image object>" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "draw(G)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Okay det ser ud til at virke fint. Nu kan vi printe adjecency matrix." - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[0 1 1 1]\n", - " [0 0 0 0]\n", - " [0 0 0 0]\n", - " [0 0 0 1]]\n" - ] - } - ], - "source": [ - "A = nx.adjacency_matrix(G)\n", - "print(A.todense())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} |