public Graph() {
        edges = new DynamicArray();
        vertices = new DynamicArray();
        adjacencyList = new AdjacencyList();
        directed = false;
        hasNegativeWeights = false;
    }