-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding temporal-query specific config which allows disabling temporal scoring for evaluation- and testing-purposes Co-authored-by: Florian Spiess <[email protected]> Former-commit-id: c1bd1ef
- Loading branch information
1 parent
7597ee7
commit 9a042d2
Showing
3 changed files
with
55 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
cineast-api/src/main/java/org/vitrivr/cineast/api/messages/query/TemporalQueryConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.vitrivr.cineast.api.messages.query; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import org.vitrivr.cineast.core.config.QueryConfig; | ||
|
||
public class TemporalQueryConfig extends QueryConfig { | ||
|
||
/** | ||
* List of time distances as floats that can be part of this {@link TemporalQuery}. | ||
*/ | ||
public final List<Float> timeDistances; | ||
|
||
/** | ||
* The max length of the temporal sequences as float that can be part of this {@link TemporalQuery}. | ||
*/ | ||
public final Float maxLength; | ||
|
||
/** | ||
* If set explicitly to false, there will be no temporal aggregation for the temporal queries. This is mainly done for testing or evaluation purposes. | ||
*/ | ||
public final boolean computeTemporalObjects; | ||
|
||
|
||
public TemporalQueryConfig(@JsonProperty(value = "queryId", required = false) String queryId, | ||
@JsonProperty(value = "hints", required = false) List<Hints> hints, | ||
@JsonProperty(value = "timeDistances", required = false) List<Float> timeDistances, | ||
@JsonProperty(value = "maxLength", required = false) Float maxLength, | ||
@JsonProperty(value = "computeTemporalObjects", required = false) Boolean computeTemporalObjects | ||
) { | ||
super(queryId, hints); | ||
this.timeDistances = timeDistances == null ? new ArrayList<>() : timeDistances; | ||
this.maxLength = maxLength == null ? Float.MAX_VALUE : maxLength; | ||
this.computeTemporalObjects = computeTemporalObjects == null || computeTemporalObjects; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters