School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,30 @@
package DirectedGraphJava;
import java.util.HashMap;
import java.util.Iterator;
import java.util.ArrayList;
interface IDirectedGraph {
public DirectedGraph reindex();
public Integer numVertices();
public Integer numEdges();
public Iterator<Integer> vertices();
public Iterator<Pair<Pair<Integer,Integer>,Integer>> edges();
public boolean isEdge(Integer v1, Integer v2);
public int inDegree(Integer v);
public int outDegree(Integer v);
public Iterator<Integer> inbounds(Integer v);
public Iterator<Integer> outbounds(Integer v);
public Integer weight(Integer v1, Integer v2);
public void weight(Integer v1, Integer v2, Integer w);
public void addVertex(Integer v);
public void removeVertex(Integer v);
public void addEdge(Integer v1, Integer v2, Integer w);
public void removeEdge(Integer v1, Integer v2);
public HashMap<Integer,Pair<Integer,Integer>> shortestPath(Integer v);
public HashMap<Integer,Pair<Integer,Integer>> shortestPath(Integer v,Integer u);
public HashMap<Pair<Integer,Integer>,Pair<Integer,Integer>> shortestCostDynamic(Integer v1, Integer v2);
public ArrayList<Integer> path(Integer v1,Integer v2);
public ArrayList<Integer> costPathDynamic(Integer v1,Integer v2);
}