org.uacalc.alg.op
Class SimilarityType

java.lang.Object
  extended by org.uacalc.alg.op.SimilarityType

public class SimilarityType
extends java.lang.Object

A set of OperationSymbol's.


Field Summary
static SimilarityType GROUP_SIMILARITY_TYPE
           
static SimilarityType LATTICE_SIMILARITY_TYPE
           
 
Constructor Summary
SimilarityType(java.util.List<OperationSymbol> opSyms)
           
SimilarityType(java.util.List<OperationSymbol> opSyms, boolean sort)
           
 
Method Summary
 java.lang.String aritiesString()
           
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.Integer,java.lang.Integer> getAritiesMap()
          A map from the arity to the number of ops of that arity.
 int getMaxArity()
           
 java.util.List<OperationSymbol> getOperationSymbols()
           
 java.util.List<OperationSymbol> getSortedOperationSymbols()
          The sorting is by lowest arity first then by alphabetical on the name.
 int hashCode()
           
 int inputSize(int algSize)
          This calculates the (computer) input size.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LATTICE_SIMILARITY_TYPE

public static final SimilarityType LATTICE_SIMILARITY_TYPE

GROUP_SIMILARITY_TYPE

public static final SimilarityType GROUP_SIMILARITY_TYPE
Constructor Detail

SimilarityType

public SimilarityType(java.util.List<OperationSymbol> opSyms)

SimilarityType

public SimilarityType(java.util.List<OperationSymbol> opSyms,
                      boolean sort)
Method Detail

getOperationSymbols

public java.util.List<OperationSymbol> getOperationSymbols()

getSortedOperationSymbols

public java.util.List<OperationSymbol> getSortedOperationSymbols()
The sorting is by lowest arity first then by alphabetical on the name.

Returns:
a sorted list of operations.

inputSize

public int inputSize(int algSize)
This calculates the (computer) input size. If it exceeds the max int value, it returns -1; If there are no operations it returns the algebra size.

Parameters:
algSize - the algebra size
Returns:
the input size if it is an int

getAritiesMap

public java.util.Map<java.lang.Integer,java.lang.Integer> getAritiesMap()
A map from the arity to the number of ops of that arity.

Returns:

getMaxArity

public int getMaxArity()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

aritiesString

public java.lang.String aritiesString()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright 2003 Ralph Freese. All Rights Reserved.