Package PyFoam :: Package Basics :: Module TimeLineCollection :: Class TimeLineCollection
[hide private]
[frames] | no frames]

Class TimeLineCollection

source code

object --+
         |
        TimeLineCollection

Instance Methods [hide private]
 
__init__(self, deflt=0.0, extendCopy=False, splitThres=None, splitFun=None, accumulation='first')
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
setAccumulator(self, name, accu)
Sets a special accumulator fopr a timeline
source code
 
setSplitting(self, splitThres=None, splitFun=None)
Sets the parameters for splitting
source code
 
setDefault(self, deflt) source code
 
setExtend(self, mode) source code
 
nr(self)
Number of elements in timelines
source code
 
setTime(self, time)
Sets the time.
source code
 
split(self, array, func)
Makes the array smaller by joining every two points
source code
 
getTimes(self)
Returns: A list of the time values
source code
 
getValueNames(self)
Returns: A list with the names of the safed values
source code
 
getValues(self, name)
Gets a timeline
source code
 
setValue(self, name, value)
Sets the value of the last element in a timeline
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  possibleAccumulations = ['first', 'last', 'min', 'max', 'avera...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, deflt=0.0, extendCopy=False, splitThres=None, splitFun=None, accumulation='first')
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • deflt - default value for timelines if none has been defined before
  • extendCopy - Extends the timeline by cpying the last element
  • splitThres - Threshold after which the number of points is halved
  • splitFun - Function that is used for halving. If none is specified the mean function is used
  • accumulation - if more than one value is given at any time-step, how to accumulate them (possible values: "first", "last", "min", "max", "average", "sum")
Overrides: object.__init__

setAccumulator(self, name, accu)

source code 

Sets a special accumulator fopr a timeline

Parameters:
  • name - Name of the timeline
  • accu - Name of the accumulator

setDefault(self, deflt)

source code 
Parameters:
  • deflt - default value to be used

setExtend(self, mode)

source code 
Parameters:
  • mode - whether or not to extend the timeline by copying or setting the default value

setTime(self, time)

source code 

Sets the time. If time is new all the timelines are extended

Parameters:
  • time - the new current time

split(self, array, func)

source code 

Makes the array smaller by joining every two points

Parameters:
  • array - the field to split
  • func - The function to use for joining two points

getTimes(self)

source code 
Returns:
A list of the time values

getValueNames(self)

source code 
Returns:
A list with the names of the safed values

getValues(self, name)

source code 

Gets a timeline

Parameters:
  • name - Name of the timeline
Returns:
List with the values

setValue(self, name, value)

source code 

Sets the value of the last element in a timeline

Parameters:
  • name - name of the timeline
  • value - the last element

Class Variable Details [hide private]

possibleAccumulations

Value:
['first', 'last', 'min', 'max', 'average', 'sum']