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;
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 {
// if we aren't running in a cluster it doesn't matter

View File

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

View File

@ -56,7 +56,7 @@ ConnectedComponents::createComputation(WorkerConfig const* config) const {
struct MyGraphFormat : public VertexGraphFormat<int64_t, int64_t> {
uint64_t vertexIdRange = 0;
MyGraphFormat(std::string const& result)
explicit MyGraphFormat(std::string const& result)
: VertexGraphFormat<int64_t, int64_t>(result, 0) {}
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
struct ConnectedComponents : public SimpleAlgorithm<int64_t, int64_t, int64_t> {
public:
ConnectedComponents(VPackSlice userParams)
explicit ConnectedComponents(VPackSlice userParams)
: SimpleAlgorithm("ConnectedComponents", userParams) {}
bool supportsAsyncMode() const override { return true; }

View File

@ -584,7 +584,7 @@ struct DMIDGraphFormat : public GraphFormat<DMIDValue, float> {
const std::string _resultField;
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 {
// if we aren't running in a cluster it doesn't matter

View File

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

View File

@ -90,7 +90,7 @@ EffectiveCloseness::createComputation(WorkerConfig const*) const {
struct ECGraphFormat : public GraphFormat<ECValue, int8_t> {
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; };

View File

@ -33,7 +33,7 @@ namespace algos {
/// Effective Closeness
struct EffectiveCloseness : public SimpleAlgorithm<ECValue, int8_t, HLLCounter> {
EffectiveCloseness(VPackSlice params)
explicit EffectiveCloseness(VPackSlice params)
: SimpleAlgorithm<ECValue, int8_t, HLLCounter>("EffectiveCloseness", params) {}
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> {
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; };

View File

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

View File

@ -107,7 +107,7 @@ struct LPGraphFormat : public GraphFormat<LPValue, int8_t> {
std::string _resultField;
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 estimatedEdgeSize() const override { return 0; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -148,7 +148,7 @@ struct SCCGraphFormat : public GraphFormat<SCCValue, int8_t> {
const std::string _resultField;
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 {
// 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>> {
public:
SCC(VPackSlice userParams)
explicit SCC(VPackSlice userParams)
: SimpleAlgorithm<SCCValue, int8_t, SenderMessage<uint64_t>>(
"SCC", userParams) {}

View File

@ -36,7 +36,7 @@ class SSSPAlgorithm : public Algorithm<int64_t, int64_t, int64_t> {
std::string _sourceDocumentId, _resultField = "result";
public:
SSSPAlgorithm(VPackSlice userParams) : Algorithm("SSSP") {
explicit SSSPAlgorithm(VPackSlice userParams) : Algorithm("SSSP") {
if (!userParams.isObject() || !userParams.hasKey("source")) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_BAD_PARAMETER,
"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> {
PregelID _target;
SPComputation(PregelID const& target) : _target(target) {}
explicit SPComputation(PregelID const& target) : _target(target) {}
void compute(MessageIterator<int64_t> const& messages) override {
int64_t current = vertexData();
for (const int64_t* msg : messages) {

View File

@ -53,7 +53,7 @@ class InCache {
/// Initialize format and mutex map.
/// @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,
M const& data) = 0;

View File

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