MCPcopy Create free account
hub / github.com/Rishabh062/Hacktoberfest2021 / MyGraph

Method MyGraph

Java/graphs/MyGraph.java:16–21  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

14 String[] vertices;
15 boolean[][] a; //adjacency matrix
16 public MyGraph(String args[]){
17 size=args.length;
18 vertices=new String[size];
19 System.arraycopy(args,0,vertices,0,size);
20 a=new boolean[size][size];
21 }
22 public void add(String v,String w){
23 int i=index(v),j=index(w);
24 a[i][j]=a[j][i]=true;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected