How do you implement the following graph ADT in c++ ? (WITH STRINGS) all functions take strings ● Graph constructor ● Gr

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

How do you implement the following graph ADT in c++ ? (WITH STRINGS) all functions take strings ● Graph constructor ● Gr

Post by answerhappygod »

How do you implement the following graph ADT in c++ ?
(WITH STRINGS)
all functions take strings
● Graph constructor
● Graph deconstructor
● e.endVertices(): a list of the two end vertices of e● e.opposite(v): the vertex opposite of v on e● u.isAdjacentTo(v): true if and only if u and v are adjacent● *v: reference to element associated with vertex v● *e: reference to element associated with edge eUpdate methods:● insertVertex(o): insert a vertex storing element o● insertEdge(v, w, o): insert an edge (v, w) storing element o● eraseVertex(v): remove vertex v (and its incident edges)● eraseEdge(e): remove edge eIterable collection methods:● incidentEdges(v): list of edges incident to v● adjacentVertices(v): lists all vertices that share an edge from the vertex v● vertices(): list of all vertices in the graph● edges(): list of all edges in the graph
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply