public class OperationSymbol extends java.lang.Object implements java.lang.Comparable<OperationSymbol>
Modifier and Type | Field and Description |
---|---|
static OperationSymbol |
IDENTITY |
static OperationSymbol |
INVERSE |
static OperationSymbol |
JOIN |
static OperationSymbol |
MEET |
static OperationSymbol |
PRODUCT |
Constructor and Description |
---|
OperationSymbol(java.lang.String name,
int arity) |
OperationSymbol(java.lang.String name,
int arity,
boolean assoc) |
Modifier and Type | Method and Description |
---|---|
int |
arity()
This gives the arity of this operation.
|
int |
compareTo(OperationSymbol sym)
This puts high arity operations first.
|
boolean |
equals(java.lang.Object obj) |
static OperationSymbol |
getOperationSymbol(int arity)
Get an OperationSymbol in a uniform manner so that algebras that
can be similar will be.
|
int |
hashCode() |
boolean |
isAssociative()
A binary operation symbol can be marked as associative to allow
for a more compact representation and better printing of terms
containing it.
|
java.lang.String |
name() |
void |
setAssociative(boolean assoc) |
java.lang.String |
toString() |
java.lang.String |
toString(boolean showArity) |
public static final OperationSymbol JOIN
public static final OperationSymbol MEET
public static final OperationSymbol PRODUCT
public static final OperationSymbol INVERSE
public static final OperationSymbol IDENTITY
public OperationSymbol(java.lang.String name, int arity)
public OperationSymbol(java.lang.String name, int arity, boolean assoc)
public int arity()
public java.lang.String name()
public boolean isAssociative()
public void setAssociative(boolean assoc)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean showArity)
public static OperationSymbol getOperationSymbol(int arity)
HashMap
- map a map from Integer's to int[1]'s, the value will
be modified.public int compareTo(OperationSymbol sym)
compareTo
in interface java.lang.Comparable<OperationSymbol>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright 2003 Ralph Freese. All Rights Reserved.