Package esys :: Package escript :: Module modelframe :: Class ParameterSet
[show private | hide private]
[frames | no frames]

Type ParameterSet

    object --+    
             |    
LinkableObject --+
                 |
                ParameterSet

Known Subclasses:
EvaluateExpression, FinleyReader, GaussianProfile, GravityForce, InterpolatedTimeProfile, InterpolateOverBox, MaterialTable, Model, RectangularDomain, ScalarConstrainer, SimpleEarthModel, VectorConstrainer

A class which allows to emphazise attributes to be written and read to XML

Leaves of an ESySParameters object can be: Example how to create an ESySParameters object:
   p11=ParameterSet(gamma1=1.,gamma2=2.,gamma3=3.)
   p1=ParameterSet(dim=2,tol_v=0.001,output_file="/tmp/u.%3.3d.dx",runFlag=True,parm11=p11) 
   parm=ParameterSet(parm1=p1,parm2=ParameterSet(alpha=Link(p11,"gamma1")))
This can be accessed as:
   parm.parm1.gamma=0.
   parm.parm1.dim=2
   parm.parm1.tol_v=0.001
   parm.parm1.output_file="/tmp/u.%3.3d.dx"
   parm.parm1.runFlag=True
   parm.parm1.parm11.gamma1=1.
   parm.parm1.parm11.gamma2=2.
   parm.parm1.parm11.gamma3=3.
   parm.parm2.alpha=1. (value of parm.parm1.parm11.gamma1)

Method Summary
  __init__(self, parameters, **kwargs)
Creates a ParameterSet with parameters parameters.
  __delattr__(self, name)
Removes the attribute name.
  __iter__(self)
Creates an iterator over the parameter and their values.
  __repr__(self)
  declareParameter(self, **parameters)
Declares a new parameter(s) and its (their) initial value.
  declareParameters(self, parameters)
Declares a set of parameters.
  fromDom(cls, doc)
(Class method)
  releaseParameters(self, name)
Removes parameter name from the paramameters.
  showParameters(self)
Returns a descrition of the parameters.
  toDom(self, document, node)
toDom method of ParameterSet class.
  writeXML(self, ostream)
Writes the object as an XML object into an output stream.
    Inherited from LinkableObject
  __getattr__(self, name)
Returns the value of attribute name.
  __setattr__(self, name, value)
Sets the value for attribute name.
  getAttributeObject(self, name)
Return the object stored for attribute name.
  hasAttribute(self, name)
Returns True if self as attribute name.
  trace(self, msg)
If debugging is on, print the message, otherwise do nothing
    Inherited from object
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
    Inherited from LinkableObject
count number_sequence = <itertools.count object at 0x401ff100>

Instance Method Details

__init__(self, parameters=[], **kwargs)
(Constructor)

Creates a ParameterSet with parameters parameters.
Overrides:
esys.escript.modelframe.LinkableObject.__init__

__delattr__(self, name)

Removes the attribute name.
Overrides:
esys.escript.modelframe.LinkableObject.__delattr__

__iter__(self)

Creates an iterator over the parameter and their values.

declareParameter(self, **parameters)

Declares a new parameter(s) and its (their) initial value.

declareParameters(self, parameters)

Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.

releaseParameters(self, name)

Removes parameter name from the paramameters.

showParameters(self)

Returns a descrition of the parameters.

toDom(self, document, node)

toDom method of ParameterSet class.

writeXML(self, ostream=<epydoc.imports._DevNull instance at 0x402244cc>)

Writes the object as an XML object into an output stream.

Generated by Epydoc 2.1 on Thu Apr 27 11:16:23 2006 http://epydoc.sf.net