|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.AbstractInstance edu.cmu.minorthird.classify.FeatureFactory.CompactInstance
protected class FeatureFactory.CompactInstance
A compact but immutable implementation of an instance.
Nested Class Summary | |
---|---|
class |
FeatureFactory.CompactInstance.FeatureArrayIterator
a looper over a feature array with Feature.Looper type |
class |
FeatureFactory.CompactInstance.UnionFeatureArrayIterator
sequential composite of n FeatureArrayLoopers (constructor for 2) |
Field Summary |
---|
Fields inherited from class edu.cmu.minorthird.classify.AbstractInstance |
---|
source, subpopulationId |
Constructor Summary | |
---|---|
FeatureFactory.CompactInstance(Instance instance)
Create a compact instance from some other instance |
Method Summary | |
---|---|
java.util.Iterator<Feature> |
binaryFeatureIterator()
Return an iterator over all binary features. |
java.util.Iterator<Feature> |
featureIterator()
Return an iterator over all features |
FeatureFactory |
getFactory()
|
double |
getWeight(Feature f)
Get the weight assigned to a feature in this instance. |
java.util.Iterator<Feature> |
numericFeatureIterator()
Return an iterator over all numeric features. |
int |
numFeatures()
Return the number of all the features |
java.lang.String |
toString()
Debugging view of an instance. |
Methods inherited from class edu.cmu.minorthird.classify.AbstractInstance |
---|
getSource, getSubpopulationId, toGUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FeatureFactory.CompactInstance(Instance instance)
instance
- Instance object to generate fromMethod Detail |
---|
public FeatureFactory getFactory()
public double getWeight(Feature f)
Instance
getWeight
in interface Instance
public java.util.Iterator<Feature> binaryFeatureIterator()
Instance
binaryFeatureIterator
in interface Instance
public java.util.Iterator<Feature> numericFeatureIterator()
Instance
numericFeatureIterator
in interface Instance
public java.util.Iterator<Feature> featureIterator()
Instance
featureIterator
in interface Instance
public int numFeatures()
Instance
numFeatures
in interface Instance
public java.lang.String toString()
AbstractInstance
toString
in class AbstractInstance
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |