memgraph/storage/vertex_accessor.hpp
Marko Budiselic 763b3a143a demo hack
2016-03-12 20:16:19 +01:00

28 lines
499 B
C++

#pragma once
#include "storage/vertex.hpp"
#include "storage/record_accessor.hpp"
class Vertices;
class Vertex::Accessor : public RecordAccessor<Vertex, Vertices, Vertex::Accessor>
{
public:
using RecordAccessor::RecordAccessor;
size_t out_degree() const
{
return this->record->data.out.degree();
}
size_t in_degree() const
{
return this->record->data.in.degree();
}
size_t degree()
{
return in_degree() + out_degree();
}
};