| Home | Trees | Index | Help |
|---|
| Package esys :: Package escript :: Module util :: Class DependendSymbol |
|
object--+ |Symbol--+ | DependendSymbol
Abs_Symbol,
Acos_Symbol,
Acosh_Symbol,
Add_Symbol,
Asin_Symbol,
Asinh_Symbol,
Atan_Symbol,
Atanh_Symbol,
Cos_Symbol,
Cosh_Symbol,
Exp_Symbol,
GeneralTensorProduct_Symbol,
GetSlice_Symbol,
Grad_Symbol,
Integrate_Symbol,
Interpolate_Symbol,
Inverse_Symbol,
Log_Symbol,
Maxval_Symbol,
Minval_Symbol,
Mult_Symbol,
Power_Symbol,
Quotient_Symbol,
Sin_Symbol,
Sinh_Symbol,
Sqrt_Symbol,
Tan_Symbol,
Tanh_Symbol,
Trace_Symbol,
Transpose_Symbol,
WhereNegative_Symbol,
WherePositive_Symbol,
WhereZero_Symbol
DependendSymbol extents L{Symbol} by modifying the == operator to allow two instances to be equal.
Two DependendSymbol are equal if they have the same shape, the same arguments and one of them has an unspecified spatial dimension or the spatial dimension is identical
Example:
u1=Symbol(shape=(3,4),dim=2,args=[4.])
u2=Symbol(shape=(3,4),dim=2,args=[4.])
print u1==u2
False
but
u1=DependendSymbol(shape=(3,4),dim=2,args=[4.])
u2=DependendSymbol(shape=(3,4),dim=2,args=[4.])
u3=DependendSymbol(shape=(2,),dim=2,args=[4.])
print u1==u2, u1==u3
True False
@note: DependendSymbol should be used as return value of functions with L{Symbol} arguments. This will allow the optimizer to remove redundant function calls.
| Method Summary | |
|---|---|
bool
|
checks if other equals self |
bool
|
checks if other equals self |
| Inherited from Symbol | |
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 |
|---|
__eq__(self,
other)
checks if other equals self
|
__ne__(self, other)checks if other equals self
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Apr 27 11:16:11 2006 | http://epydoc.sf.net |