public class RandomVariableAtom extends GroundAtom
GroundAtom
with a truth value which can be modified.
A GroundAtom is instantiated as a RandomVariableAtom is BOTH of the following conditions are met:
StandardPredicate
that is open in the Atom's Databasedb, value
Modifier | Constructor and Description |
---|---|
protected |
RandomVariableAtom(StandardPredicate p,
Constant[] args,
Database db,
double value) |
Modifier and Type | Method and Description |
---|---|
void |
commitToDB()
Calls
Database.commit(RandomVariableAtom) with this Atom
on the Database that instantiated it. |
StandardPredicate |
getPredicate()
Returns the predicate associated with this Atom.
|
MutableAtomFunctionVariable |
getVariable() |
RandomVariableAtom |
setValue(double value)
Sets the truth value of this Atom.
|
collectVariables, compareTo, getArguments, getDatabase, getValue, toStringWithValue
protected RandomVariableAtom(StandardPredicate p, Constant[] args, Database db, double value)
public StandardPredicate getPredicate()
Atom
getPredicate
in class Atom
public RandomVariableAtom setValue(double value)
value
- a truth value in [0,1]IllegalArgumentException
- if value is not in [0,1]public void commitToDB()
Database.commit(RandomVariableAtom)
with this Atom
on the Database that instantiated it.public MutableAtomFunctionVariable getVariable()
getVariable
in class GroundAtom
Copyright © 2018 University of California, Santa Cruz. All rights reserved.