tesl
Class FilteredImplication<M extends java.lang.Comparable<? super M>,S extends java.lang.Comparable<? super S>>
java.lang.Object
tesl.ImplicationRelation
tesl.FilteredImplication<M,S>
public class FilteredImplication<M extends java.lang.Comparable<? super M>,S extends java.lang.Comparable<? super S>>
- extends ImplicationRelation
A clock implication which creates ticks on the slave by filtering the ticks of the master clock according to a pattern.
|
Constructor Summary |
FilteredImplication(Clock<M> master,
Clock<S> slave,
int skip,
int keep,
int repSkip,
int repKeep)
Get subClock by filtering master according to the pattern:
- skip "skip" ticks
- keep the next "keep" ticks
- then, repeatedly skip repSkip ticks and keep repKeep ticks
For instance, FilteredBy(m, s, 5, 1, 3, 2) will skip the first
5 ticks of "m", then keep its next tick for "s", then skip 3 ticks,
keep 2 ticks, skip 3 ticks, keep 2 ticks and so on. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
skip_
private final int skip_
keep_
private final int keep_
r_skip_
private final int r_skip_
r_keep_
private final int r_keep_
phase_
private int phase_
FilteredImplication
public FilteredImplication(Clock<M> master,
Clock<S> slave,
int skip,
int keep,
int repSkip,
int repKeep)
- Get subClock by filtering master according to the pattern:
- skip "skip" ticks
- keep the next "keep" ticks
- then, repeatedly skip repSkip ticks and keep repKeep ticks
For instance, FilteredBy(m, s, 5, 1, 3, 2) will skip the first
5 ticks of "m", then keep its next tick for "s", then skip 3 ticks,
keep 2 ticks, skip 3 ticks, keep 2 ticks and so on.
- Parameters:
master - slave - skip - keep - repSkip - repKeep -
getMasterClock
public Clock<M> getMasterClock()
- Return the master clock for the FilteredBy constraint
induceTicks
public boolean induceTicks()
- Determine whether a tick should be set "now" on the subclock slave clock.
Return true is the rule was applied (there is a now tick on the master clock).
- Specified by:
induceTicks in class ImplicationRelation
toString
public java.lang.String toString()
- Overrides:
toString in class ImplicationRelation
backup
public ImplicationBackupInterface backup()
- Specified by:
backup in class ImplicationRelation
restore
public void restore(ImplicationBackupInterface bck)
- Specified by:
restore in class ImplicationRelation