1
0
Fork 0
This commit is contained in:
jsteemann 2017-03-16 10:34:09 +01:00
parent a2333a1205
commit 22c86744b2
22 changed files with 22 additions and 22 deletions

View File

@ -154,7 +154,7 @@ struct SCCGraphFormat : public GraphFormat<SCCValue, int8_t> {
const std::string _resultField; const std::string _resultField;
uint64_t vertexIdRange = 0; uint64_t vertexIdRange = 0;
SCCGraphFormat(std::string const& result) : _resultField(result) {} explicit SCCGraphFormat(std::string const& result) : _resultField(result) {}
void willLoadVertices(uint64_t count) override { void willLoadVertices(uint64_t count) override {
// if we aren't running in a cluster it doesn't matter // if we aren't running in a cluster it doesn't matter

View File

@ -47,7 +47,7 @@ namespace algos {
struct AsyncSCC struct AsyncSCC
: public SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>> { : public SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>> {
public: public:
AsyncSCC(VPackSlice userParams) explicit AsyncSCC(VPackSlice userParams)
: SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>>( : SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>>(
"AsyncSCC", userParams) {} "AsyncSCC", userParams) {}

View File

@ -56,7 +56,7 @@ ConnectedComponents::createComputation(WorkerConfig const* config) const {
struct MyGraphFormat : public VertexGraphFormat<int64_t, int64_t> { struct MyGraphFormat : public VertexGraphFormat<int64_t, int64_t> {
uint64_t vertexIdRange = 0; uint64_t vertexIdRange = 0;
MyGraphFormat(std::string const& result) explicit MyGraphFormat(std::string const& result)
: VertexGraphFormat<int64_t, int64_t>(result, 0) {} : VertexGraphFormat<int64_t, int64_t>(result, 0) {}
void willLoadVertices(uint64_t count) override { void willLoadVertices(uint64_t count) override {

View File

@ -36,7 +36,7 @@ namespace algos {
/// doesn't necessarily leads to a correct result on unidirected graphs /// doesn't necessarily leads to a correct result on unidirected graphs
struct ConnectedComponents : public SimpleAlgorithm<int64_t, int64_t, int64_t> { struct ConnectedComponents : public SimpleAlgorithm<int64_t, int64_t, int64_t> {
public: public:
ConnectedComponents(VPackSlice userParams) explicit ConnectedComponents(VPackSlice userParams)
: SimpleAlgorithm("ConnectedComponents", userParams) {} : SimpleAlgorithm("ConnectedComponents", userParams) {}
bool supportsAsyncMode() const override { return true; } bool supportsAsyncMode() const override { return true; }

View File

@ -584,7 +584,7 @@ struct DMIDGraphFormat : public GraphFormat<DMIDValue, float> {
const std::string _resultField; const std::string _resultField;
uint64_t vertexIdRange = 0; uint64_t vertexIdRange = 0;
DMIDGraphFormat(std::string const& result) : _resultField(result) {} explicit DMIDGraphFormat(std::string const& result) : _resultField(result) {}
void willLoadVertices(uint64_t count) override { void willLoadVertices(uint64_t count) override {
// if we aren't running in a cluster it doesn't matter // if we aren't running in a cluster it doesn't matter

View File

@ -34,7 +34,7 @@ namespace algos {
struct DMID struct DMID
: public SimpleAlgorithm<DMIDValue, float, DMIDMessage> { : public SimpleAlgorithm<DMIDValue, float, DMIDMessage> {
public: public:
DMID(VPackSlice userParams) : SimpleAlgorithm<DMIDValue, float, DMIDMessage>( explicit DMID(VPackSlice userParams) : SimpleAlgorithm<DMIDValue, float, DMIDMessage>(
"DMID", userParams) {} "DMID", userParams) {}
GraphFormat<DMIDValue, float>* inputFormat() const override; GraphFormat<DMIDValue, float>* inputFormat() const override;

View File

@ -90,7 +90,7 @@ EffectiveCloseness::createComputation(WorkerConfig const*) const {
struct ECGraphFormat : public GraphFormat<ECValue, int8_t> { struct ECGraphFormat : public GraphFormat<ECValue, int8_t> {
const std::string _resultField; const std::string _resultField;
ECGraphFormat(std::string const& result) : _resultField(result) {} explicit ECGraphFormat(std::string const& result) : _resultField(result) {}
size_t estimatedEdgeSize() const override { return 0; }; size_t estimatedEdgeSize() const override { return 0; };

View File

@ -33,7 +33,7 @@ namespace algos {
/// Effective Closeness /// Effective Closeness
struct EffectiveCloseness : public SimpleAlgorithm<ECValue, int8_t, HLLCounter> { struct EffectiveCloseness : public SimpleAlgorithm<ECValue, int8_t, HLLCounter> {
EffectiveCloseness(VPackSlice params) explicit EffectiveCloseness(VPackSlice params)
: SimpleAlgorithm<ECValue, int8_t, HLLCounter>("EffectiveCloseness", params) {} : SimpleAlgorithm<ECValue, int8_t, HLLCounter>("EffectiveCloseness", params) {}
GraphFormat<ECValue, int8_t>* inputFormat() const override; GraphFormat<ECValue, int8_t>* inputFormat() const override;

View File

@ -103,7 +103,7 @@ HITS::createComputation(WorkerConfig const* config) const {
struct HITSGraphFormat : public GraphFormat<HITSValue, int8_t> { struct HITSGraphFormat : public GraphFormat<HITSValue, int8_t> {
const std::string _resultField; const std::string _resultField;
HITSGraphFormat(std::string const& result) : _resultField(result) {} explicit HITSGraphFormat(std::string const& result) : _resultField(result) {}
size_t estimatedEdgeSize() const override { return 0; }; size_t estimatedEdgeSize() const override { return 0; };

View File

@ -46,7 +46,7 @@ namespace algos {
struct HITS : public SimpleAlgorithm<HITSValue, int8_t, SenderMessage<double>> { struct HITS : public SimpleAlgorithm<HITSValue, int8_t, SenderMessage<double>> {
public: public:
HITS(VPackSlice userParams) explicit HITS(VPackSlice userParams)
: SimpleAlgorithm<HITSValue, int8_t, SenderMessage<double>>("HITS", : SimpleAlgorithm<HITSValue, int8_t, SenderMessage<double>>("HITS",
userParams) {} userParams) {}

View File

@ -107,7 +107,7 @@ struct LPGraphFormat : public GraphFormat<LPValue, int8_t> {
std::string _resultField; std::string _resultField;
uint64_t vertexIdRange = 0; uint64_t vertexIdRange = 0;
LPGraphFormat(std::string const& result) : _resultField(result) {} explicit LPGraphFormat(std::string const& result) : _resultField(result) {}
size_t estimatedVertexSize() const override { return sizeof(LPValue); }; size_t estimatedVertexSize() const override { return sizeof(LPValue); };
size_t estimatedEdgeSize() const override { return 0; }; size_t estimatedEdgeSize() const override { return 0; };

View File

@ -40,7 +40,7 @@ namespace algos {
/// maximum superstep number. /// maximum superstep number.
struct LabelPropagation : public SimpleAlgorithm<LPValue, int8_t, uint64_t> { struct LabelPropagation : public SimpleAlgorithm<LPValue, int8_t, uint64_t> {
public: public:
LabelPropagation(VPackSlice userParams) explicit LabelPropagation(VPackSlice userParams)
: SimpleAlgorithm<LPValue, int8_t, uint64_t>("LabelPropagation", : SimpleAlgorithm<LPValue, int8_t, uint64_t>("LabelPropagation",
userParams) {} userParams) {}

View File

@ -39,7 +39,7 @@ namespace algos {
/// github.com/JananiC/NetworkCentralities/blob/master/src/main/java/linerank/LineRank.java /// github.com/JananiC/NetworkCentralities/blob/master/src/main/java/linerank/LineRank.java
struct LineRank : public SimpleAlgorithm<float, float, float> { struct LineRank : public SimpleAlgorithm<float, float, float> {
public: public:
LineRank(arangodb::velocypack::Slice params); explicit LineRank(arangodb::velocypack::Slice params);
GraphFormat<float, float>* inputFormat() const override { GraphFormat<float, float>* inputFormat() const override {
return new VertexGraphFormat<float, float>(_resultField, -1.0); return new VertexGraphFormat<float, float>(_resultField, -1.0);

View File

@ -34,7 +34,7 @@ namespace algos {
struct PageRank : public SimpleAlgorithm<float, float, float> { struct PageRank : public SimpleAlgorithm<float, float, float> {
uint64_t _maxGSS = 250; uint64_t _maxGSS = 250;
PageRank(arangodb::velocypack::Slice const& params); explicit PageRank(arangodb::velocypack::Slice const& params);
GraphFormat<float, float>* inputFormat() const override { GraphFormat<float, float>* inputFormat() const override {
return new VertexGraphFormat<float, float>(_resultField, 0); return new VertexGraphFormat<float, float>(_resultField, 0);

View File

@ -119,7 +119,7 @@ VertexCompensation<float, float, float>* RecoveringPageRank::createCompensation(
struct RPRMasterContext : public MasterContext { struct RPRMasterContext : public MasterContext {
float _threshold; float _threshold;
RPRMasterContext(VPackSlice params) { explicit RPRMasterContext(VPackSlice params) {
VPackSlice t = params.get("convergenceThreshold"); VPackSlice t = params.get("convergenceThreshold");
_threshold = t.isNumber() ? t.getNumber<float>() : EPS; _threshold = t.isNumber() ? t.getNumber<float>() : EPS;
}; };

View File

@ -32,7 +32,7 @@ namespace algos {
/// PageRank /// PageRank
struct RecoveringPageRank : public SimpleAlgorithm<float, float, float> { struct RecoveringPageRank : public SimpleAlgorithm<float, float, float> {
RecoveringPageRank(arangodb::velocypack::Slice params) explicit RecoveringPageRank(arangodb::velocypack::Slice params)
: SimpleAlgorithm("PageRank", params) {} : SimpleAlgorithm("PageRank", params) {}
bool supportsCompensation() const override { return true; } bool supportsCompensation() const override { return true; }

View File

@ -148,7 +148,7 @@ struct SCCGraphFormat : public GraphFormat<SCCValue, int8_t> {
const std::string _resultField; const std::string _resultField;
uint64_t vertexIdRange = 0; uint64_t vertexIdRange = 0;
SCCGraphFormat(std::string const& result) : _resultField(result) {} explicit SCCGraphFormat(std::string const& result) : _resultField(result) {}
void willLoadVertices(uint64_t count) override { void willLoadVertices(uint64_t count) override {
// if we aren't running in a cluster it doesn't matter // if we aren't running in a cluster it doesn't matter

View File

@ -46,7 +46,7 @@ namespace algos {
struct SCC : public SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>> { struct SCC : public SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>> {
public: public:
SCC(VPackSlice userParams) explicit SCC(VPackSlice userParams)
: SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>>( : SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>>(
"SCC", userParams) {} "SCC", userParams) {}

View File

@ -36,7 +36,7 @@ class SSSPAlgorithm : public Algorithm<int64_t, int64_t, int64_t> {
std::string _sourceDocumentId, _resultField = "result"; std::string _sourceDocumentId, _resultField = "result";
public: public:
SSSPAlgorithm(VPackSlice userParams) : Algorithm("SSSP") { explicit SSSPAlgorithm(VPackSlice userParams) : Algorithm("SSSP") {
if (!userParams.isObject() || !userParams.hasKey("source")) { if (!userParams.isObject() || !userParams.hasKey("source")) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER, THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER,
"You need to specify the source document id"); "You need to specify the source document id");

View File

@ -37,7 +37,7 @@ static std::string const spUpperPathBound = "bound";
struct SPComputation : public VertexComputation<int64_t, int64_t, int64_t> { struct SPComputation : public VertexComputation<int64_t, int64_t, int64_t> {
PregelID _target; PregelID _target;
SPComputation(PregelID const& target) : _target(target) {} explicit SPComputation(PregelID const& target) : _target(target) {}
void compute(MessageIterator<int64_t> const& messages) override { void compute(MessageIterator<int64_t> const& messages) override {
int64_t current = vertexData(); int64_t current = vertexData();
for (const int64_t* msg : messages) { for (const int64_t* msg : messages) {

View File

@ -53,7 +53,7 @@ class InCache {
/// Initialize format and mutex map. /// Initialize format and mutex map.
/// @param config can be null if you don't want locks /// @param config can be null if you don't want locks
InCache(MessageFormat<M> const* format); explicit InCache(MessageFormat<M> const* format);
virtual void _set(PregelShard shard, PregelKey const& vertexId, virtual void _set(PregelShard shard, PregelKey const& vertexId,
M const& data) = 0; M const& data) = 0;

View File

@ -95,7 +95,7 @@ class WorkerThread : public arangodb::Thread {
WorkerThread(WorkerThread const&) = delete; WorkerThread(WorkerThread const&) = delete;
WorkerThread operator=(WorkerThread const&) = delete; WorkerThread operator=(WorkerThread const&) = delete;
WorkerThread(ThreadPool* pool) explicit WorkerThread(ThreadPool* pool)
: Thread(pool->name()), _pool(pool), _status(0) {} : Thread(pool->name()), _pool(pool), _status(0) {}
~WorkerThread() { ~WorkerThread() {