Question
In this assignment you will create an undirected graph of actors that has an edge between any two actors that have at least one movie
In this assignment you will create an undirected graph of actors that has an edge between any two actors that have at least one movie in common. The actor, movie data comes from IMDB available with the BRIDGES API. You will be visualizing the graph. In addition, you will also be doing some fun fact finding on this graph!
#include
#include
#include
#include
#include
#include "Bridges.h"
#include "DataSource.h"
#include "data_src/ActorMovieIMDB.h"
#include "GraphAdjList.h"
using namespace std;
using namespace bridges;
string getEnvVar(string const & key);
int main() {
Bridges::initialize(1, getEnvVar("BRIDGESUSERNAME"),
getEnvVar("BRIDGESKEY"));
Bridges::setTitle("Actor Graph: IMDB Data");
vector
DataSource::getActorMovieIMDBData(1800);
// Create a hash table of
// Your code here...
// Create a list of actor names with no duplicates (Hint: Use set
STL)
// Your code herei...
// Fun stuff: Check how many movies has Kevin Bacon acted in
// Your code here...
// Create a GraphAdjList and add vertices corresponding to each
actor
// Your code here...
// For every actor pair, find the movies that they have in common
// If they have movies in common, insert an edge between the two
actor vertices with edge data as number of movies that they have in common
// Your code here...
// Display graph
// Your code here...
// Fun stuff: Find from the graph which actors did Denzel Washinton
co-star with and number of movies they costarred in
// Your code here....
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started