public class ConstraintBlockerTermStore extends Object implements TermStore<ConstraintBlockerTerm>
ConstraintBlockerTermGenerator
for details on the constraint blocking process.Constructor and Description |
---|
ConstraintBlockerTermStore() |
Modifier and Type | Method and Description |
---|---|
void |
add(GroundRule rule,
ConstraintBlockerTerm term)
Add a term to the store that was generated from the given ground rule.
|
void |
clear()
Remove any existing terms and prepare for a new set.
|
void |
close()
Close down the term store, it will not be used any more.
|
void |
ensureCapacity(int capacity)
Ensure that the underlying stuctures can have the required capacity.
|
ConstraintBlockerTerm |
get(int index) |
int |
getBlockIndex(RandomVariableAtom atom)
Get the index of the block (term) associated with the given atom.
|
GroundRuleStore |
getGroundRuleStore()
Extremely hacky way to allow methods that require this to get ahold of the GroundRuleStore.
|
List<Integer> |
getTermIndices(WeightedGroundRule rule)
Get the indicies for all terms related to a specific rule.
|
void |
init(GroundRuleStore groundRuleStore,
RandomVariableAtom[][] rvBlocks,
WeightedGroundRule[][] incidentGRs,
boolean[] exactlyOne) |
Iterator<ConstraintBlockerTerm> |
iterator() |
void |
randomlyInitialize()
Randomly initializes the RandomVariableAtoms to a feasible state.
|
int |
size() |
void |
updateWeight(WeightedGroundRule rule) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public void init(GroundRuleStore groundRuleStore, RandomVariableAtom[][] rvBlocks, WeightedGroundRule[][] incidentGRs, boolean[] exactlyOne)
public GroundRuleStore getGroundRuleStore()
public int getBlockIndex(RandomVariableAtom atom)
public void randomlyInitialize()
public void add(GroundRule rule, ConstraintBlockerTerm term)
TermStore
add
in interface TermStore<ConstraintBlockerTerm>
public void clear()
TermStore
clear
in interface TermStore<ConstraintBlockerTerm>
public void close()
TermStore
close
in interface TermStore<ConstraintBlockerTerm>
public ConstraintBlockerTerm get(int index)
get
in interface TermStore<ConstraintBlockerTerm>
public int size()
size
in interface TermStore<ConstraintBlockerTerm>
public void ensureCapacity(int capacity)
TermStore
ensureCapacity
in interface TermStore<ConstraintBlockerTerm>
public void updateWeight(WeightedGroundRule rule)
updateWeight
in interface TermStore<ConstraintBlockerTerm>
public List<Integer> getTermIndices(WeightedGroundRule rule)
TermStore
getTermIndices
in interface TermStore<ConstraintBlockerTerm>
public Iterator<ConstraintBlockerTerm> iterator()
iterator
in interface Iterable<ConstraintBlockerTerm>
Copyright © 2018 University of California, Santa Cruz. All rights reserved.