#include "network_set.h" void NetworkSet::Clear() { network_by_item_.clear(); } void NetworkSet::AddLink(int id1, int id2) { if (id2 > id1) { // Make sure id1 < id2 std::swap(id1, id2); } if (!network_by_item_.count(id1)) { network_by_item_[id1] = {}; } if (!network_by_item_.count(id2)) { network_by_item_[id2] = {}; } network_by_item_[id1].insert({id1, id2}); network_by_item_[id2].insert({id1, id2}); } bool NetworkSet::IsItemInNetwork(int id) const { return network_by_item_.count(id); } const std::set>& NetworkSet::GetNetworkGraph(int id) const { return network_by_item_.at(id); } ='form'>
Autotracker for the Lingo Archipelago integration
about summary refs log tree commit diff stats
path: root/src/version.cpp
blob: 3b4d5f3cbcd012100d0e58ee38b5fa354f399529 (plain) (blame)
1
2
3
4
5
#include "version.h"

std::ostream& operator<<(std::ostream& out, const Version& ver) {
  return out << "v" << ver.major << "." << ver.minor << "." << ver.revision;
}