Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IoannisPanagiotas authored and vnickolov committed Nov 23, 2023
1 parent c921596 commit 3460462
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,24 @@ private NodePropertyMutateResult<PageRankSpecificFields> pageRankVariant(
configuration,
shouldComputeCentralityDistribution
);

var specificFields = new PageRankSpecificFields(
result.iterations(),
result.didConverge(),
pageRankDistribution.centralitySummary
);

return NodePropertyMutateResult.<PageRankSpecificFields>builder()
.computeMillis(intermediateResult.computeMilliseconds)
.postProcessingMillis(pageRankDistribution.postProcessingMillis)
.nodePropertiesWritten(addNodePropertyResult.nodePropertiesAdded())
.mutateMillis(addNodePropertyResult.mutateMilliseconds())
.configuration(configuration)
.algorithmSpecificFields(specificFields)
.build();
}).orElseGet(() -> NodePropertyMutateResult.empty(PageRankSpecificFields.EMPTY, configuration));

}
public NodePropertyMutateResult<CELFSpecificFields> celf(
String graphName,
InfluenceMaximizationMutateConfig configuration
Expand Down Expand Up @@ -235,22 +253,7 @@ public NodePropertyMutateResult<CELFSpecificFields> celf(
}


var specificFields = new PageRankSpecificFields(
result.iterations(),
result.didConverge(),
pageRankDistribution.centralitySummary
);

return NodePropertyMutateResult.<PageRankSpecificFields>builder()
.computeMillis(intermediateResult.computeMilliseconds)
.postProcessingMillis(pageRankDistribution.postProcessingMillis)
.nodePropertiesWritten(addNodePropertyResult.nodePropertiesAdded())
.mutateMillis(addNodePropertyResult.mutateMilliseconds())
.configuration(configuration)
.algorithmSpecificFields(specificFields)
.build();
}).orElseGet(() -> NodePropertyMutateResult.empty(PageRankSpecificFields.EMPTY, configuration));
}


private <RESULT extends CentralityAlgorithmResult, CONFIG extends MutateNodePropertyConfig> NodePropertyMutateResult<DefaultCentralitySpecificFields> mutateNodeProperty(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import org.neo4j.gds.core.concurrency.DefaultPool;
import org.neo4j.gds.degree.DegreeCentralityStatsConfig;
import org.neo4j.gds.harmonic.HarmonicCentralityStatsConfig;
import org.neo4j.gds.influenceMaximization.InfluenceMaximizationStatsConfig;
import org.neo4j.gds.pagerank.PageRankResult;
import org.neo4j.gds.pagerank.PageRankStatsConfig;
import org.neo4j.gds.influenceMaximization.InfluenceMaximizationStatsConfig;
import org.neo4j.gds.result.CentralityStatistics;

import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public Stream<MemoryEstimateResult> estimate(
@Name(value = "graphNameOrConfiguration") Object graphNameOrConfiguration,
@Name(value = "algoConfiguration") Map<String, Object> algoConfiguration
) {
return facade.centrality().celfMutateEstimate(graphNameOrConfiguration, algoConfiguration);
return facade.centrality().celfWriteEstimate(graphNameOrConfiguration, algoConfiguration);
}

@Procedure(
Expand Down

0 comments on commit 3460462

Please sign in to comment.