@Override public Set<VertexComputeKey> getVertexComputeKeys() { return new HashSet<>(Collections.singletonList(VertexComputeKey.of(DEGREE, false))); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of("nameLengthCounter", false)); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of("money", false)); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of("counter", false)); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of(MEMORY_KEY, false)); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of(TraversalVertexProgram.HALTED_TRAVERSERS, false)); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of(MEMORY_KEY, false)); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of("age", false)); }
@Override public void loadState(final Graph graph, final Configuration config) { configuration = new BaseConfiguration(); if (config != null) { ConfigurationUtils.copy(config, configuration); } propertyKey = configuration.getString(PROPERTY_CFG_KEY); traverserRequirements = configuration.getBoolean(USE_TRAVERSER_REQUIREMENTS_CFG_KEY, true) ? Collections.singleton(TraverserRequirement.PATH) : Collections.emptySet(); elementComputeKeys.add(VertexComputeKey.of(propertyKey, false)); }
@Override public void loadState(final Graph graph, final Configuration config) { configuration = new BaseConfiguration(); if (config != null) { ConfigurationUtils.copy(config, configuration); } intermediateBatchSize = configuration.getLong(INTERMEDIATE_BATCH_SIZE_CFG_KEY, 0L); elementComputeKeys.add(VertexComputeKey.of(DEFAULT_BULK_LOADER_VERTEX_ID, true)); bulkLoader = createBulkLoader(); }
@Override public void loadState(final Graph graph, final Configuration configuration) { if (configuration.containsKey(INITIAL_RANK_TRAVERSAL)) this.initialRankTraversal = PureTraversal.loadState(configuration, INITIAL_RANK_TRAVERSAL, graph); if (configuration.containsKey(EDGE_TRAVERSAL)) { this.edgeTraversal = PureTraversal.loadState(configuration, EDGE_TRAVERSAL, graph); this.incidentMessageScope = MessageScope.Local.of(() -> this.edgeTraversal.get().clone()); this.countMessageScope = MessageScope.Local.of(new MessageScope.Local.ReverseTraversalSupplier(this.incidentMessageScope)); } this.alpha = configuration.getDouble(ALPHA, this.alpha); this.epsilon = configuration.getDouble(EPSILON, this.epsilon); this.maxIterations = configuration.getInt(MAX_ITERATIONS, 20); this.property = configuration.getString(PROPERTY, PAGE_RANK); this.vertexComputeKeys = new HashSet<>(Arrays.asList( VertexComputeKey.of(this.property, false), VertexComputeKey.of(EDGE_COUNT, true))); this.memoryComputeKeys = new HashSet<>(Arrays.asList( MemoryComputeKey.of(TELEPORTATION_ENERGY, Operator.sum, true, true), MemoryComputeKey.of(VERTEX_COUNT, Operator.sum, true, true), MemoryComputeKey.of(CONVERGENCE_ERROR, Operator.sum, false, true))); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return new HashSet<>(Arrays.asList( VertexComputeKey.of(shortestPathRecordedAndBroadcasted, true), VertexComputeKey.of(pathFoundButIsNotTheShortest, true), VertexComputeKey.of(srcMsgFromPrevIterations, true), VertexComputeKey.of(destMsgFromPrevIterations, true) )); }
@Override public Set<VertexComputeKey> getVertexComputeKeys() { return Collections.singleton(VertexComputeKey.of("age", false)); }
@Override public void loadState(final Graph graph, final Configuration config) { configuration = new BaseConfiguration(); if (config != null) { ConfigurationUtils.copy(config, configuration); } propertyKey = configuration.getString(PROPERTY_CFG_KEY); traverserRequirements = configuration.getBoolean(USE_TRAVERSER_REQUIREMENTS_CFG_KEY, true) ? Collections.singleton(TraverserRequirement.PATH) : Collections.emptySet(); elementComputeKeys.add(VertexComputeKey.of(propertyKey, false)); }
@Override public void loadState(final Graph graph, final Configuration config) { configuration = new BaseConfiguration(); if (config != null) { ConfigurationUtils.copy(config, configuration); } intermediateBatchSize = configuration.getLong(INTERMEDIATE_BATCH_SIZE_CFG_KEY, 0L); elementComputeKeys.add(VertexComputeKey.of(DEFAULT_BULK_LOADER_VERTEX_ID, true)); bulkLoader = createBulkLoader(); }