master > master: code py - fügte tarjan api hinzu

This commit is contained in:
RD 2022-06-10 16:04:30 +02:00
parent 6920944cdf
commit a83315e3e6
4 changed files with 59 additions and 4 deletions

View File

@ -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 - name: TSP
dist: [ dist: &ref_dist [
[0, 7, 4, 3], [0, 7, 4, 3],
[7, 0, 5, 6], [7, 0, 5, 6],
[2, 5, 0, 5], [2, 5, 0, 5],
[2, 7, 4, 0], [2, 7, 4, 0],
] ]
optimise: MIN optimise: MIN
- name: TSP
dist: *ref_dist
optimise: MAX
# Beispiele für Seminarwoche 10 (Blatt 9) # Beispiele für Seminarwoche 10 (Blatt 9)
- name: HIRSCHBERG - name: HIRSCHBERG
word1: 'happily ever after' word1: 'happily ever after'

View File

@ -6,6 +6,8 @@ info:
ADS2 an der Universität Leipzig (Sommersemester 2022) ADS2 an der Universität Leipzig (Sommersemester 2022)
implementiert. implementiert.
options: options:
tarjan:
verbose: true
tsp: tsp:
verbose: true verbose: true
hirschberg: hirschberg:

View File

@ -37,10 +37,33 @@ components:
type: object type: object
required: required:
- name - name
- nodes
- edges
properties: properties:
<<: *ref_command_properties <<: *ref_command_properties
# required: nodes:
# properties: 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 # Command - Algorithm: TSP
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -51,6 +51,14 @@ components:
- tsp - tsp
- hirschberg - hirschberg
properties: properties:
tarjan:
type: object
required:
- verbose
properties:
verbose:
type: boolean
default: false
tsp: tsp:
type: object type: object
required: required: