亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? instance.java

?? 用C編寫的數(shù)據(jù)挖掘的相關(guān)算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
                    rtrn = rtrn + separator;
            }
            else{
                //System.out.println("Values.length = " + values.length);
                //System.out.println("attrNum = "+attrNum);
                if(values[attrNum] == null)System.out.println("Error");
                String data = ai.attrValue_to_string(values[attrNum]);
                if(ai.can_cast_to_nominal())// && protectChars)
                    ;// data = protect_chars(data);
                rtrn = rtrn + data;
                if(data.equals("")) rtrn = rtrn + "?";
                if(attrNum < (schema.num_attr()-1))
                    rtrn = rtrn + separator;
                
            }
        }
        if(is_labelled()){
            if(schema.num_attr() > 0)
                rtrn = rtrn + ", ";
            AttrInfo ai = schema.label_info();
            String data = ai.attrValue_to_string(labelValue);
            //if(protectChars)
            //   data = protect_chars(data);
            rtrn = rtrn + data;
        }
        rtrn = rtrn + "\n";
        return(rtrn);
        
    }
    
    /** Returns the information about the attribute specified.
     * @return The information about the attribute.
     * @param attrNum	The index of the attribute specified.
     */
    public AttrInfo attr_info(int attrNum) {
        return schema.attr_info(attrNum);
    }
    
    /** Checks if this Instance is equal to the specified Instance. Compares the
     * attributes values, the weight, and the label of this Instance.
     * @return TRUE if these Instances are equal, FALSE otherwise.
     * @param i_instance	The Instance to be compared to.
     */
    public boolean equals(Instance i_instance) {
        return equal(i_instance,true,true,false);
    }
    
    /** Compares this Instance to the specified Instance. This function may
     * optionally compare the label and the weight as part of this process. Setting
     * fatalOnFalse will cause equal() to abort with a clear error message
     * if the equality test fails.
     * @return TRUE if these Instances are equal, FALSE otherwise.
     * @param instance		The Instance to be compared to.
     * @param compLabel		TRUE if labels are to be compared, FALSE otherwise.
     * @param compWeight		TRUE if weights are to be compared, FALSE otherwise.
     * @param fatalOnFalse	TRUE if an Error message should be displayed if
     * the Instances are not equal, FALSE otherwise.
     */
    boolean equal(Instance instance,
    boolean compLabel, boolean compWeight,
    boolean fatalOnFalse) {
        // if one instance is labelled and the other is not AND we're
        // comparing labels, its a mismatch.
        if( compLabel && (is_labelled() != instance.is_labelled())) {
            if (fatalOnFalse) {
                Error.fatalErr("Instance::equal: equalilty failed (only one of the"
                +"two instances has label).");
            }
            else
                return false;
        }
        
        // compare labels if compLabel is set
        else if(compLabel && is_labelled()) {
            //      DBGSLOW(schema.label_info().equal(instance.get_schema().label_info(),
            //					TRUE));
            if(!schema.label_info().equal_value(labelValue,instance.get_label())) {
                if(fatalOnFalse) {
                    Error.fatalErr("Instance::equal: equality failed (label values "
                    +"differ).");
                }
                return false;
            }
        }
        
        // compare weights if compWeight is set
        if(compWeight) {
            if(!MLJ.approx_equal((float)get_weight(),
            (float)(instance.get_weight()))) {
                if(fatalOnFalse) {
                    Error.fatalErr("Instance::equal: equality failed (weights do not match: "
                    +get_weight() +" vs " +instance.get_weight()
                    +").");
                }
                return false;
            }
        }
        
        // check schemas and number of values (DBG only)
        //   DBGSLOW(get_schema().equal_no_label(instance.get_schema(), TRUE));
        //   DBG(if (instance.values.size() != values.size())
        //       err << "Instance::equal: number of values in instance "
        //       "do not match.  class=" << values.size()
        //       << " and rhs=" << instance.values.size() << fatal_error);
        
        // compare attribute values
        for (int i = 0; i < schema.num_attr(); i++) {
            if (!attr_info(i).equal_value( values[i], instance.values[i] )) {
                if( fatalOnFalse ) {
                    Error.fatalErr("Instance::equal: equality failed (differed on "
                    +attr_info(i).name() +").");
                }
                return false;
            }
        }
        
        // comparison succeeded
        return true;
    }
    
    /** Returns a String representation of the Instance.
     * @param displayWeight TRUE if the Instance weight is to be displayed, FALSE otherwise.
     * @param normalizeReals TRUE if the real values in the Instance are to be normalized, FALSE otherwise.
     * @return A String representation of the Instance.
     */
    public String out(boolean displayWeight, boolean normalizeReals) {
        String rtrn = new String();
        rtrn = rtrn + display_unlabelled_out(displayWeight, normalizeReals);
        if(is_labelled()){
            if(schema.num_attr() > 0)
                rtrn = rtrn + ", ";
            AttrInfo ai = schema.label_info();
            String data = ai.attrValue_to_string(labelValue);
            //if(protectChars)
            //   data = protect_chars(data);
            rtrn = rtrn + data;
        }
        rtrn = rtrn + "\n";
        return rtrn;
    }
    
    /** Returns a String representation of the Instance.
     * @param displayWeight TRUE if the Instance weight is to be displayed, FALSE otherwise.
     * @param normalizeReal TRUE if the real values in the Instance are to be normalized, FALSE otherwise.
     * @return A String representation of the Instance.
     */
    public String display_unlabelled_out(boolean displayWeight, boolean normalizeReal) {
        String rtrn = new String();
        String separator =  new String(", ");
        if(displayWeight)
            rtrn = rtrn + (weight+separator);
        for(int attrNum = 0;attrNum<schema.num_attr();attrNum++){
            AttrInfo ai = schema.attr_info(attrNum);
            if(normalizeReal && ai.can_cast_to_real()){
                RealAttrInfo rai = ai.cast_to_real();
                if(rai.is_unknown(values[attrNum]))
                    rtrn = rtrn + AttrInfo.UNKNOWN_VAL_STR;
                else
                    rtrn = rtrn + rai.normalized_value(values[attrNum]);
                if(attrNum < schema.num_attr() -1)
                    rtrn = rtrn + separator;
            }
            else{
                //System.out.println("Values.length = " + values.length);
                //System.out.println("attrNum = "+attrNum);
                if(values[attrNum] == null)System.out.println("Error");
                String data = ai.attrValue_to_string(values[attrNum]);
                if(ai.can_cast_to_nominal())// && protectChars)
                    ;// data = protect_chars(data);
                rtrn = rtrn + data;
                if((attrNum < (schema.num_attr()-1))&&(!(data.equals(""))))
                    rtrn = rtrn + separator;
            }
        }
        return rtrn;
    }
    
    /** Returns the AttrValue at the specified index number.
     * @return The AttrValue at the specified index.
     * @param index The index specified.
     */
    public AttrValue index(int index) {
        return values[index];
    }
    
    /** Copies the supplied Instance object into this Instance object.
     * @param other The Instance object to be copied.
     * @throws CloneNotSupportedException if the cloning process for contained data members encounters a
     * CloneNotSupportedException.
     */
    public void copy(Instance other) throws CloneNotSupportedException{
        values = new AttrValue[other.schema.num_attr()];
        for(int i = 0; i < values.length; values[i++] = new AttrValue());
        schema = other.schema;
        refCount = other.refCount;
        set_weight(weight);
        set_label((AttrValue)labelValue.clone());
        for(int i=0;i<values.length;i++)
            values[i] = (AttrValue)other.get_value(i).clone();
    }
    
    /** Remove an Attribute from an Instance. When doing many projections, it is more
     * efficient to supply a Schema with the deleted attribute.
     * @param attrNum The number of the attribute to be removed from this InstanceObject.
     * @param schemaWithDelAttr Schema with the attribute deleted.
     * @return The modified Instance.
     */
    public Instance remove_attr(int attrNum, Schema schemaWithDelAttr) {
        if ( attrNum < 0 || attrNum >= num_attr() )
            Error.fatalErr("Instance.remove_attr(int,Schema): illegal attrNum \n"
            +attrNum+" is passed but the proper range is \n"+" 0 to "+(num_attr() - 1)
            +".");
        
        Instance instance = new Instance(schemaWithDelAttr);
        for (int i = 0; i < schema.num_attr(); i++)
            if (i != attrNum){
                index(i - ((i > attrNum)?1:0)).copy(index(i));
            }
        if (schema.is_labelled()) // both are labelled becauseof
            // equal_except_del_attr
            instance.set_label(get_label());
        return instance;
    }
    
    /** Remove an Attribute from an Instance. When doing many projections, it is more
     * efficient to supply a Schema with the deleted attribute.
     * @param attrNum The number of the attribute to be removed from this InstanceObject.
     * @return The modified Instance.
     */
    public Instance remove_attr(int attrNum) {
        if ( attrNum < 0 || attrNum >= num_attr() )
            Error.fatalErr("Instance.remove_attr(int): illegal attrNum \n"
            +attrNum+" is passed but the proper range is \n"+" 0 to "+(num_attr() - 1)
            +".");
        
        Schema schemaNew = schema.remove_attr(attrNum);
        return remove_attr(attrNum, schemaNew);
    }
    
    
    /** Returns the number of values for the specified attribute.
     * @param attrNum The number of the attribute for which the number of values is requested.
     * @return The number of attribute values.
     */
    public int num_attr_values(int attrNum){
        return schema.num_attr_values(attrNum);
    }
    
    /** Returns the number of possible label values in the Schema of this Instance.
     * @return The number of possible label values.
     */
    public int num_label_values() {
        return nominal_label_info().num_values();
    }
    
    /** Returns the information on the label attribute.
     * @return Information on the label attribute.
     */
    public NominalAttrInfo nominal_label_info() {
        return label_info().cast_to_nominal();
    }
    
    /** Returns the attribute name.
     * @param attrNum The number of the attribute.
     * @return The name of the attribute.
     */
    public String attr_name(int attrNum){
        return schema.attr_name(attrNum);
    }
    
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲电影视频在线| 91黄色免费观看| 另类小说图片综合网| 婷婷激情综合网| 亚洲aⅴ怡春院| 秋霞午夜av一区二区三区| 午夜电影网亚洲视频| 视频一区视频二区中文字幕| 香蕉av福利精品导航| 日韩成人dvd| 极品少妇xxxx精品少妇偷拍| 激情综合色综合久久综合| 国内精品伊人久久久久av影院| 久久精品国产亚洲高清剧情介绍| 久久成人精品无人区| 国产寡妇亲子伦一区二区| 国产v综合v亚洲欧| 成人性色生活片| 色婷婷久久99综合精品jk白丝| 91国产视频在线观看| 9191成人精品久久| 精品捆绑美女sm三区| 久久精品视频在线看| 国产精品美女视频| 一区二区三区欧美日| 亚洲成人午夜影院| 精品一区二区免费| 成人午夜电影网站| 欧美在线啊v一区| 欧美一区二区高清| 久久精品一区蜜桃臀影院| 亚洲视频一区二区在线观看| 亚洲国产一区二区在线播放| 六月丁香婷婷久久| 成人动漫中文字幕| 欧美少妇一区二区| 日韩精品一区在线| 国产精品福利一区二区三区| 亚洲综合区在线| 精品一区二区三区在线视频| 成人午夜视频网站| 欧美日韩国产美女| 久久久影院官网| 樱花草国产18久久久久| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产成人欧美日韩在线电影| 欧美亚洲国产bt| 精品久久免费看| 亚洲综合成人在线视频| 久久99精品久久久久久国产越南 | 国产激情一区二区三区四区| 99久久婷婷国产精品综合| 欧美丰满少妇xxxbbb| 国产精品网站在线观看| 午夜精品一区二区三区免费视频| 国产剧情一区二区三区| 欧美性感一区二区三区| 精品国产91乱码一区二区三区 | 亚洲国产一区在线观看| 国产精品亚洲一区二区三区在线 | 欧美日韩黄色影视| 国产日韩欧美综合一区| 午夜精品久久久久久不卡8050| 亚洲国产精品久久久久秋霞影院| 亚洲同性gay激情无套| 丝袜亚洲精品中文字幕一区| 国产精品一区二区男女羞羞无遮挡| 91在线国产观看| 亚洲精品一线二线三线| 亚洲精品一卡二卡| 国产xxx精品视频大全| 欧美精品一区二区三区在线| 亚洲欧美成aⅴ人在线观看 | 美女在线视频一区| 99免费精品在线| 久久午夜色播影院免费高清| 亚洲.国产.中文慕字在线| av成人老司机| 久久久久久久一区| 麻豆91精品视频| 欧美酷刑日本凌虐凌虐| 樱桃视频在线观看一区| 99精品1区2区| 中文在线免费一区三区高中清不卡| 久久国产视频网| 日韩一级欧美一级| 舔着乳尖日韩一区| 欧美日韩一级视频| 亚洲香肠在线观看| 色香蕉成人二区免费| 中文字幕一区二区三区在线播放 | 亚州成人在线电影| 欧美视频精品在线观看| 一区2区3区在线看| 一本一道久久a久久精品| 国产精品美女久久久久久久久久久 | 国产精品66部| 精品sm在线观看| 精品午夜久久福利影院| 欧美mv日韩mv| 久久精品国产精品青草| 日韩一区二区三区av| 日日骚欧美日韩| 欧美日韩另类一区| 午夜欧美大尺度福利影院在线看| 欧美日韩一区高清| 性感美女极品91精品| 在线播放91灌醉迷j高跟美女 | 欧美在线观看一区| 亚洲一级不卡视频| 精品视频1区2区3区| 亚洲自拍偷拍av| 欧美精品99久久久**| 日韩成人免费电影| 欧美变态tickling挠脚心| 久久91精品久久久久久秒播| 精品91自产拍在线观看一区| 国产一区二区剧情av在线| 国产网红主播福利一区二区| 国产成人av影院| 国产精品成人免费精品自在线观看| 99久久er热在这里只有精品66| 综合色天天鬼久久鬼色| 欧美在线999| 免播放器亚洲一区| 国产亚洲一区二区三区在线观看| 成人av影院在线| 亚洲一区二区三区视频在线播放| 欧美精品免费视频| 精彩视频一区二区三区 | 成人av电影在线播放| 中文字幕人成不卡一区| 在线观看国产一区二区| 日韩精品欧美精品| 久久这里只有精品首页| www.日韩精品| 亚洲v日本v欧美v久久精品| 日韩免费高清电影| 成人av影院在线| 亚洲一区中文在线| 精品国产乱码久久久久久浪潮| 国产白丝网站精品污在线入口| 一区二区在线电影| 欧美电视剧在线观看完整版| 成人开心网精品视频| 亚洲成av人片在www色猫咪| www久久久久| 91麻豆精品一区二区三区| 轻轻草成人在线| 国产精品三级电影| 欧美剧情电影在线观看完整版免费励志电影 | 日韩在线播放一区二区| 久久精品无码一区二区三区| 欧美曰成人黄网| 国产suv精品一区二区三区| 一区二区高清在线| 久久久亚洲综合| 欧美三级日韩三级| 成人午夜伦理影院| 日韩黄色免费电影| 亚洲欧美综合色| 欧美大片一区二区三区| 日本精品一区二区三区高清 | 欧美中文字幕一区| 国产精品一区二区男女羞羞无遮挡 | 久久久精品一品道一区| 欧美日韩激情一区| 不卡一区中文字幕| 国产乱码精品一区二区三| 亚洲aⅴ怡春院| 1024亚洲合集| 精品人在线二区三区| 欧美三级中文字幕在线观看| 丰满少妇久久久久久久| 免费av网站大全久久| 亚洲高清免费在线| 亚洲日本在线天堂| 亚洲国产精品成人综合| 欧美电影免费观看高清完整版在线| 一本久久a久久精品亚洲| 国产盗摄一区二区| 蜜臀va亚洲va欧美va天堂| 亚洲成在线观看| 亚洲精品国产精品乱码不99| 国产日韩欧美在线一区| 丝袜美腿亚洲一区| 夜夜揉揉日日人人青青一国产精品| 亚洲国产精品成人综合色在线婷婷| xvideos.蜜桃一区二区| 欧美一区二区三区视频免费播放| 一本一道久久a久久精品| 99在线视频精品| 岛国av在线一区| 国产不卡视频一区| 国产福利一区二区| 国产曰批免费观看久久久| 奇米色一区二区| 麻豆精品视频在线观看视频| 日本免费新一区视频| 日本欧美久久久久免费播放网|