forked from iowastateuniversity-programanalysis/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraph_Edge.cpp
More file actions
26 lines (25 loc) · 788 Bytes
/
Graph_Edge.cpp
File metadata and controls
26 lines (25 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* @author Ashwin K J
* @file
* Implementing Graph_Edge.hpp
*/
#include "Graph_Edge.hpp"
#include "Graph_Instruction.hpp"
namespace hydrogen_framework {
std::string Graph_Edge::getPrintableEdgeVersions() {
std::string ver;
for (auto v : edgeVersions) {
ver += "V" + std::to_string(v) + ",";
} // End loop for edgeVersions
ver.pop_back();
return ver;
} // End getPrintableEdgeVersions
bool Graph_Edge::isPartOfGraph(unsigned graphVersion) {
auto findVer = std::find_if(std::begin(edgeVersions), std::end(edgeVersions),
[=](unsigned ver) { return (ver == graphVersion); });
if (findVer != edgeVersions.end()) {
return true;
} // End loop for edgeVersions
return false;
} // End isPartOfGraph
} // namespace hydrogen_framework