NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
remove-loops.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
21 #ifndef LFID_REMOVE_LOOPS_H
22 #define LFID_REMOVE_LOOPS_H
23 
24 #include <boost/graph/adjacency_list.hpp>
25 
26 #include "ns3/ndnSIM/helper/lfid/abstract-fib.hpp"
27 
28 namespace ns3 {
29 namespace ndn {
30 
31 // No Vertex Property
32 // Edge Property: Weight.
33 using DiGraph =
34  boost::adjacency_list<boost::listS, boost::vecS, boost::bidirectionalS, boost::no_property,
35  boost::property<boost::edge_weight_t, int>>;
36 
37 void
38 getDigraphFromFib(DiGraph& dg, const AbstractFib::AllNodeFib& allNodeFIB, const int dstId);
39 
40 int
41 removeLoops(AbstractFib::AllNodeFib& allNodeFIB, bool printOutput = true);
42 
43 int
44 removeDeadEnds(AbstractFib::AllNodeFib& allNodeFIB, bool printOutput = true);
45 
46 } // namespace ndn
47 } // namespace ns3
48 
49 #endif //LFID_REMOVE_LOOPS_H
Copyright (c) 2011-2015 Regents of the University of California.
int removeLoops(AllNodeFib &allNodeFIB, bool printOutput)
void getDigraphFromFib(DiGraph &dg, const AllNodeFib &allNodeFIB, const int dstId)
Fill directed graph only with edges existing in the FIB.
int removeDeadEnds(AllNodeFib &allNodeFIB, bool printOutput)
std::unordered_map< int, AbstractFib > AllNodeFib
Copyright (c) 2011-2015 Regents of the University of California.
boost::adjacency_list< boost::listS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::property< boost::edge_weight_t, int > > DiGraph