Add more functions for synthetic env

This commit is contained in:
D-X-Y
2021-05-13 15:32:44 +08:00
parent c925cf1969
commit a2b1d0d227
7 changed files with 307 additions and 1 deletions

View File

@@ -55,6 +55,10 @@ class SyntheticDEnv(data.Dataset):
def timestamp_interval(self):
return self._timestamp_generator.interval
def get_timestamp(self, index):
index, timestamp = self._timestamp_generator[index]
return timestamp
def set_oracle_map(self, functor):
self._oracle_map = functor

View File

@@ -60,7 +60,7 @@ class TimeStamp(UnifiedSplit, data.Dataset):
@property
def max_timestamp(self):
return self._max_timestamp
@property
def interval(self):
return self._interval