Question: A , B , C , D , # 0 1 2 7 1 4 0 8 3 4 2 3 3 0 6 7
ABCD#
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 bidirectional or uni directional. Another will delete bi or uni directional edges. also Write a Ccode for depth and breadth first traversal of this ADT. graph Must use aD array for the graph. The implemention is to be a vector for the vertices and D array for the weightsdistance 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; nodesvertices in graph
public:
Digraph;
~Digraph;
void Digraphreadifstream& inFile;
int getsize;
int VertexdetV& ;
void printDigraph;
void getVertexV& ;
void TwoVerticiesV& 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
