diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-26 19:32:53 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-26 19:32:53 +0200 |
commit | e4a0762c7a2ac3afb8e33bf24fd7495553b5819f (patch) | |
tree | 83d738e242670a4171cd20727f697744d05eaec8 /com/example/portfolio3/AbstractGraph.java | |
parent | 7f93e18b6424b292d4f54fb746aeb6e10b62e76d (diff) |
use Maven idiomatic root path src/main/java
Diffstat (limited to 'com/example/portfolio3/AbstractGraph.java')
-rw-r--r-- | com/example/portfolio3/AbstractGraph.java | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/com/example/portfolio3/AbstractGraph.java b/com/example/portfolio3/AbstractGraph.java deleted file mode 100644 index c2cf433..0000000 --- a/com/example/portfolio3/AbstractGraph.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.example.portfolio3; - -// origin: <https://moodle.ruc.dk/course/section.php?id=211877> - -import java.util.*; - -/// foo -abstract class AbstractGraph implements Graph{ - - /// foo - AbstractGraph() {} - - /// foo - private HashMap<String,Vertex> vertexMap=new HashMap<>(); - - /// foo - private HashSet<Vertex> vertexSet=new HashSet<>(); - - /// foo - /// @param s foo - /// @return Vertex - public Vertex vertex(String s){ - if(vertexMap.containsKey(s))return vertexMap.get(s); - Vertex v=new Vertex(s); - vertexMap.put(s,v); - vertexSet.add(v); - return v; - } - - /// foo - public void insertEdge(String v, String u, int w){ - insertEdge(vertex(v),vertex(u),w); - } - - /// foo - public Collection<Vertex> vertices() { return vertexSet; } - - /// foo - /// @param v1 foo - /// @param v2 foo - /// @param w foo - abstract public void insertEdge(Vertex v1, Vertex v2, int w); - - /// foo - abstract public Collection<Edge> edges(); - - /// foo - abstract public Collection<Edge> outEdge(Vertex v); - - /// foo - abstract public Integer getWeight(Vertex v1, Vertex v2); -} |