Question: A , B , C , D , # 0 1 2 7 1 4 0 8 3 4 2 3 3 0 6 7

A,B,C,D,#
0127
140834
23306
77460
Write c++ code of different function where one function will read and print the matrix from a .txt file. Another function will show the vertex present in the matrix or not. Another will give output is the graph is bi-directional or uni directional. Another will delete bi or uni -directional edges. also Write a C++code for depth and breadth first traversal of this ADT. graph .Must use a2-D array for the graph. The implemention is to be a vector for the vertices and 2-D array for the weights/distance. The graph must be templated and include data attributes. Also provide the output. You need to write complete definition of those function and also are bound to use those library.
#include
#include
#include
#include
#include
#include
#include
template< typename V, typename W >
class Digraph
{
private:
int vertices; //number of vertices in graph
Y** graph; //THE graph
vector Numvertices; //nodes/vertices in graph
public:
Digraph();
~Digraph();
void Digraphread(ifstream& inFile);
int getsize();
int Vertexdet(V& );
void printDigraph();
void getVertex(V& );
void TwoVerticies(V& , V& );
void mST ()
};
use stack and queue for depth and breadth first. write c++ code for determine the minimum spanning tree and also need to find the wight and also display who is connect to whom. . you can use vector. Do not use limit. You only allow to use Vector.
Thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!