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., extendCopy=False, splitThres=None, splitFun=None, accumulation="first")
  setSplitting(self, splitThres=None, splitFun=None)
Sets the parameters for splitting
  setDefault(self, deflt)
  setExtend(self, mode)
  nr(self)
Number of elements in timelines
  setTime(self, time)
Sets the time.
  split(self, array, func)
Makes the array smaller by joining every two points
  getTimes(self)
  getValueNames(self)
  getValues(self, name)
Gets a timeline
  setValue(self, name, value)
Sets the value of the last element in a timeline

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


Class Variables [hide private]
  possibleAccumulations = ['first', 'last', 'min', 'max', 'average']

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, deflt=0., extendCopy=False, splitThres=None, splitFun=None, accumulation="first")
(Constructor)

source code 
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")
Overrides: object.__init__

setSplitting(self, splitThres=None, splitFun=None)

source code 
Sets the parameters for splitting

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

nr(self)

source code 
Number of elements in timelines

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

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