forked from jainaman224/Algo_Ds_Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Grafo.java
38 lines (29 loc) · 922 Bytes
/
Grafo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package kruskal;
public class Grafo {
private final int numVertices;
private AristContainer aristas;
private final PartitionStructure partitionStructure;
private VerticesSet vertices;
public Grafo(int numVertices) {
this.numVertices = numVertices;
partitionStructure = new PartitionStructure(numVertices);
}
public int getNumVertices() {
return numVertices;
}
public PartitionStructure getPartitionEstructure() {
return partitionStructure;
}
public void addAristsContainer(AristContainer contenedorAristas) {
this.aristas = contenedorAristas;
}
public AristContainer getAristas() {
return aristas;
}
public void addVerticesSet(VerticesSet vertices) {
this.vertices = vertices;
}
public boolean isConexo() {
return vertices.esConexo();
}
}