37 #ifndef ADJACENCY_LIST_
38 #define ADJACENCY_LIST_
41 #include <boost/thread/mutex.hpp>
66 int numVertices()
const;
68 bool vertexExists(
int v)
const;
72 bool inSameComponent(
int v1,
int v2)
const;
75 int numConnectedComponents()
const;
77 int getComponentID(
int vtx)
const;
81 bool addEdge(
int v1,
int v2,
double weight = 1.0);
84 bool removeEdge(
int v1,
int v2);
88 double getEdgeWeight(
int v1,
int v2)
const;
90 bool setEdgeWeight(
int v1,
int v2,
double weight);
92 bool edgeExists(
int v1,
int v2)
const;
95 int numNeighbors(
int vtx)
const;
97 void getNeighbors(
int vtx, std::vector<int>& nbrs)
const;
99 void getNeighbors(
int vtx, std::vector<std::pair<int, double> >& nbrs)
const;
102 bool dijkstra(
int v1,
int v2, std::vector<int>& path)
const;
107 void dijkstra(
int vtx, std::vector<int>& predecessors, std::vector<double>& distance)
const;
112 mutable boost::mutex lock_;
118 void* disjointSetsRaw_;