1 #if !defined(_FEATURENUMLIST2_) 2 #define _FEATURENUMLIST2_ 45 #if !defined(_FileDesc_Defined_) 237 void AllocateArraySize (
kkuint16 size);
246 kkint32 featureNumsAllocatedSize;
256 #define _FeatureNumList_Defined_ 259 std::ostream& operator<< (std::ostream& os,
const FeatureNumList& features);
Provides a detailed description of the attributes of a dataset.
FeatureNumListConst * FeatureNumListConstPtr
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.
FeatureNumList(FileDescPtr _fileDesc)
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 const FeatureNumListConst
void ParseToString(const KKStr &_str, bool &_valid)
Will select the features specified in "featureListStr".
FeatureNumList & operator+=(kkuint16 featureNum)
Returns this FeatureNumList that is a union of this instance and 'rightSide'.
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.
XmlElementFeatureNumList * XmlElementFeatureNumListPtr
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(FeatureNumList &&featureNumList)
Move constructor.
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.
FeatureNumList * FeatureNumListPtr
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...
XmlTag const * XmlTagConstPtr
Manages the reading and writing of objects in a simple XML format. For a class to be supported by Xml...
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...
FeatureNumList(kkuint32 _maxFeatureNum)
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
FeatureNumListConst * FeatureNumListConstPtr
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)
void ReadXML(XmlStream &s, XmlTagConstPtr tag, VolConstBool &cancelFlag, RunLog &log)
std::vector< kkuint16 > VectorUint16
Vector of unsigned 16 bit integers.
FeatureNumList const FeatureNumListConst
XmlElementTemplate< FeatureNumList > XmlElementFeatureNumList
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.
void WriteXML(const KKStr &varName, std::ostream &o) const
KKStr ToCommaDelStr() const
const kkuint16 * FeatureNums() const
FeatureNumList & operator=(FeatureNumList &&_features)
FeatureNumList & operator-=(kkuint16 rightSide)
volatile const bool VolConstBool