diff --git a/Algoritmi_2/Laboratorio/Lab6/.idea/workspace.xml b/Algoritmi_2/Laboratorio/Lab6/.idea/workspace.xml index 4ea9dbc4a764e9041161f159440a3f762bdda554..4357394aeedd13b8bfe26e99b264bed54aa5abaa 100644 --- a/Algoritmi_2/Laboratorio/Lab6/.idea/workspace.xml +++ b/Algoritmi_2/Laboratorio/Lab6/.idea/workspace.xml @@ -7,9 +7,6 @@ <list default="true" id="47e80429-8a37-4045-98c6-d9f72531884e" name="Changes" comment=""> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Test/TestVoli.java" beforeDir="false" afterPath="$PROJECT_DIR$/Test/TestVoli.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/src/Voli.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Voli.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../../Teoria/Grafi_Introduzione.pdf" beforeDir="false" afterPath="$PROJECT_DIR$/../../Teoria/Grafi_Introduzione.pdf" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../../Teoria/Grafi_Introduzione.xopp" beforeDir="false" afterPath="$PROJECT_DIR$/../../Teoria/Grafi_Introduzione.xopp" afterDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -40,37 +37,37 @@ <option name="hideEmptyMiddlePackages" value="true" /> <option name="showLibraryContents" value="true" /> </component> - <component name="PropertiesComponent"><![CDATA[{ - "keyToString": { - "ASKED_ADD_EXTERNAL_FILES": "true", - "Downloaded.Files.Path.Enabled": "false", - "JUnit.TestVoli.daEliminare.executor": "Run", - "JUnit.TestVoli.executor": "Run", - "JUnit.TestVoli.merda.executor": "Run", - "JUnit.TestVoli.testElencoScaliMinimo.executor": "Run", - "JUnit.TestVoli.testPercorsoTempoMinimo.executor": "Run", - "JUnit.TestVoli.testScali.executor": "Run", - "JUnit.TestVoli.testTempoMinimo.executor": "Run", - "Repository.Attach.Annotations": "false", - "Repository.Attach.JavaDocs": "false", - "Repository.Attach.Sources": "false", - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "git-widget-placeholder": "main", - "kotlin-language-version-configured": "true", - "last_opened_file_path": "/home/gianluca/Documents/appunti/Algoritmi_2/Laboratorio/Lab6", - "project.structure.last.edited": "Modules", - "project.structure.proportion": "0.0", - "project.structure.side.proportion": "0.2", - "settings.editor.selected.configurable": "actions.on.save" + <component name="PropertiesComponent">{ + "keyToString": { + "ASKED_ADD_EXTERNAL_FILES": "true", + "Downloaded.Files.Path.Enabled": "false", + "JUnit.TestVoli.daEliminare.executor": "Run", + "JUnit.TestVoli.executor": "Run", + "JUnit.TestVoli.merda.executor": "Run", + "JUnit.TestVoli.testElencoScaliMinimo.executor": "Run", + "JUnit.TestVoli.testPercorsoTempoMinimo.executor": "Run", + "JUnit.TestVoli.testScali.executor": "Run", + "JUnit.TestVoli.testTempoMinimo.executor": "Run", + "Repository.Attach.Annotations": "false", + "Repository.Attach.JavaDocs": "false", + "Repository.Attach.Sources": "false", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "git-widget-placeholder": "main", + "kotlin-language-version-configured": "true", + "last_opened_file_path": "/home/gianluca/Documents/appunti/Algoritmi_2/Laboratorio/Lab6", + "project.structure.last.edited": "Modules", + "project.structure.proportion": "0.0", + "project.structure.side.proportion": "0.2", + "settings.editor.selected.configurable": "actions.on.save" } -}]]></component> +}</component> <component name="RecentsManager"> <key name="CopyFile.RECENT_KEYS"> <recent name="$PROJECT_DIR$/Test" /> </key> </component> - <component name="RunManager" selected="JUnit.TestVoli"> + <component name="RunManager" selected="JUnit.TestVoli.testPercorsoTempoMinimo"> <configuration name="TestVoli" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> <module name="Lab6" /> <option name="PACKAGE_NAME" value="" /> @@ -122,10 +119,10 @@ </configuration> <recent_temporary> <list> + <item itemvalue="JUnit.TestVoli.testPercorsoTempoMinimo" /> <item itemvalue="JUnit.TestVoli" /> <item itemvalue="JUnit.TestVoli.testElencoScaliMinimo" /> <item itemvalue="JUnit.TestVoli.merda" /> - <item itemvalue="JUnit.TestVoli.testPercorsoTempoMinimo" /> <item itemvalue="JUnit.TestVoli.daEliminare" /> </list> </recent_temporary> diff --git a/Algoritmi_2/Laboratorio/Lab6/Test/TestVoli.java b/Algoritmi_2/Laboratorio/Lab6/Test/TestVoli.java index 90abae66aae78efc6937dcb269b62b93f39345c1..b69a506c246223a7e26a891aa24fd4ff9959c824 100644 --- a/Algoritmi_2/Laboratorio/Lab6/Test/TestVoli.java +++ b/Algoritmi_2/Laboratorio/Lab6/Test/TestVoli.java @@ -105,8 +105,14 @@ public class TestVoli { percTempMin = testVoli.trattaVeloce(0, 1); assertEquals(1, percTempMin.size()); assertEquals(percTempMin.getFirst(), new Edge(0, 1)); + + //Da sistemare, devi partire dal fondo e tenere solo quelli uguali + graph = new DirectedGraph("8;0 1 1; 1 2 1; 2 3 1; 4 3 2; 0 4 15; 0 5 0; 5 6 0; 6 7 0"); + testVoli = new Voli(graph); + percTempMin = testVoli.trattaVeloce(0, 3); + System.out.println(percTempMin); } - + @Test public void testElencoScaliMinimo() { DirectedGraph graph = new DirectedGraph("3;0 1 3;0 2 6;1 2 1"); diff --git a/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.pdf b/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e2f53f43c4951f09ece55b8f58993756cd9b3317 Binary files /dev/null and b/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.pdf differ diff --git a/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.xopp b/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.xopp index 0745b691e3f75da555300c0311ca24026b913505..16ebf0bee2e8ddbf442d1a6f78ad288511a43d65 100644 Binary files a/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.xopp and b/Algoritmi_2/Teoria/Minimo_Albero_Ricoprente.xopp differ