hey guys im very new to programming and i have this program which i do not understand at all. i would appreciate if some1 could help me with it. I have the skeleton code but i do not know what to do. its regarding minimum spanning tree.
class Weighted_graph {
private:
static const double INF;
// your choice
public:
Weighted_graph( int = 50 );
~Weighted_graph();
int degree( int ) const;//Returns the degree of the vertex n. Throw an illegal argument exception if the argument does not correspond to an existing vertex.
int edge_count() const;//Returns the number of edges in the graph.
double adjacent( int, int ) const;//Returns the weight of the edge connecting vertices m and n. If the vertices are equal, return 0. If the vertices are not adjacent, return infinity. Throw an illegal argument exception if the arguments do not correspond to existing vertices.
double minimum_spanning_tree( int ) const;//Return the size of the minimum spanning tree of those nodes which are connected to vertex m. Throw an illegal argument exception if the arguments do not correspond to existing vertices.
bool is_connected() const;//Determine if the graph is connected.
void insert( int, int, double );//If the weight w < 0 or w = ∞, throw an illegal argument exception. If the weight w is 0, remove any edge between m and n (if any). Otherwise, add an edge between vertices m and n with weight w. If an edge already exists, replace the weight of the edge with the new weight. If the vertices do not exist or are equal, throw an illegal argument exception.