예제 #1
0
	def __init__(self, start_time, end_time, *args, **kwargs):
		'''
		@param start_time: The file start time.
		@param end_time: The file end time.
		'''
		TimeSeriesData.__init__(self, start_time, end_time, *args, **kwargs)
		BiDirectionalLookupNonTerminalNode.__init__(self, None, *args, **kwargs)
		self._tiers_by_name = bidict()
예제 #2
0
	def __init__(self, tgf, tier_class, start_time, end_time, *args, **kwargs):
		'''
		@param tgf: The TextGridFile object the Tier has been added to.
	 	@param tier_class: The tier class.
	 	@param start_time: The tier start time.
	 	@param end_time: The tier end time.
		@param args: Any optional positional arguments.
		@param kwargs: Any optional keyword arguments.
		'''
		TimeSeriesData.__init__(self, start_time, end_time)
		BiDirectionalLookupNonTerminalNode.__init__(self, tgf,*args, **kwargs)
		self._tier_class = tier_class
		
		self.__partial_hash = self.__calculate_partial_hash()
예제 #3
0
	def __ne__(self, other):
		if self is other:
			return False
		if not isinstance(other, self.__class__):
			return True
		
		return (self.start_time != other.start_time or self.end_time != other.end_time or BiDirectionalLookupNonTerminalNode.__ne__(self, other) or self._tiers_by_name != other._tiers_by_name)
예제 #4
0
	def __eq__(self, other):
		if self is other:
			return True
		if not isinstance(other, self.__class__):
			return False
		
		return (self.start_time == other.start_time and self.end_time == other.end_time and self._tier_class == other.tier_class and BiDirectionalLookupNonTerminalNode.__eq__(self, other))