public class SyntacticContraction extends java.lang.Object implements SyntacticTerm
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 SyntacticTerm
public java.util.List<SyntacticPort> getOutputs()
getOutputs
in interface SyntacticTerm
public int sizeInputs()
sizeInputs
in interface SyntacticTerm
public int sizeOutputs()
sizeOutputs
in interface SyntacticTerm
public SyntacticRank rank()
rank
in interface SyntacticTerm
public java.lang.Integer inputIndex(SyntacticPort port)
inputIndex
in interface SyntacticTerm
port
- Port to find the index of.public java.lang.Integer outputIndex(SyntacticPort port)
outputIndex
in interface SyntacticTerm
port
- 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 SyntacticTerm
public int getOrder()
getOrder
in interface SyntacticTerm
public boolean hasCode()
hasCode
in interface SyntacticTerm
public SyntacticTerm kernel()
public int degree()