1
Fork 0
turbonss/cxxmph/trigraph.cc

25 lines
648 B
C++
Raw Normal View History

2010-10-05 17:51:17 +03:00
#include <limits>
2010-09-10 10:07:06 +03:00
#include "trigraph.h"
2010-10-05 17:51:17 +03:00
using std::vector;
2010-09-10 10:07:06 +03:00
namespace {
2010-10-05 17:51:17 +03:00
static const cmph_uint8 kInvalidEdge = std::numeric_limits<cmph_uint8>::max();
2010-09-10 10:07:06 +03:00
}
TriGraph::TriGraph(cmph_uint32 nedges, cmph_uint32 nvertices)
: nedges_(0),
2010-10-05 17:51:17 +03:00
edges_(nedges),
2010-09-10 10:07:06 +03:00
first_edge_(nvertices, kInvalidEdge),
vertex_degree_(nvertices, 0) { }
2010-10-05 17:51:17 +03:00
void TriGraph::ExtractEdgesAndClear(vector<ConnectedEdge>* edges) {
vector<cmph_uint32>().swap(first_edge_);
vector<cmph_uint8>().swap(vertex_degree_);
2010-09-10 10:07:06 +03:00
nedges_ = 0;
edges->swap(edges_);
}
void TriGraph::AddEdge(const Edge& edge) { }
void TriGraph::RemoveEdge(cmph_uint32 current_edge) { }