From a83315e3e69bc8cccf8c9064ab7e0f620ebad5c4 Mon Sep 17 00:00:00 2001 From: raj_mathe Date: Fri, 10 Jun 2022 16:04:30 +0200 Subject: [PATCH] =?UTF-8?q?master=20>=20master:=20code=20py=20-=20f=C3=BCg?= =?UTF-8?q?te=20tarjan=20api=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/python/assets/commands.yaml | 26 ++++++++++++++++++++++-- code/python/assets/config.yaml | 2 ++ code/python/models/commands-schema.yaml | 27 +++++++++++++++++++++++-- code/python/models/config-schema.yaml | 8 ++++++++ 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/code/python/assets/commands.yaml b/code/python/assets/commands.yaml index 7da31fa..a098eaf 100644 --- a/code/python/assets/commands.yaml +++ b/code/python/assets/commands.yaml @@ -1,12 +1,34 @@ -## Beispiel für Seminarwoche 9 (Blatt 8) +## Beispiele für Seminarwoche 2 (Blatt 1) +- name: TARJAN + nodes: [1,2,3,4,5,6,7,8] + edges: [ + [1, 2], + [1, 3], + [2, 4], + [2, 5], + [3, 5], + [3, 6], + [3, 8], + [4, 5], + [4, 7], + [5, 1], + [5, 8], + [6, 8], + [7, 8], + [8, 6], + ] +## Beispiele für Seminarwoche 9 (Blatt 8) - name: TSP - dist: [ + dist: &ref_dist [ [0, 7, 4, 3], [7, 0, 5, 6], [2, 5, 0, 5], [2, 7, 4, 0], ] optimise: MIN +- name: TSP + dist: *ref_dist + optimise: MAX # Beispiele für Seminarwoche 10 (Blatt 9) - name: HIRSCHBERG word1: 'happily ever after' diff --git a/code/python/assets/config.yaml b/code/python/assets/config.yaml index 0a3b044..9a09ba5 100644 --- a/code/python/assets/config.yaml +++ b/code/python/assets/config.yaml @@ -6,6 +6,8 @@ info: ADS2 an der Universität Leipzig (Sommersemester 2022) implementiert. options: + tarjan: + verbose: true tsp: verbose: true hirschberg: diff --git a/code/python/models/commands-schema.yaml b/code/python/models/commands-schema.yaml index 7cf1af2..cc27a50 100644 --- a/code/python/models/commands-schema.yaml +++ b/code/python/models/commands-schema.yaml @@ -37,10 +37,33 @@ components: type: object required: - name + - nodes + - edges properties: <<: *ref_command_properties - # required: - # properties: + nodes: + anyOf: + - type: array + items: + type: string + - type: array + items: + type: integer + - type: array + items: + type: number + edges: + type: array + items: + # $ref: '#/components/schemas/Edge' + type: array + minItems: 2 + maxItems: 2 + items: + anyOf: + - type: integer + - type: number + - type: string # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Command - Algorithm: TSP # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/code/python/models/config-schema.yaml b/code/python/models/config-schema.yaml index 00249b7..3ca87dc 100644 --- a/code/python/models/config-schema.yaml +++ b/code/python/models/config-schema.yaml @@ -51,6 +51,14 @@ components: - tsp - hirschberg properties: + tarjan: + type: object + required: + - verbose + properties: + verbose: + type: boolean + default: false tsp: type: object required: