Skip to content

Commit

Permalink
Remove validation that is not needed anymoer
Browse files Browse the repository at this point in the history
  • Loading branch information
IoannisPanagiotas committed Aug 30, 2024
1 parent f05db97 commit 79c624c
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,6 @@ public MutateStub<PageRankMutateConfig, PageRankMutateResult> eigenVectorMutateS
}

public Stream<PageRankStatsResult> eigenvectorStats(String graphName, Map<String, Object> configuration) {
validateKeyNotPresent(configuration, "dampingFactor");

var shouldComputeSimilarityDistribution = procedureReturnColumns.contains("centralityDistribution");
var resultBuilder = new PageRankResultBuilderForStatsMode(shouldComputeSimilarityDistribution);
Expand All @@ -864,7 +863,6 @@ public Stream<MemoryEstimateResult> eigenvectorStatsEstimate(
Object graphNameOrConfiguration,
Map<String, Object> algorithmConfiguration
) {
validateKeyNotPresent(algorithmConfiguration, "dampingFactor");

var result = estimationMode.runEstimation(
algorithmConfiguration,
Expand All @@ -876,7 +874,6 @@ public Stream<MemoryEstimateResult> eigenvectorStatsEstimate(
}

public Stream<CentralityStreamResult> eigenvectorStream(String graphName, Map<String, Object> configuration) {
validateKeyNotPresent(configuration, "dampingFactor");

var resultBuilder = new PageRankResultBuilderForStreamMode();

Expand All @@ -893,7 +890,6 @@ public Stream<MemoryEstimateResult> eigenvectorStreamEstimate(
Object graphNameOrConfiguration,
Map<String, Object> algorithmConfiguration
) {
validateKeyNotPresent(algorithmConfiguration, "dampingFactor");

var result = estimationMode.runEstimation(
algorithmConfiguration,
Expand All @@ -905,7 +901,6 @@ public Stream<MemoryEstimateResult> eigenvectorStreamEstimate(
}

public Stream<PageRankWriteResult> eigenvectorWrite(String graphName, Map<String, Object> configuration) {
validateKeyNotPresent(configuration, "dampingFactor");

var shouldComputeCentralityDistribution = procedureReturnColumns.contains("centralityDistribution");
var resultBuilder = new PageRankResultBuilderForWriteMode(shouldComputeCentralityDistribution);
Expand All @@ -923,7 +918,6 @@ public Stream<MemoryEstimateResult> eigenvectorWriteEstimate(
Object graphNameOrConfiguration,
Map<String, Object> algorithmConfiguration
) {
validateKeyNotPresent(algorithmConfiguration, "dampingFactor");

var result = estimationMode.runEstimation(
algorithmConfiguration,
Expand Down Expand Up @@ -1060,9 +1054,4 @@ public Stream<MemoryEstimateResult> pageRankWriteEstimate(
return Stream.of(result);
}

private void validateKeyNotPresent(Map<String, Object> configuration, String key) {
if (configuration.containsKey(key)) {
throw new IllegalArgumentException("Unexpected configuration key: " + key);
}
}
}

0 comments on commit 79c624c

Please sign in to comment.