public class SyntacticRank
extends java.lang.Object
Red |
Red (shaver) |
Constructor and Description |
---|
SyntacticRank(int fi,
int fo)
Construct a new forward rank.
|
SyntacticRank(int fo,
int ro,
int fi,
int ri)
Construct a new rank.
|
Modifier and Type | Method and Description |
---|---|
static SyntacticRank |
add(SyntacticRank a,
SyntacticRank b)
Add the two ranks if possible, else return null.
|
static SyntacticRank |
add(SyntacticTerm a,
SyntacticTerm b)
Add the ranks of two terms.
|
static SyntacticRank |
compose(SyntacticRank a,
SyntacticRank b)
Compose two ranks if possible, else return null.
|
static SyntacticRank |
compose(SyntacticTerm a,
SyntacticTerm b)
Compose the ranks of two terms.
|
static SyntacticRank |
contract(SyntacticRank a,
int n)
Contract rank about a given number of input/output pairs.
|
SyntacticRank |
copy()
Copy a rank.
|
int |
forwardIn()
Get the forward input rank.
|
int |
forwardOut()
Get the forward output rank.
|
java.lang.String |
generateCode()
Generate code representation of rank.
|
static java.lang.String |
noCode()
Generate code representation for no rank information.
|
SyntacticRank |
product(SyntacticRank a)
Multiply with a given rank.
|
static SyntacticRank |
product(SyntacticRank a,
SyntacticRank b)
Multiply two ranks.
|
static SyntacticRank |
product(SyntacticTerm a,
SyntacticTerm b)
Multiply the ranks of two terms.
|
SyntacticRank |
quotent(SyntacticRank a)
Divide by given rank.
|
int |
reverseIn()
Get the reverse input rank.
|
int |
reverseOut()
Get the reverse output rank.
|
public SyntacticRank(int fo, int ro, int fi, int ri)
fo
- Forward output rank.ro
- Reverse output rank.fi
- Forward input rank.ri
- Reverse input rank.public SyntacticRank(int fi, int fo)
fo
- Forward output rank.fi
- Forward input rank.public SyntacticRank copy()
public int forwardOut()
public int reverseOut()
public int forwardIn()
public int reverseIn()
public java.lang.String generateCode()
public static java.lang.String noCode()
public static SyntacticRank compose(SyntacticRank a, SyntacticRank b)
a
- First rank.b
- Second rank.public static SyntacticRank compose(SyntacticTerm a, SyntacticTerm b)
a
- First term.b
- Second term.compose(ptolemy.cg.lib.syntactic.SyntacticRank, ptolemy.cg.lib.syntactic.SyntacticRank)
public static SyntacticRank add(SyntacticRank a, SyntacticRank b)
a
- First rank.b
- Second rank.public static SyntacticRank add(SyntacticTerm a, SyntacticTerm b)
a
- First term.b
- Second term.add(SyntacticRank, SyntacticRank)
public static SyntacticRank product(SyntacticRank a, SyntacticRank b)
a
- First rank.b
- Second rank.public static SyntacticRank product(SyntacticTerm a, SyntacticTerm b)
a
- First term.b
- Second term.public static SyntacticRank contract(SyntacticRank a, int n)
a
- Rank to contract.n
- Number of contractions.public SyntacticRank product(SyntacticRank a)
a
- Rank to multiply by.product(SyntacticRank, SyntacticRank)
public SyntacticRank quotent(SyntacticRank a)
a
- Divisor rank.product(SyntacticRank, SyntacticRank)