From 6a85265468fae61262efa9a5cebce07f2f05e568 Mon Sep 17 00:00:00 2001 From: "breandan.considine" Date: Tue, 25 Aug 2020 06:28:14 -0400 Subject: [PATCH] update manifests and notebooks again --- kaliningraph.json | 14 +- notebooks/Hello Kaliningraph.ipynb | 723 +++++++++--------- notebooks/Program Graphs.ipynb | 1089 ++++++++++++++-------------- 3 files changed, 909 insertions(+), 917 deletions(-) diff --git a/kaliningraph.json b/kaliningraph.json index cd0a216b..f75a72d0 100644 --- a/kaliningraph.json +++ b/kaliningraph.json @@ -1,6 +1,6 @@ { "properties": { - "kaliningraphVersion": "0.0.7", + "kaliningraphVersion": "0.0.8", "graphvizVersion": "0.16.0", "jgraphtVersion": "1.4.0", "ejmlVersion": "0.39", @@ -27,13 +27,15 @@ ], "imports": [ "edu.mcgill.kaliningraph.*", - "edu.mcgill.kaliningraph.circuits.*" + "edu.mcgill.kaliningraph.circuits.*", + "org.ejml.data.*", + "org.ejml.kotlin.*" ], "renderers": { - "edu.mcgill.kaliningraph.LabeledGraph": "HTML(($it as edu.mcgill.kaliningraph.Graph).html())", - "edu.mcgill.kaliningraph.circuits.Gate": "HTML(($it as edu.mcgill.kaliningraph.Graph).html())", - "edu.mcgill.kaliningraph.circuits.ComputationGraph": "HTML(($it as edu.mcgill.kaliningraph.Graph).html())", - "edu.mcgill.kaliningraph.circuits.NFunction": "HTML(($it as edu.mcgill.kaliningraph.Graph).html())", + "edu.mcgill.kaliningraph.LabeledGraph": "HTML(($it as edu.mcgill.kaliningraph.Graph<*, *, *>).html())", + "edu.mcgill.kaliningraph.circuits.Gate": "HTML(($it as edu.mcgill.kaliningraph.circuits.Gate).graph.html())", + "edu.mcgill.kaliningraph.circuits.NFunction": "HTML(($it as edu.mcgill.kaliningraph.circuits.NFunction).graph.html())", + "edu.mcgill.kaliningraph.circuits.ComputationGraph": "HTML(($it as edu.mcgill.kaliningraph.Graph<*, *, *>).html())", "org.ejml.data.DMatrixSparseCSC": "HTML(\"\")" } } \ No newline at end of file diff --git a/notebooks/Hello Kaliningraph.ipynb b/notebooks/Hello Kaliningraph.ipynb index 23f10946..69b0c8de 100644 --- a/notebooks/Hello Kaliningraph.ipynb +++ b/notebooks/Hello Kaliningraph.ipynb @@ -13,199 +13,177 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [], - "source": [ - "val graph = LabeledGraphBuilder { a - b - c - a }" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", "\n", "\n", "a\n", - "\n", - "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "b\n", - "\n", - "b\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "a->b\n", - "\n", - "\n", + "a->c\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "c\n", - "\n", - "c\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "b->c\n", - "\n", - "\n", + "c->b\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "c->a\n", - "\n", - "\n", + "b->a\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "graph" + "val graph = LabeledGraphBuilder { a - b - c - a }; graph" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "4\n", - "\n", - "4\n", + "3\n", + "\n", + "3\n", "\n", - "\n", + "\n", "\n", - "a\n", - "\n", - "a\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "4->a\n", - "\n", - "\n", + "3->b\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "4->b\n", - "\n", - "\n", + "3->c\n", + "\n", "\n", - "\n", - "\n", - "a->b\n", - "\n", - "\n", + "\n", + "\n", + "a\n", + "\n", + "a\n", "\n", "\n", - "\n", + "\n", "b->a\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", - "\n", - "\n", + "\n", "\n", - "b->c\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "c->a\n", - "\n", - "\n", + "a->c\n", + "\n", + "\n", "\n", "\n", - "\n", + "\n", "c->b\n", - "\n", - "\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "3\n", - "\n", - "3\n", + "4\n", + "\n", + "4\n", "\n", - "\n", - "\n", - "3->a\n", - "\n", - "\n", + "\n", + "\n", + "4->3\n", + "\n", + "\n", "\n", - "\n", - "\n", - "3->b\n", - "\n", - "\n", + "\n", + "\n", + "4->c\n", + "\n", + "\n", + "\n", "\n", "\n", "\n", "5\n", - "\n", - "5\n", + "\n", + "5\n", "\n", - "\n", + "\n", "\n", - "5->a\n", - "\n", - "\n", + "5->3\n", + "\n", + "\n", + "\n", "\n", - "\n", - "\n", - "5->c\n", - "\n", - "\n", + "\n", + "\n", + "5->b\n", + "\n", + "\n", "\n", - "\n", - "\n", - "5->3\n", - "\n", - "\n", + "\n", + "\n", + "5->4\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 4, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -216,16 +194,16 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{a=1107296225, b=1107296225, c=1107296225}" + "{a=187, b=187, c=187}" ] }, - "execution_count": 5, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -236,7 +214,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -245,7 +223,7 @@ "" ] }, - "execution_count": 6, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -256,7 +234,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "metadata": { "scrolled": true }, @@ -264,10 +242,10 @@ { "data": { "text/html": [ - "" + "" ] }, - "execution_count": 7, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -278,52 +256,51 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "aebf1\n", - "\n", - "+\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "a\n", - "\n", - "a\n", + "8acf6\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "aebf1->a\n", - "\n", - "\n", + "a->8acf6\n", + "\n", + "\n", "\n", "\n", "\n", "b\n", - "\n", - "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "aebf1->b\n", - "\n", - "\n", + "b->8acf6\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 8, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -334,7 +311,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -344,76 +321,75 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "64a59\n", - "\n", - "+\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "a\n", - "\n", - "a\n", + "b6c45\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "64a59->a\n", - "\n", - "\n", + "a->b6c45\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "b\n", - "\n", - "b\n", + "b33b8\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "64a59->b\n", - "\n", - "\n", + "b6c45->b33b8\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "f1c41\n", - "\n", - "+\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "f1c41->64a59\n", - "\n", - "\n", + "b->b6c45\n", + "\n", + "\n", "\n", "\n", "\n", "c\n", - "\n", - "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "f1c41->c\n", - "\n", - "\n", + "c->b33b8\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 10, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -424,76 +400,75 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "e67f4\n", - "\n", - "+\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "b\n", - "\n", - "b\n", + "e94e5\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "e67f4->b\n", - "\n", - "\n", + "b->e94e5\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "a\n", - "\n", - "a\n", + "176b8\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "e67f4->a\n", - "\n", - "\n", + "e94e5->176b8\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "3d8c7\n", - "\n", - "+\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "3d8c7->e67f4\n", - "\n", - "\n", + "a->e94e5\n", + "\n", + "\n", "\n", "\n", "\n", "c\n", - "\n", - "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "3d8c7->c\n", - "\n", - "\n", + "c->176b8\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 11, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -504,7 +479,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -513,7 +488,7 @@ "false" ] }, - "execution_count": 12, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -524,7 +499,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -533,7 +508,7 @@ "true" ] }, - "execution_count": 13, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -544,100 +519,99 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "3d8c7\n", - "\n", - "+\n", + "e94e5\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "e67f4\n", - "\n", - "+\n", + "176b8\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "3d8c7->e67f4\n", - "\n", - "\n", + "e94e5->176b8\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "3f65b\n", + "\n", + "*\n", "\n", - "\n", + "\n", "\n", - "3d8c7->c\n", - "\n", - "\n", + "176b8->3f65b\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "e67f4->b\n", - "\n", - "\n", + "c->176b8\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "2\n", + "\n", + "2\n", "\n", - "\n", + "\n", "\n", - "e67f4->a\n", - "\n", - "\n", + "2->3f65b\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "07799\n", - "\n", - "*\n", + "b\n", + "\n", + "b\n", "\n", - "\n", - "\n", - "07799->3d8c7\n", - "\n", - "\n", + "\n", + "\n", + "b->e94e5\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "2\n", - "\n", - "2\n", + "a\n", + "\n", + "a\n", "\n", - "\n", - "\n", - "07799->2\n", - "\n", - "\n", + "\n", + "\n", + "a->e94e5\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 14, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -648,7 +622,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -657,7 +631,7 @@ "false" ] }, - "execution_count": 15, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -668,7 +642,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -677,112 +651,111 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "2d398\n", - "\n", - "2d398\n", + "b4bcb\n", + "\n", + "=\n", "\n", - "\n", + "\n", "\n", - "66281\n", - "\n", - "=\n", + "c8248\n", + "\n", + "c8248\n", "\n", - "\n", + "\n", "\n", - "2d398->66281\n", - "\n", - "\n", + "b4bcb->c8248\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "71fef\n", - "\n", - "*\n", + "768c0\n", + "\n", + "λ\n", "\n", - "\n", + "\n", "\n", - "66281->71fef\n", - "\n", - "\n", + "c8248->768c0\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "b\n", - "\n", - "b\n", + "1\n", + "\n", + "1\n", "\n", - "\n", + "\n", "\n", - "71fef->b\n", - "\n", - "\n", + "1->768c0\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "c\n", - "\n", - "c\n", + "2\n", + "\n", + "2\n", "\n", - "\n", + "\n", "\n", - "71fef->c\n", - "\n", - "\n", + "2->768c0\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "3dcdb\n", - "\n", - "λ\n", + "6a496\n", + "\n", + "*\n", "\n", - "\n", - "\n", - "3dcdb->2d398\n", - "\n", - "\n", + "\n", + "\n", + "6a496->b4bcb\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "1\n", - "\n", - "1\n", + "b\n", + "\n", + "b\n", "\n", - "\n", - "\n", - "3dcdb->1\n", - "\n", - "\n", + "\n", + "\n", + "b->6a496\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "2\n", - "\n", - "2\n", + "c\n", + "\n", + "c\n", "\n", - "\n", - "\n", - "3dcdb->2\n", - "\n", - "\n", + "\n", + "\n", + "c->6a496\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 17, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -793,7 +766,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -802,7 +775,7 @@ "true" ] }, - "execution_count": 18, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } diff --git a/notebooks/Program Graphs.ipynb b/notebooks/Program Graphs.ipynb index 31c1930f..b1d3ba07 100644 --- a/notebooks/Program Graphs.ipynb +++ b/notebooks/Program Graphs.ipynb @@ -2,97 +2,107 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ":: problems summary ::\n", + ":::: ERRORS\n", + "\tSERVER ERROR: Gateway Time-out url=https://dl.bintray.com/egor-bogomolov/astminer/org/eclipse/platform/org.eclipse.core.runtime/\n", + "\n" + ] + } + ], "source": [ "%use kaliningraph" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "417b5\n", - "\n", - "+\n", + "fa5f1\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "1ff39\n", - "\n", - "+\n", + "8870c\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "417b5->1ff39\n", - "\n", - "\n", + "fa5f1->8870c\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "3b827\n", + "\n", + "3b827\n", "\n", - "\n", + "\n", "\n", - "417b5->c\n", - "\n", - "\n", + "8870c->3b827\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "1ff39->a\n", - "\n", - "\n", + "c->8870c\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "1ff39->b\n", - "\n", - "\n", + "a->fa5f1\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "bf499\n", - "\n", - "bf499\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "bf499->417b5\n", - "\n", - "\n", + "b->fa5f1\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 7, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -103,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -112,7 +122,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -121,7 +131,7 @@ "false" ] }, - "execution_count": 9, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -132,88 +142,87 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "dbf22\n", - "\n", - "+\n", + "3f4c2\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "4b268\n", - "\n", - "+\n", + "93e8e\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22->4b268\n", - "\n", - "\n", + "3f4c2->93e8e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "f10e1\n", + "\n", + "f10e1\n", "\n", - "\n", + "\n", "\n", - "dbf22->a\n", - "\n", - "\n", + "93e8e->f10e1\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "4b268->b\n", - "\n", - "\n", + "a->93e8e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "4b268->c\n", - "\n", - "\n", + "b->3f4c2\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "fa04a\n", - "\n", - "fa04a\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "fa04a->dbf22\n", - "\n", - "\n", + "c->3f4c2\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 10, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -224,7 +233,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -233,18 +242,18 @@ "" ] }, - "execution_count": 11, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fun1.toGraph().A" + "fun1.graph.A" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -253,18 +262,18 @@ "true" ] }, - "execution_count": 12, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fun1.toGraph() == fun2.toGraph()" + "fun1.graph == fun2.graph" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -273,165 +282,164 @@ "" ] }, - "execution_count": 13, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fun2.toGraph().A" + "fun2.graph.A" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "fa04a\n", - "\n", - "fa04a\n", + "93e8e\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22\n", - "\n", - "+\n", + "f10e1\n", + "\n", + "f10e1\n", "\n", - "\n", + "\n", "\n", - "fa04a->dbf22\n", - "\n", - "\n", + "93e8e->f10e1\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "4b268\n", - "\n", - "+\n", + "656f2\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22->4b268\n", - "\n", - "\n", + "f10e1->656f2\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "8870c\n", + "\n", + "+\n", "\n", - "\n", - "\n", - "dbf22->a\n", - "\n", - "\n", + "\n", + "\n", + "3b827\n", + "\n", + "3b827\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "8870c->3b827\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "4b268->b\n", - "\n", - "\n", + "3b827->656f2\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "3f4c2\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "4b268->c\n", - "\n", - "\n", + "3f4c2->93e8e\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "bf499\n", - "\n", - "bf499\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", + "\n", + "a->93e8e\n", + "\n", + "\n", + "\n", + "\n", "\n", - "417b5\n", - "\n", - "+\n", + "fa5f1\n", + "\n", + "+\n", "\n", - "\n", - "\n", - "bf499->417b5\n", - "\n", - "\n", + "\n", + "\n", + "a->fa5f1\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "417b5->c\n", - "\n", - "\n", + "fa5f1->8870c\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "1ff39\n", - "\n", - "+\n", + "c\n", + "\n", + "c\n", "\n", - "\n", - "\n", - "417b5->1ff39\n", - "\n", - "\n", + "\n", + "\n", + "c->8870c\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "1ff39->b\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "1ff39->a\n", - "\n", - "\n", + "c->3f4c2\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "a43bf\n", - "\n", - "+\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "a43bf->fa04a\n", - "\n", - "\n", + "b->3f4c2\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "a43bf->bf499\n", - "\n", - "\n", + "b->fa5f1\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 14, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -442,7 +450,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -451,7 +459,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -460,112 +468,111 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "fa04a\n", - "\n", - "fa04a\n", + "93e8e\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22\n", - "\n", - "+\n", + "f10e1\n", + "\n", + "f10e1\n", "\n", - "\n", + "\n", "\n", - "fa04a->dbf22\n", - "\n", - "\n", + "93e8e->f10e1\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "4b268\n", - "\n", - "+\n", + "769d4\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22->4b268\n", - "\n", - "\n", + "f10e1->769d4\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "5\n", + "\n", + "5\n", "\n", - "\n", + "\n", "\n", - "dbf22->a\n", - "\n", - "\n", + "5->769d4\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "3f4c2\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "4b268->b\n", - "\n", - "\n", + "3f4c2->93e8e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "4b268->c\n", - "\n", - "\n", + "a->93e8e\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "cd27b\n", - "\n", - "+\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "cd27b->fa04a\n", - "\n", - "\n", + "b->3f4c2\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "fa45e\n", - "\n", - "5\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "cd27b->fa45e\n", - "\n", - "\n", + "c->3f4c2\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 17, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -576,136 +583,135 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "5c54c\n", - "\n", - "*\n", + "3b827\n", + "\n", + "3b827\n", "\n", - "\n", + "\n", "\n", - "bf499\n", - "\n", - "bf499\n", + "864c3\n", + "\n", + "*\n", "\n", - "\n", + "\n", "\n", - "5c54c->bf499\n", - "\n", - "\n", + "3b827->864c3\n", + "\n", + "\n", "\n", - "\n", - "\n", - "17b4a\n", - "\n", - "3\n", + "\n", + "\n", + "db46e\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "5c54c->17b4a\n", - "\n", - "\n", + "864c3->db46e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "417b5\n", - "\n", - "+\n", + "\n", + "\n", + "3\n", + "\n", + "3\n", "\n", - "\n", + "\n", "\n", - "bf499->417b5\n", - "\n", - "\n", + "3->864c3\n", + "\n", + "\n", "\n", - "\n", - "\n", - "1ff39\n", - "\n", - "+\n", + "\n", + "\n", + "5\n", + "\n", + "5\n", "\n", - "\n", + "\n", "\n", - "417b5->1ff39\n", - "\n", - "\n", + "5->db46e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "8870c\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "417b5->c\n", - "\n", - "\n", + "8870c->3b827\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "fa5f1\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "1ff39->a\n", - "\n", - "\n", + "fa5f1->8870c\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "1ff39->b\n", - "\n", - "\n", + "c->8870c\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "fc07a\n", - "\n", - "+\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "fc07a->5c54c\n", - "\n", - "\n", + "a->fa5f1\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "fbaf7\n", - "\n", - "5\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "fc07a->fbaf7\n", - "\n", - "\n", + "b->fa5f1\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 18, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -716,7 +722,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -725,315 +731,313 @@ "false" ] }, - "execution_count": 19, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "b.toGraph() == a.toGraph()" + "b.graph == a.graph" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{*=-1999601991, 5=156, +=-2024355429, bf499=402653702, 3=156, +=19527988, +=461438, c=156, a=156, b=156}" + "{*=3008, 5=1, +=4000, 3b827=2016, 3=1, +=1985, +=993, c=1, a=1, b=1}" ] }, - "execution_count": 21, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "b.toGraph().wl()" + "b.graph.wl()" ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{fa04a=402653702, 5=156, +=-1999601991, +=19527988, +=461438, a=156, b=156, c=156}" + "{f10e1=2016, 5=1, +=3008, +=1985, +=993, a=1, b=1, c=1}" ] }, - "execution_count": 22, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "a.toGraph().wl()" + "a.graph.wl()" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{+=19527988, bf499=402653702, +=461438, c=156, a=156, b=156}" + "{+=1985, 3b827=2016, +=993, c=1, a=1, b=1}" ] }, - "execution_count": 24, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fun1.toGraph().wl()" + "fun1.graph.wl()" ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{+=19527988, fa04a=402653702, +=461438, a=156, b=156, c=156}" + "{+=1985, f10e1=2016, +=993, a=1, b=1, c=1}" ] }, - "execution_count": 25, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fun2.toGraph().wl()" + "fun2.graph.wl()" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{fa04a=402653702, 0=156, +=-1999601991, +=19527988, +=461438, a=156, b=156, c=156}" + "{f10e1=2016, 0=1, +=3008, +=1985, +=993, a=1, b=1, c=1}" ] }, - "execution_count": 26, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "(fun2 + 0).toGraph().wl()" + "(fun2 + 0).graph.wl()" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "fa04a\n", - "\n", - "fa04a\n", + "93e8e\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22\n", - "\n", - "+\n", + "f10e1\n", + "\n", + "f10e1\n", "\n", - "\n", + "\n", "\n", - "fa04a->dbf22\n", - "\n", - "\n", + "93e8e->f10e1\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "4b268\n", - "\n", - "+\n", + "b2533\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22->4b268\n", - "\n", - "\n", + "f10e1->b2533\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "0\n", + "\n", + "0\n", "\n", - "\n", + "\n", "\n", - "dbf22->a\n", - "\n", - "\n", + "0->b2533\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "3f4c2\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "4b268->b\n", - "\n", - "\n", + "3f4c2->93e8e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "4b268->c\n", - "\n", - "\n", + "a->93e8e\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "37a2d\n", - "\n", - "+\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "37a2d->fa04a\n", - "\n", - "\n", + "b->3f4c2\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "c553e\n", - "\n", - "0\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "37a2d->c553e\n", - "\n", - "\n", + "c->3f4c2\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 27, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "(fun2 + 0).toGraph()" + "(fun2 + 0).graph" ] }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "\n", - "\n", + "\n", + "\n", "%3\n", - "\n", - "\n", + "\n", "\n", - "dbf22\n", - "\n", - "+\n", + "3f4c2\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "4b268\n", - "\n", - "+\n", + "93e8e\n", + "\n", + "+\n", "\n", - "\n", + "\n", "\n", - "dbf22->4b268\n", - "\n", - "\n", + "3f4c2->93e8e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "a\n", - "\n", - "a\n", + "\n", + "\n", + "f10e1\n", + "\n", + "f10e1\n", "\n", - "\n", + "\n", "\n", - "dbf22->a\n", - "\n", - "\n", + "93e8e->f10e1\n", + "\n", + "\n", "\n", - "\n", - "\n", - "b\n", - "\n", - "b\n", + "\n", + "\n", + "a\n", + "\n", + "a\n", "\n", - "\n", + "\n", "\n", - "4b268->b\n", - "\n", - "\n", + "a->93e8e\n", + "\n", + "\n", "\n", - "\n", - "\n", - "c\n", - "\n", - "c\n", + "\n", + "\n", + "b\n", + "\n", + "b\n", "\n", - "\n", + "\n", "\n", - "4b268->c\n", - "\n", - "\n", + "b->3f4c2\n", + "\n", + "\n", "\n", - "\n", + "\n", "\n", - "fa04a\n", - "\n", - "fa04a\n", + "c\n", + "\n", + "c\n", "\n", - "\n", + "\n", "\n", - "fa04a->dbf22\n", - "\n", - "\n", + "c->3f4c2\n", + "\n", + "\n", "\n", "\n", "\n" ] }, - "execution_count": 28, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -1044,16 +1048,16 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "97136706" + "95708209" ] }, - "execution_count": 29, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -1064,16 +1068,16 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "93595536" + "50074510" ] }, - "execution_count": 30, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -1084,10 +1088,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "data": { + "text/html": [ + "" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fun1.graph.ANORM.let { it * it }" + ] } ], "metadata": {