How to fix the “invalid comparator” logic problem in this f

How to fix the “invalid comparator” logic problem in this file?… How to fix the “invalid comparator” logic problem in this file?Image transcription texth Solution Explorer (Ctrl+;) Solution ‘Graph’ (1 of 1 project) Microsoft Visual C+ + Runtime Library X + + Graph0-0 References X Debug Assertion Failed! External Dependencies Header Files Program: D:C++Assignment3 DP Ax64DebugGraph.exe Resource Files File: C:Program FilesMicrosoft Visual Source Files… Show more… Show more #include “DirectedGraph.h”#include “set”#include using namespace std;bool DirectedGraph::addVertex(Vertex& v) {   if (find(vertexVector.begin(), vertexVector.end(), v) == vertexVector.end()) {       vertexVector.push_back(v);       return true;   }   return false;}DirectedGraph::DirectedGraph() {}DirectedGraph::~DirectedGraph() {}bool DirectedGraph::removeVertex(Vertex& v) {   auto i = find(vertexVector.begin(), vertexVector.end(), v);   if (i == vertexVector.end()) {       return false;   }   auto it = remove_if(edgeVector.begin(), edgeVector.end(), [=](Edge& e1) {       return e1.getStart() == v || e1.getEnd() == v;       });   for (auto i = edgeVector.end() – 1; i >= it; i–) {       edgeVector.erase(i);   }   vertexVector.erase(i);   return true;} bool DirectedGraph::addEdge(Edge& e) {   if (find(edgeVector.begin(), edgeVector.end(), e) == edgeVector.end()) {       edgeVector.push_back(e);       auto s = e.getStart();       addVertex(s);       addVertex(e.getEnd());       return true;   }   return false;}bool DirectedGraph::remove(Edge& e) {   auto i = find(edgeVector.begin(), edgeVector.end(), e);   if (i == edgeVector.end()) {       return false;   }   edgeVector.erase(i);   return true;}bool DirectedGraph::searchVertex(const Vertex& v) {   return find(vertexVector.begin(), vertexVector.end(), v) != vertexVector.end();}void DirectedGraph::display() const {   cout << toString();}string DirectedGraph::toString() const {   string result;   set vertexs;   for (auto e : edgeVector) {       auto start = e.getStart();       auto& end = e.getEnd();       vertexs.insert(start);       vertexs.insert(end);       result.append(“edge: ” + to_string(start.getId()) + “->” + to_string(end.getId()) + “, weight: ” +           to_string(e.getWeight()) + “n”);   }   result.append(“oraphen node:n”);   for (Vertex v : vertexVector) {       if (find(vertexs.begin(), vertexs.end(), v) == vertexs.end()) {           result.append(“id: ” + to_string(v.getId()) + “,value: ” + to_string(v.getValue()) + “n”);       }   }   return result;}bool DirectedGraph::clean() {   vertexVector.clear();   edgeVector.clear();   return true;}void DirectedGraph::display(Vertex& v) const {   if (find(vertexVector.begin(), vertexVector.end(), v) == vertexVector.end()) {       return;   }   vector history;   this->displayHelper(v, history);}void DirectedGraph::display(Edge& e) const {   if (find(edgeVector.begin(), edgeVector.end(), e) == edgeVector.end()) {       return;   }   vector history = { e.getEnd() };   displayHelper(e.getStart(), history);}bool DirectedGraph::searchEdge(const Edge& e) {   return find(edgeVector.begin(), edgeVector.end(), e) != edgeVector.end();}bool DirectedGraph::addVertices(Vertex* vArray, int size) {   for (int i = 0; i < size; i++) {       addVertex(*(vArray + i));   }   return true;}bool DirectedGraph::addVertices(Vertex* vArray) {   return true;}void DirectedGraph::displayHelper(const Vertex& v, vector history) const {   history.insert(history.begin(), v);   auto compare = [=](auto e) {       return e.getEnd() == v;   };   auto it = find_if(edgeVector.begin(), edgeVector.end(), compare);   if (it == edgeVector.end()) {       // it’s the head, print       displayPath(history);       return;   }   while (it != edgeVector.end()) {       auto vt = it->getStart();       displayHelper(vt, history);       it = find_if(it + 1, edgeVector.end(), compare);   }}void DirectedGraph::displayPath(vector& vv) {   if (vv.empty()) {       return;   }   for (auto it = vv.begin(); it < vv.end() - 1; it++) {       cout << it->getId() << " -> “;   }   cout << (vv.end() - 1)->getId() << endl;}DirectedGraph::DirectedGraph(const DirectedGraph& d) {   edgeVector = d.edgeVector;   vertexVector = d.vertexVector;}bool DirectedGraph::operator==(const DirectedGraph& dg) const {   if ((vertexVector.size() == dg.vertexVector.size()) && (edgeVector.size() == dg.edgeVector.size())) {       for (auto v : dg.vertexVector) {           if (find(vertexVector.begin(), vertexVector.end(), v) == vertexVector.end()) {               return false;           }       }       for (auto &v : dg.edgeVector) {           if (find(edgeVector.begin(), edgeVector.end(), v) == edgeVector.end()) {               return false;           }       }       return true;   }   return false;}DirectedGraph& DirectedGraph::operator=(const DirectedGraph& d) {   if (&d != this) {       this->edgeVector.clear();       for (auto  &e : d.edgeVector) {           edgeVector.push_back(e);       }       this->vertexVector.clear();       for (auto v : d.vertexVector) {           vertexVector.push_back(v);       }   }   return *this;}int DirectedGraph::getTotalWeight(const vector& e) {   int count = 0;   for (auto &e1 : e) {       count += e1.getWeight();   }   return count;}bool DirectedGraph::operator>(const DirectedGraph& dg) const {   return getTotalWeight(edgeVector) > getTotalWeight(dg.edgeVector);}ostream& operator<<(ostream& out, const Graph& g) {   out << g.toString();   return out;}DirectedGraph& DirectedGraph::operator++() {   for (auto& e : edgeVector) {       e.setWeight(e.getWeight() + 1);   }   return *this;}DirectedGraph DirectedGraph::operator++(int) {   auto temp = *this;   ++* this;   return temp;}DirectedGraph operator+(const DirectedGraph& dg1, const DirectedGraph& dg2) {   auto dg3 = dg1;   for (auto v : dg2.vertexVector) {       dg3.addVertex(v);   }   for (auto e : dg2.edgeVector) {       dg3.addEdge(e);   }   return dg3;} Computer Science Engineering & Technology C++ Programming ENGINERING COEN 244

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP