| Home | Trees | Index | Help |
|---|
| Package esys :: Package escript :: Module util :: Class Symbol |
|
object --+
|
Symbol
DependendSymbolSymbol class.
Symbol class objects provide the same functionality asnumarray.NumArray and escript.Data objects but
they do not have a value and therefore cannot be plotted or visualize.
The main purpose is the possibilty calculate derivatives with respect to
other Symbols used to define a Symbol.
| Method Summary | |
|---|---|
Creates an instance of a symbol of a given shape. | |
returns a S{Symbol} representing the absolute value of the object. | |
add another object to this object @param other: object to be added to this object @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
divides this object by other object @param other: object dividing this object @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
returns the slice defined by index... | |
multiplies this object with other object @param other: object to be mutiplied by this object @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
returns -self. | |
returns +self. | |
raises this object to the power of other @param other: exponent @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
add this object to another object @param other: object this object is added to @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
divides this object by other object @param other: object dividing this object @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
multiplies this object with other object @param other: object this object is multiplied with @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
raises an object to the power of this object @param other: basis @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
subtracts this object from another object @param other: object this object is been subtracted from @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
str
|
a string representation of the symbol. |
subtracts another object from this object @param other: object to be subtracted from this object @type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}. | |
typically escript.Symbol but other types such
as float, escript.Data,
numarray.NumArray are possible.
|
returns the derivative of the symbol with respect to Symbol arg |
| a single object or a list of objects |
returns the i-th argument of the symbol |
list of objects
|
applifies differentials to the arguments of this object and returns the result as a list. |
int if the dimension is defined. Otherwise
None is returned.
|
the spatial dimension |
str
|
returns a program code that can be used to evaluate the symbol. |
int
|
the rank of the symbol |
tuple of int
|
the shape of the symbol. |
list of objects
|
substitutes symbols in the arguments of this object and returns the result as a list. |
bool
|
checks if the given argument arg can be used as a substitution of this object. |
escript.Symbol, float,
escript.Data, numarray.NumArray
depending on the degree of substitution
|
assigns new values to symbols in the definition of the symbol. |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
| Method Details |
|---|
__init__(self,
shape=(),
args=[],
dim=None)
Creates an instance of a symbol of a given shape. The symbol may
depending on a list of arguments args which may be symbols or any other
object.
|
__abs__(self)
returns a S{Symbol} representing the absolute value of the object.
|
__add__(self,
other)
|
__div__(self, other)
divides this object by other object
@param other: object dividing this object
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the quotient of this object and C{other}
@rtype: L{DependendSymbol}
|
__getitem__(self,
index)
|
__mul__(self, other)
multiplies this object with other object
@param other: object to be mutiplied by this object
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the product of the object and C{other}.
@rtype: L{DependendSymbol} or 0 if other is identical to zero.
|
__neg__(self)
returns -self.
@return: a S{Symbol} representing the negative of the object
@rtype: L{DependendSymbol}
|
__pos__(self)
returns +self.
@return: a S{Symbol} representing the positive of the object
@rtype: L{DependendSymbol}
|
__pow__(self, other)
raises this object to the power of other
@param other: exponent
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the power of this object to C{other}
@rtype: L{DependendSymbol} or 1 if C{other} is identical to zero.
|
__radd__(self,
other)
|
__rdiv__(self, other)
divides this object by other object
@param other: object dividing this object
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the quotient of C{other} and this object
@rtype: L{DependendSymbol} or 0 if C{other} is identical to zero.
|
__rmul__(self, other)
multiplies this object with other object
@param other: object this object is multiplied with
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the product of C{other} and the object.
@rtype: L{DependendSymbol} or 0 if other is identical to zero.
|
__rpow__(self, other)
raises an object to the power of this object
@param other: basis
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the power of C{other} to this object
@rtype: L{DependendSymbol} or 0 if C{other} is identical to zero.
|
__rsub__(self, other)
subtracts this object from another object
@param other: object this object is been subtracted from
@type other: L{escript.Symbol}, C{float}, L{escript.Data}, L{numarray.NumArray}.
@return: a S{Symbol} representing the difference of this object and C{other}.
@rtype: L{DependendSymbol}
|
__str__(self)
a string representation of the symbol.
|
__sub__(self,
other)
|
diff(self, arg)returns the derivative of the symbol with respect toSymbol arg
|
getArgument(self, i=None)returns the i-th argument of the symbol
|
getDifferentiatedArguments(self, arg)applifies differentials to the arguments of this object and returns the result as a list.
|
getDim(self)the spatial dimension @return : the spatial dimension
|
getMyCode(self, argstrs, format='escript')returns a program code that can be used to evaluate the symbol.
|
getRank(self)the rank of the symbol
|
getShape(self)the shape of the symbol. @return : the shape of the symbol.
|
getSubstitutedArguments(self, argvals)substitutes symbols in the arguments of this object and returns the result as a list.
|
isAppropriateValue(self, arg)checks if the given argument arg can be used as a substitution of this object. The method checks the shape of arg and, if the spatial dimension is defined, the spatial dimension of arg.
|
substitute(self, argvals)assigns new values to symbols in the definition of the symbol. The method replaces theSymbol u by argvals[u] in the expression
defining this object.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Apr 27 11:16:24 2006 | http://epydoc.sf.net |