Changeset 209:765619b7cbb2 in lemon-main for test/graph_utils_test.cc
- Timestamp:
- 07/13/08 20:51:02 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/graph_utils_test.cc
r171 r209 1 /* -*- C++-*-2 * 3 * This file is a part of LEMON, a generic C++ optimization library 1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 * 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 5 * Copyright (C) 2003-2008 … … 141 141 { 142 142 TEMPLATE_DIGRAPH_TYPEDEFS(Digraph); 143 143 144 144 const int nodeNum = 10; 145 145 const int arcNum = 100; … … 156 156 } 157 157 for (int i = 0; i < nodeNum; ++i) { 158 check(inDeg[nodes[i]] == countInArcs(digraph, nodes[i]), 158 check(inDeg[nodes[i]] == countInArcs(digraph, nodes[i]), 159 159 "Wrong in degree map"); 160 160 } 161 161 for (int i = 0; i < nodeNum; ++i) { 162 check(outDeg[nodes[i]] == countOutArcs(digraph, nodes[i]), 162 check(outDeg[nodes[i]] == countOutArcs(digraph, nodes[i]), 163 163 "Wrong out degree map"); 164 164 } … … 173 173 Node n1=g.addNode(); 174 174 Node n2=g.addNode(); 175 175 176 176 InDegMap<Digraph> ind(g); 177 177 178 178 g.addArc(n1,n2); 179 179 180 180 typename Digraph::Snapshot snap(g); 181 181 182 182 OutDegMap<Digraph> outd(g); 183 183 184 184 check(ind[n1]==0 && ind[n2]==1, "Wrong InDegMap value."); 185 185 check(outd[n1]==1 && outd[n2]==0, "Wrong OutDegMap value.");
Note: See TracChangeset
for help on using the changeset viewer.