Nektar++
Public Member Functions | Public Attributes | List of all members
CellMLToNektar.optimize.ExpressionMatcher.N Class Reference
Inheritance diagram for CellMLToNektar.optimize.ExpressionMatcher.N:
[legend]

Public Member Functions

def __init__ (self, value=None)
 
def match (self, expr)
 
def match (self, expr)
 

Public Attributes

 value
 

Detailed Description

A constant number, optionally with the value specified.

Definition at line 1377 of file optimize.py.

Constructor & Destructor Documentation

◆ __init__()

def CellMLToNektar.optimize.ExpressionMatcher.N.__init__ (   self,
  value = None 
)

Definition at line 1379 of file optimize.py.

1379 def __init__(self, value=None):
1380 self.value = value
1381

Member Function Documentation

◆ match()

def CellMLToNektar.optimize.ExpressionMatcher.N.match (   self,
  expr 
)
Method implemented by concrete subclasses to test a given expression.
Returns True iff there is a match.

Reimplemented from CellMLToNektar.optimize.ExpressionMatcher.Pattern.

Definition at line 1382 of file optimize.py.

1382 def match(self, expr):
1383 matched = False
1384 if isinstance(expr, mathml_cn):
1385 value = expr.evaluate()
1386 if self.value is None:
1387 self.value = value
1388 if self.value == value:
1389 matched = True
1390 return matched
1391
1392 class X(Pattern):

References ModuleTypeProxy< InputModule >.value, ModuleTypeProxy< ProcessModule >.value, ModuleTypeProxy< OutputModule >.value, boost::python::detail::value_is_shared_ptr< X_ >.value, Nektar::CountedObject< DerivedType >.value, Nektar::UnitTests::PointTestClass.value(), Nektar::UnitTests::VectorTestClass.value(), CellMLToNektar.optimize.ExpressionMatcher.N.value, and CellMLToNektar.validator.ValidatorError.value.

Member Data Documentation

◆ value

CellMLToNektar.optimize.ExpressionMatcher.N.value