public class SyntacticContraction extends java.lang.Object implements SyntacticTerm
| Red |
| Red (shaver) |
| Constructor and Description |
|---|
SyntacticContraction(int degree)
Makes a new contraction operator with a given constant degree.
|
| Modifier and Type | Method and Description |
|---|---|
int |
degree()
Get the degree of the term.
|
java.lang.String |
generateCode()
Generate the lexical representation of the contraction.
|
java.util.List<SyntacticPort> |
getInputs()
Get a list of the input ports to the operator.
|
int |
getOrder()
Get the sort order of the term.
|
java.util.List<SyntacticPort> |
getOutputs()
Get a list of output ports to the operator.
|
boolean |
hasCode()
Decide whether code can be generated from this term.
|
java.lang.Integer |
inputIndex(SyntacticPort port)
Get the index of an input port given a reference to it.
|
SyntacticTerm |
kernel()
Get the reference to the kernel of the operator.
|
java.lang.Integer |
outputIndex(SyntacticPort port)
Get the index of an output port given a reference to it.
|
SyntacticRank |
rank()
Get the rank of the term.
|
boolean |
setKernel(SyntacticTerm term)
Set the kernel of the operator, effectively making it a term.
|
int |
sizeInputs()
Get the number of inputs to the term.
|
int |
sizeOutputs()
Get the number of outputs from the term.
|
public SyntacticContraction(int degree)
degree - Degree of the operator.public java.util.List<SyntacticPort> getInputs()
getInputs in interface SyntacticTermpublic java.util.List<SyntacticPort> getOutputs()
getOutputs in interface SyntacticTermpublic int sizeInputs()
sizeInputs in interface SyntacticTermpublic int sizeOutputs()
sizeOutputs in interface SyntacticTermpublic SyntacticRank rank()
rank in interface SyntacticTermpublic java.lang.Integer inputIndex(SyntacticPort port)
inputIndex in interface SyntacticTermport - Port to find the index of.public java.lang.Integer outputIndex(SyntacticPort port)
outputIndex in interface SyntacticTermport - Port to find the index of.public boolean setKernel(SyntacticTerm term)
term - Term to contract with operator.public java.lang.String generateCode()
generateCode in interface SyntacticTermpublic int getOrder()
getOrder in interface SyntacticTermpublic boolean hasCode()
hasCode in interface SyntacticTermpublic SyntacticTerm kernel()
public int degree()