Package esys :: Package escript :: Module util :: Class Cos_Symbol
[show private | hide private]
[frames | no frames]

Type Cos_Symbol

 object --+        
          |        
     Symbol --+    
              |    
DependendSymbol --+
                  |
                 Cos_Symbol


Symbol representing the result of the cosine function
Method Summary
  __init__(self, arg)
initialization of cos Symbol with argument arg
typically Symbol but other types such as float, escript.Data, numarray.NumArray are possible. diff(self, arg)
differential of this object
str getMyCode(self, argstrs, format)
returns a program code that can be used to evaluate the symbol.
escript.Symbol, float, escript.Data, numarray.NumArray depending on the degree of substitution substitute(self, argvals)
assigns new values to symbols in the definition of the symbol.
    Inherited from DependendSymbol
bool __eq__(self, other)
checks if other equals self
bool __ne__(self, other)
checks if other equals self
    Inherited from Symbol
  __abs__(self)
returns a S{Symbol} representing the absolute value of the object.
  __add__(self, other)
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}.
  __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}.
  __getitem__(self, index)
returns the slice defined by 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}.
  __neg__(self)
returns -self.
  __pos__(self)
returns +self.
  __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}.
  __radd__(self, other)
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}.
  __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}.
  __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}.
  __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}.
  __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}.
str __str__(self)
a string representation of the symbol.
  __sub__(self, other)
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}.
a single object or a list of objects getArgument(self, i)
returns the i-th argument of the symbol
list of objects getDifferentiatedArguments(self, arg)
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. getDim(self)
the spatial dimension
int getRank(self)
the rank of the symbol
tuple of int getShape(self)
the shape of the symbol.
list of objects getSubstitutedArguments(self, argvals)
substitutes symbols in the arguments of this object and returns the result as a list.
bool isAppropriateValue(self, arg)
checks if the given argument arg can be used as a substitution of this object.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __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
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Method Details

__init__(self, arg)
(Constructor)

initialization of cos Symbol with argument arg
Parameters:
arg - argument of function
           (type=typically Symbol.)
Overrides:
esys.escript.util.Symbol.__init__

diff(self, arg)

differential of this object
Parameters:
arg - the derivative is calculated with respect to arg
           (type=escript.Symbol)
Returns:
derivative with respect to arg
           (type=typically Symbol but other types such as float, escript.Data, numarray.NumArray are possible.)
Overrides:
esys.escript.util.Symbol.diff

getMyCode(self, argstrs, format='escript')

returns a program code that can be used to evaluate the symbol.
Parameters:
argstrs - gives for each argument a string representing the argument for the evaluation.
           (type=str or a list of length 1 of str.)
format - specifies the format to be used. At the moment only "escript" ,"text" and "str" are supported.
           (type=str)
Returns:
a piece of program code which can be used to evaluate the expression assuming the values for the arguments are available.
           (type=str)
Overrides:
esys.escript.util.Symbol.getMyCode

substitute(self, argvals)

assigns new values to symbols in the definition of the symbol. The method replaces the Symbol u by argvals[u] in the expression defining this object.
Parameters:
argvals - new values assigned to symbols
           (type=dict with keywords of type Symbol.)
Returns:
result of the substitution process. Operations are executed as much as possible.
           (type=escript.Symbol, float, escript.Data, numarray.NumArray depending on the degree of substitution)
Raises:
TypeError - if a value for a Symbol cannot be substituted.
Overrides:
esys.escript.util.Symbol.substitute

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