blob: 18a1a44e44048b609604e7a1a4b349b316f4fd49 [file] [log] [blame]
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2011-2015 Regents of the University of California.
Alexander Afanasyevad3757f2012-04-17 10:27:59 -07004 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08005 * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
6 * contributors.
Alexander Afanasyevad3757f2012-04-17 10:27:59 -07007 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -08008 * ndnSIM is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070011 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -080012 * ndnSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070015 *
Alexander Afanasyev60a7b622014-12-20 17:04:07 -080016 * You should have received a copy of the GNU General Public License along with
17 * ndnSIM, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 **/
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070019
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070020#ifndef BOOST_GRAPH_NDN_GLOBAL_ROUTING_HELPER_H
21#define BOOST_GRAPH_NDN_GLOBAL_ROUTING_HELPER_H
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070022
Alexander Afanasyev6315ef72012-06-01 20:56:31 -070023/// @cond include_hidden
24
Spyridon Mastorakis53e922f2014-10-17 17:29:26 -070025#include "ns3/ndnSIM/model/ndn-common.hpp"
26
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070027#include <boost/graph/graph_traits.hpp>
28#include <boost/graph/properties.hpp>
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -070029#include <boost/ref.hpp>
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070030
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -080031#include "ns3/ndnSIM/model/ndn-face.hpp"
32#include "ns3/ndnSIM/model/ndn-global-router.hpp"
33
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070034#include "ns3/node-list.h"
35#include "ns3/channel-list.h"
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -080036
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070037#include <list>
38#include <map>
39
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070040namespace boost {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070041
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080042class NdnGlobalRouterGraph {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070043public:
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080044 typedef ns3::Ptr<ns3::ndn::GlobalRouter> Vertice;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070045 typedef uint16_t edge_property_type;
46 typedef uint32_t vertex_property_type;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070047
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080048 NdnGlobalRouterGraph()
49 {
50 for (ns3::NodeList::Iterator node = ns3::NodeList::Begin(); node != ns3::NodeList::End();
51 node++) {
52 ns3::Ptr<ns3::ndn::GlobalRouter> gr = (*node)->GetObject<ns3::ndn::GlobalRouter>();
53 if (gr != 0)
54 m_vertices.push_back(gr);
55 }
56
57 for (ns3::ChannelList::Iterator channel = ns3::ChannelList::Begin();
58 channel != ns3::ChannelList::End(); channel++) {
59 ns3::Ptr<ns3::ndn::GlobalRouter> gr = (*channel)->GetObject<ns3::ndn::GlobalRouter>();
60 if (gr != 0)
61 m_vertices.push_back(gr);
62 }
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070063 }
64
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080065 const std::list<Vertice>&
66 GetVertices() const
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070067 {
68 return m_vertices;
69 }
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080070
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070071public:
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080072 std::list<Vertice> m_vertices;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070073};
74
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080075class ndn_global_router_graph_category : public virtual vertex_list_graph_tag,
76 public virtual incidence_graph_tag {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070077};
78
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070079template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080080struct graph_traits<NdnGlobalRouterGraph> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070081 // Graph concept
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070082 typedef NdnGlobalRouterGraph::Vertice vertex_descriptor;
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070083 typedef ns3::ndn::GlobalRouter::Incidency edge_descriptor;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070084 typedef directed_tag directed_category;
85 typedef disallow_parallel_edge_tag edge_parallel_category;
Alexander Afanasyev4aac5572012-08-09 10:49:55 -070086 typedef ndn_global_router_graph_category traversal_category;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070087
88 // VertexList concept
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080089 typedef std::list<vertex_descriptor>::const_iterator vertex_iterator;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070090 typedef size_t vertices_size_type;
91
92 // AdjacencyGraph concept
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -070093 typedef ns3::ndn::GlobalRouter::IncidencyList::iterator out_edge_iterator;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -070094 typedef size_t degree_size_type;
95
96 // typedef size_t edges_size_type;
97};
98
99} // namespace boost
100
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800101namespace boost {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700102
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800103inline graph_traits<NdnGlobalRouterGraph>::vertex_descriptor
104source(graph_traits<NdnGlobalRouterGraph>::edge_descriptor e, const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700105{
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800106 return std::get<0>(e);
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700107}
108
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800109inline graph_traits<NdnGlobalRouterGraph>::vertex_descriptor
110target(graph_traits<NdnGlobalRouterGraph>::edge_descriptor e, const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700111{
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800112 return std::get<2>(e);
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700113}
114
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800115inline std::pair<graph_traits<NdnGlobalRouterGraph>::vertex_iterator,
116 graph_traits<NdnGlobalRouterGraph>::vertex_iterator>
117vertices(const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700118{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800119 return make_pair(g.GetVertices().begin(), g.GetVertices().end());
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700120}
121
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800122inline graph_traits<NdnGlobalRouterGraph>::vertices_size_type
123num_vertices(const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700124{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800125 return g.GetVertices().size();
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700126}
127
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800128inline std::pair<graph_traits<NdnGlobalRouterGraph>::out_edge_iterator,
129 graph_traits<NdnGlobalRouterGraph>::out_edge_iterator>
130out_edges(graph_traits<NdnGlobalRouterGraph>::vertex_descriptor u, const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700131{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800132 return std::make_pair(u->GetIncidencies().begin(), u->GetIncidencies().end());
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700133}
134
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800135inline graph_traits<NdnGlobalRouterGraph>::degree_size_type
136out_degree(graph_traits<NdnGlobalRouterGraph>::vertex_descriptor u, const NdnGlobalRouterGraph& g)
137{
138 return u->GetIncidencies().size();
139}
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700140
141//////////////////////////////////////////////////////////////
142// Property maps
143
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800144struct EdgeWeights {
145 EdgeWeights(const NdnGlobalRouterGraph& graph)
146 : m_graph(graph)
147 {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700148 }
149
150private:
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800151 const NdnGlobalRouterGraph& m_graph;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700152};
153
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800154struct VertexIds {
155 VertexIds(const NdnGlobalRouterGraph& graph)
156 : m_graph(graph)
157 {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700158 }
159
160private:
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800161 const NdnGlobalRouterGraph& m_graph;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700162};
163
164template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800165struct property_map<NdnGlobalRouterGraph, edge_weight_t> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700166 typedef const EdgeWeights const_type;
167 typedef EdgeWeights type;
168};
169
170template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800171struct property_map<NdnGlobalRouterGraph, vertex_index_t> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700172 typedef const VertexIds const_type;
173 typedef VertexIds type;
174};
175
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700176template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800177struct property_traits<EdgeWeights> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700178 // Metric property map
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800179 typedef std::tuple<std::shared_ptr<nfd::Face>, uint16_t, double> value_type;
180 typedef std::tuple<std::shared_ptr<nfd::Face>, uint16_t, double> reference;
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -0700181 typedef ns3::ndn::GlobalRouter::Incidency key_type;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700182 typedef readable_property_map_tag category;
183};
184
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800185const property_traits<EdgeWeights>::value_type WeightZero(0, 0, 0.0);
186const property_traits<EdgeWeights>::value_type
187 WeightInf(0, std::numeric_limits<uint16_t>::max(), 0.0);
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700188
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800189struct WeightCompare : public std::binary_function<property_traits<EdgeWeights>::reference,
190 property_traits<EdgeWeights>::reference, bool> {
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700191 bool
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800192 operator()(std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double> a,
193 std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double> b) const
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700194 {
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800195 return std::get<1>(a) < std::get<1>(b);
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700196 }
197
198 bool
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800199 operator()(property_traits<EdgeWeights>::reference a, uint32_t b) const
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700200 {
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800201 return std::get<1>(a) < b;
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700202 }
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800203
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700204 bool
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800205 operator()(uint32_t a, uint32_t b) const
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700206 {
207 return a < b;
208 }
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700209};
210
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800211struct WeightCombine
212 : public std::binary_function<uint32_t, property_traits<EdgeWeights>::reference, uint32_t> {
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700213 uint32_t
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800214 operator()(uint32_t a, property_traits<EdgeWeights>::reference b) const
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700215 {
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800216 return a + std::get<1>(b);
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700217 }
218
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800219 std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double>
220 operator()(std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double> a,
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800221 property_traits<EdgeWeights>::reference b) const
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700222 {
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800223 if (std::get<0>(a) == 0)
224 return std::make_tuple(std::get<0>(b), std::get<1>(a) + std::get<1>(b),
225 std::get<2>(a) + std::get<2>(b));
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700226 else
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800227 return std::make_tuple(std::get<0>(a), std::get<1>(a) + std::get<1>(b),
228 std::get<2>(a) + std::get<2>(b));
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700229 }
230};
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800231
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700232template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800233struct property_traits<VertexIds> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700234 // Metric property map
235 typedef uint32_t value_type;
236 typedef uint32_t reference;
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800237 typedef ns3::Ptr<ns3::ndn::GlobalRouter> key_type;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700238 typedef readable_property_map_tag category;
239};
240
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700241inline EdgeWeights
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800242get(edge_weight_t, const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700243{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800244 return EdgeWeights(g);
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700245}
246
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700247inline VertexIds
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800248get(vertex_index_t, const NdnGlobalRouterGraph& g)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700249{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800250 return VertexIds(g);
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700251}
252
Alexander Afanasyeva5abcd92012-04-17 13:34:43 -0700253template<class M, class K, class V>
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700254inline void
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800255put(reference_wrapper<M> mapp, K a, V p)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700256{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800257 mapp.get()[a] = p;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700258}
259
260// void
Alexander Afanasyev2b4c9472012-08-09 15:00:38 -0700261// put (cref< std::map< ns3::Ptr<ns3::ndn::GlobalRouter>, ns3::Ptr<ns3::ndn::GlobalRouter> > > map,
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700262
Alexander Afanasyevb2a11fe2012-12-12 11:38:39 -0800263inline uint32_t
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800264get(const boost::VertexIds&, ns3::Ptr<ns3::ndn::GlobalRouter>& gr)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700265{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800266 return gr->GetId();
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700267}
268
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800269inline property_traits<EdgeWeights>::reference
270get(const boost::EdgeWeights&, ns3::ndn::GlobalRouter::Incidency& edge)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700271{
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800272 if (std::get<1>(edge) == 0)
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800273 return property_traits<EdgeWeights>::reference(0, 0, 0.0);
274 else {
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800275 return property_traits<EdgeWeights>::reference(std::get<1>(edge),
276 static_cast<uint16_t>(
277 std::get<1>(edge)->getMetric()),
278 0.0);
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800279 }
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700280}
281
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800282struct PredecessorsMap
283 : public std::map<ns3::Ptr<ns3::ndn::GlobalRouter>, ns3::Ptr<ns3::ndn::GlobalRouter>> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700284};
285
286template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800287struct property_traits<reference_wrapper<PredecessorsMap>> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700288 // Metric property map
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800289 typedef ns3::Ptr<ns3::ndn::GlobalRouter> value_type;
290 typedef ns3::Ptr<ns3::ndn::GlobalRouter> reference;
291 typedef ns3::Ptr<ns3::ndn::GlobalRouter> key_type;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700292 typedef read_write_property_map_tag category;
293};
294
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800295struct DistancesMap : public std::map<ns3::Ptr<ns3::ndn::GlobalRouter>,
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800296 std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double>> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700297};
298
299template<>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800300struct property_traits<reference_wrapper<DistancesMap>> {
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700301 // Metric property map
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800302 typedef std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double> value_type;
303 typedef std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double> reference;
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800304 typedef ns3::Ptr<ns3::ndn::GlobalRouter> key_type;
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700305 typedef read_write_property_map_tag category;
306};
307
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800308inline std::tuple<std::shared_ptr<nfd::Face>, uint32_t, double>
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800309get(DistancesMap& map, ns3::Ptr<ns3::ndn::GlobalRouter> key)
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700310{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -0800311 boost::DistancesMap::iterator i = map.find(key);
312 if (i == map.end())
Spyridon Mastorakis60f4b992014-11-07 15:51:38 -0800313 return std::tuple<std::shared_ptr<nfd::Face>, uint32_t,
314 double>(0, std::numeric_limits<uint32_t>::max(), 0.0);
Alexander Afanasyevad3757f2012-04-17 10:27:59 -0700315 else
316 return i->second;
317}
318
319} // namespace boost
320
Alexander Afanasyev6315ef72012-06-01 20:56:31 -0700321/// @endcond
322
Alexander Afanasyev4aac5572012-08-09 10:49:55 -0700323#endif // BOOST_GRAPH_NDN_GLOBAL_ROUTING_HELPER_H