public abstract class Atom extends Object implements Formula, SummationAtomOrAtom
Modifier and Type | Field and Description |
---|---|
protected Term[] |
arguments |
protected int |
hashcode |
protected Predicate |
predicate |
Modifier | Constructor and Description |
---|---|
protected |
Atom(Predicate predicate,
Term[] args)
Type mismatches will throw an exception unless
the types are trivially convertable like UniqueIntID and IntegerAttribute.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object oth) |
Formula |
flatten()
Collapses nested formulas of the same type and remove duplicates at the top level.
|
Term[] |
getArguments()
Returns the arguments associated with this atom.
|
int |
getArity()
Returns the number of arguments to the associated predicate.
|
Set<Atom> |
getAtoms(Set<Atom> atoms) |
Formula |
getDNF() |
Predicate |
getPredicate()
Returns the predicate associated with this Atom.
|
int |
hashCode() |
protected void |
init(boolean copyArgs,
boolean doValidation,
Predicate predicate,
Term[] args) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
collectVariables
protected Predicate predicate
protected Term[] arguments
protected int hashcode
public Predicate getPredicate()
public int getArity()
public Term[] getArguments()
public Formula getDNF()
public Formula flatten()
Formula
Copyright © 2018 University of California, Santa Cruz. All rights reserved.