Class Signature.Pat
java.lang.Object
com.singularsys.extensions.lambda.Signature
com.singularsys.extensions.lambda.Signature.InnerSig
com.singularsys.extensions.lambda.Signature.Pat
- Enclosing class:
Signature
A Signature representing a pattern
{u,v} .-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.extensions.lambda.Signature
Signature.InnerSig, Signature.ListSig, Signature.OuterSig, Signature.Pat, Signature.PVbl, Signature.Vbl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Signature.InnerSig sig) Add a signature to the list.protected voidcalculateArgs(Object ele, List<Object> args) Convert an input arguments to a list of arguments matching the pattern in this signatureprotected voidcalculateArgs(Stack<Object> stack, List<Object> args) Convert arguments on the stack to a list of arguments matching the pattern in this signaturegetSigs()Return a list of signaturesbooleanisSimple()Simple signatures likexor[x,y,z]protected booleanprotected booleanbooleanintsize()Number of element in a compound signaturetoString()Methods inherited from class com.singularsys.extensions.lambda.Signature
calcInnerSig, calcSig
-
Constructor Details
-
Pat
public Pat()
-
-
Method Details
-
add
Add a signature to the list.- Parameters:
sig- signature to add
-
getSigs
Description copied from class:SignatureReturn a list of signatures- Specified by:
getSigsin classSignature.InnerSig- Returns:
- either a list or an empty list
-
isSimple
public boolean isSimple()Description copied from class:SignatureSimple signatures likexor[x,y,z] -
size
public int size()Description copied from class:SignatureNumber of element in a compound signature -
calculateArgs
Description copied from class:SignatureConvert arguments on the stack to a list of arguments matching the pattern in this signature- Specified by:
calculateArgsin classSignature- Parameters:
stack- input arguments to the functionargs- output list of values matching the variables in the signature- Throws:
EvaluationException- on error
-
calculateArgs
Description copied from class:Signature.InnerSigConvert an input arguments to a list of arguments matching the pattern in this signature- Specified by:
calculateArgsin classSignature.InnerSig- Parameters:
ele- input argument, typically aVector<Object>,VectorIorMatrixI. Nested vectors are extracted recursively.args- output list of values matching the variables in the signature- Throws:
EvaluationException- if the input argument does not match the pattern in this signature
-
toString
-
match
-
match
-
matchN
-