1 #if !defined(_FEATURENUMLIST2_) 2 #define _FEATURENUMLIST2_ 45 #if !defined(_FileDesc_Defined_) 174 void SaveXML (std::ostream& o);
244 void AllocateArraySize (
kkuint16 size);
253 kkint32 featureNumsAllocatedSize;
261 #define _FeatureNumList_Defined_ 264 std::ostream& operator<< ( std::ostream& os,
269 std::ostream& operator<< ( std::ostream& os,
270 const FeatureNumListPtr& features
void Save(const KKStr &fileName)
Provides a detailed description of the attributes of a dataset.
FeatureNumListPtr RandomlySelectFeatures(kkint32 numToKeep) const
Generates a new FeatureNumList object that will select at random 'numToKeep' features from this insta...
FeatureNumList operator+(kkuint16 rightSide) const
Returns new FeatureNumList that is a union of this instance and 'rightSide'.
FeatureNumList operator+(const FeatureNumList &rightSide) const
Returns new FeatureNumList that is a union of this instance and 'rightSide'.
bool Test(kkuint16 _featureNum) const
Indicates whether feature '_featureNum' is selected.
Keeps track of selected features.
unsigned __int16 kkuint16
16 bit unsigned integer.
FeatureNumList & operator=(const FeatureNumListPtr _features)
bool InList(kkuint16 featureNum) const
returns true if '_featureNum' is one of the selected features.
KKStr ToHexString() const
FeatureNumList & operator+=(kkuint16 featureNum)
Returns this FeatureNumList that is a union of this instance and 'rightSide'.
void SaveXML(std::ostream &o)
const char * FeatureDecriptions[]
FeatureNumList(const BitString &bitString)
Constructs a 'FeatureNumList' instance using the set bits in 'bitString' to indicate which features a...
unsigned __int32 kkuint32
FeatureNumList(const FeatureNumList &featureNumList)
Copy constructor.
kkuint16 * CreateFeatureNumArray() const
Allocates a array of kkint32's that is a copy of FeatureNums. The caller will own the array and is re...
FeatureNumList operator-(const FeatureNumList &rightSide) const
Allows you to manage very long bit strings.
FeatureNumList Complement() const
Perform a complement of selected features. That is if a feature is selected turn it off and if it is ...
kkuint16 operator[](kkint32 idx) const
Returns back the selected feature.
bool IsSubSet(const FeatureNumList &z)
Returns true if 'z' is a subset of this instance.
void UnSet()
Turns off all features so that no feature is selected.
kkint32 MaxFeatureNum() const
void ToBitString(BitString &bitStr) const
kkint32 NumOfFeatures() const
void AddFeature(kkuint16 featureNum)
Adds 'featureNum' to the list of selected features. If it is already selected nothing happens...
void UnSet(kkuint16 featureNum)
Turns off specified feature 'featureNum'; if 'featureNum' is not turned on then nothing happens; same...
void SetAllFeatures(FileDescPtr fileDesc)
Selects all features except those flagged as 'IgnoreAttribute' in the associated FileDesc.
KKStr ToHexString(FileDescPtr fileDesc) const
Uses 'fileDesc' to determine length of hex string.
bool operator>(const FeatureNumList &_features) const
Indicates if the Left FeatureNumList instances is greater than the right one.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
kkint32 Compare(const FeatureNumList &_features) const
Compare with another featureNumList returning -1, 0, and 1 indicating less_than, equal, or greater_than.
FeatureNumList operator-(kkuint16 rightSide) const
FeatureNumList & operator=(const FeatureNumList &_features)
static FeatureNumList AllFeatures(FileDescPtr fileDesc)
Create a FeatureNumList object where all features are selected, except ones that are flagged as Ignor...
void Load(const KKStr &_fileName, bool &_successful, RunLog &_log)
FeatureNumList(kkuint32 _maxFeatureNum)
static FeatureNumListPtr ExtractFeatureNumsFromStr(const KKStr &featureListStr)
Will select the features specified in "featureListStr".
KKStr ToString() const
Returns comma delimited list of all features selected; will make use of range specification.
kkint32 NumSelFeatures() const
bool AllFeaturesSelected(FileDescPtr fileDesc) const
Returns true if all features are selected.
FeatureNumList(const KKStr &_featureListStr, bool &_valid)
Constructs a 'FeatureNumList' instance from a string that contains a list of selected features...
FeatureNumList * FeatureNumListPtr
FeatureNumList operator*(const FeatureNumList &rightSide) const
Returns new instance that is the intersection of features.
bool operator==(const FeatureNumList &_features) const
Indicates if the two FeatureNumLiost instances have the same features selected.
Used for logging messages.
void EncodeProblem(const struct svm_paramater ¶m, struct svm_problem &prob_in, struct svm_problem &prob_out)
std::vector< kkuint16 > VectorUint16
Vector of unsigned 16 bit integers.
FeatureNumList & operator+=(const FeatureNumList &rightSide)
Returns this FeatureNumList that is a union of this instance and 'rightSide'.
kkint32 MemoryConsumedEstimated() const
bool operator<(const FeatureNumList &_features) const
Indicates if the Left FeatureNumList instances is less than the right one.
KKStr ToCommaDelStr() const
const kkuint16 * FeatureNums() const
FeatureNumList & operator-=(kkuint16 rightSide)