|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<E>
java.util.LinkedHashSet<AbstractImplicitModule>
clarion.system.ImplicitModuleCollection
public class ImplicitModuleCollection
This class implements an implicit module collection within CLARION. It extends the LinkedHashSet class and implements the InterfaceTracksMatchStatistics and InterfaceHandlesFeedback interfaces.
Usage:
This class acts as a container for holding implicit modules within some of the CLARION subsystems.
This collection keeps track of collection-wide match statistics that are used to for variable level selection within the ACS as well as for performance monitoring and reporting purposes.
This class contains both global (static) and local constants. The default is to use the local constants. If you want to change any of the global constants, you need to do so before any instances of this class are initialized.
Field Summary | |
---|---|
private double |
Feedback
The immediate feedback (if given). |
static double |
GLOBAL_MATCH_DISCOUNT
The match discount factor. |
static double |
GLOBAL_POSITIVE_MATCH_THRESHOLD
The threshold that must be passed to meet the positive match criterion. |
static double |
MATCH_DISCOUNT
The match discount factor. |
protected double |
NM
The negative match counter. |
protected double |
PM
The positive match counter. |
double |
POSITIVE_MATCH_THRESHOLD
The threshold that must be passed to meet the positive match criterion. |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
ImplicitModuleCollection()
Initializes an implicit module collection. |
|
ImplicitModuleCollection(java.util.Collection<? extends AbstractImplicitModule> ims)
Initializes an implicit module collection with the collection of implicit modules specified. |
Method Summary | |
---|---|
boolean |
add(AbstractImplicitModule im)
Adds an implicit module to the collection. |
boolean |
addAll(java.util.Collection<? extends AbstractImplicitModule> ims)
Adds a collection of implicit modules to this collection. |
boolean |
checkMatchCriterion()
This method does nothing as it is not used by the CLARION Library for this collection. |
boolean |
contains(java.lang.Object im)
Checks to see if the collection contains an implicit module that is equal to the specified implicit module. |
void |
discountMatchStatistics()
Discounts the positive and negative match statistics for all modules in the collection. |
double |
getFeedback()
Gets the feedback. |
double |
getNM()
Gets the negative match statistic. |
double |
getPM()
Gets the positive match statistic. |
void |
incrementNM()
Increments the negative match statistic. |
void |
incrementPM()
Increments the positive match statistic. |
void |
resetMatchStatistics()
Resets the match statistics. |
void |
setFeedback(double feedback)
Sets the feedback. |
void |
setNM(double nm)
Sets the negative match statistic. |
void |
setPM(double pm)
Sets the positive match statistic. |
int |
size()
Returns the number of implicit modules in the collection. |
void |
updateMatchStatistics(AbstractMatchCalculator MatchCalculator)
Updates the positive or negative match statistics based on the feedback. |
Methods inherited from class java.util.HashSet |
---|
clear, clone, isEmpty, iterator, remove |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
clear, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, toArray, toArray |
Field Detail |
---|
private static final long serialVersionUID
public static double GLOBAL_MATCH_DISCOUNT
public static double MATCH_DISCOUNT
private double Feedback
protected double PM
protected double NM
public static double GLOBAL_POSITIVE_MATCH_THRESHOLD
public double POSITIVE_MATCH_THRESHOLD
Constructor Detail |
---|
public ImplicitModuleCollection()
public ImplicitModuleCollection(java.util.Collection<? extends AbstractImplicitModule> ims)
ims
- The implicit modules for the collection.Method Detail |
---|
public boolean add(AbstractImplicitModule im) throws java.lang.IllegalArgumentException
add
in interface java.util.Collection<AbstractImplicitModule>
add
in interface java.util.Set<AbstractImplicitModule>
add
in class java.util.HashSet<AbstractImplicitModule>
im
- The implicit module to add.
java.lang.IllegalArgumentException
- If the specified implicit module is already in the collection.public boolean addAll(java.util.Collection<? extends AbstractImplicitModule> ims)
addAll
in interface java.util.Collection<AbstractImplicitModule>
addAll
in interface java.util.Set<AbstractImplicitModule>
addAll
in class java.util.AbstractCollection<AbstractImplicitModule>
ims
- The implicit modules to add.
public void discountMatchStatistics()
public double getPM()
getPM
in interface InterfaceTracksMatchStatistics
public double getNM()
getNM
in interface InterfaceTracksMatchStatistics
public void setPM(double pm)
setPM
in interface InterfaceTracksMatchStatistics
pm
- The value to set as the positive match statistic.public void setNM(double nm)
setNM
in interface InterfaceTracksMatchStatistics
nm
- The value to set as the negative match statistic.public double getFeedback()
getFeedback
in interface InterfaceHandlesFeedback
public void setFeedback(double feedback)
setFeedback
in interface InterfaceHandlesFeedback
feedback
- The value of the feedback.public void updateMatchStatistics(AbstractMatchCalculator MatchCalculator)
This update is usually performed after the feedback has been set.
updateMatchStatistics
in interface InterfaceTracksMatchStatistics
MatchCalculator
- The match calculator to use to determine positivity.public void resetMatchStatistics()
resetMatchStatistics
in interface InterfaceTracksMatchStatistics
public void incrementPM()
incrementPM
in interface InterfaceTracksMatchStatistics
public void incrementNM()
incrementNM
in interface InterfaceTracksMatchStatistics
public boolean checkMatchCriterion()
checkMatchCriterion
in interface InterfaceHandlesFeedback
public boolean contains(java.lang.Object im)
contains
in interface java.util.Collection<AbstractImplicitModule>
contains
in interface java.util.Set<AbstractImplicitModule>
contains
in class java.util.HashSet<AbstractImplicitModule>
im
- The implicit module object you wish to find within this collection.
public int size()
size
in interface java.util.Collection<AbstractImplicitModule>
size
in interface java.util.Set<AbstractImplicitModule>
size
in class java.util.HashSet<AbstractImplicitModule>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |