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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? catgraph.java

?? Decision Tree 決策樹算法ID3 數據挖掘 分類
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        Node node2;
        for(node2 = cGraph.first_node() ; node2 == null ; node2 = cGraph.succ_node(node2)) {
            if (node == node2)
                return true;
        }
        if (fatalOnFalse) {
            if (node == null)
                Error.fatalErr("CatGraph::check_node_in_graph: The given node 0x0 "
                + "is not in this graph");
            else
                Error.fatalErr("CatGraph::check_node_in_graph: The given node "
                +node+ " is not in this graph");
        }
        return false;
    }
    
    /** Creates a postscript file of the receiving graph via a dot description.
     * This method applies only to the DotGraph DisplayPref.
     * @param stream		The stream to be written to.
     * @param dp			The preferences for display.
     * @param hasNodeLosses TRUE if this Node contains loss values.
     * @param hasLossMatrix	TRUE if this CatGraph has a loss matrix assigned to
     * it, FALSE otherwise.
     */
    protected void process_DotGraph_display(Writer stream,
    DisplayPref dp,
    boolean hasNodeLosses,
    boolean hasLossMatrix) {
        try {
            FileWriter tempfile = new FileWriter("catgraph.dot-graph");
            convertToDotFormat(tempfile, dp, hasNodeLosses, hasLossMatrix);
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
    
    /** Creates a postscript file of the receiving graph in a graphical form.
     * This method applies only to the DotPostscript DisplayPref.
     * @param stream		The stream to be written to.
     * @param dp			The preferences for display.
     * @param hasNodeLosses TRUE if this Node contains loss values.
     * @param hasLossMatrix	TRUE if this CatGraph has a loss matrix assigned to
     * it, FALSE otherwise.
     */
    protected void process_DotPostscript_display(Writer stream,
    DisplayPref dp,
    boolean hasNodeLosses,
    boolean hasLossMatrix) {
        try {
            //Originally this used a temporary file name for dot file output -JL
            FileWriter tempfile = new FileWriter("catgraph.dot-in");
            convertToDotFormat(tempfile, dp, hasNodeLosses, hasLossMatrix);
            tempfile.close();
            
            //This is a system call to the dot program -JL
            //TmpFileName tmpfile2(".dot-out");
            //if(system(*GlobalOptions::dotUtil + " -Tps " + tmpfile1 + " -o " + tmpfile2))
            //Mcerr << "CatGraph::display: Call to dot failed." << endl;
            //stream.include_file(tmpfile2);     // this feeds the correct output
        } catch(IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
    
    /** Prints a representation of the CatGraph to the specified stream, using the
     * Categorizer descriptions to label the nodes. This mehtod takes into account
     * the different combinations of streams and display preferences. See
     * DisplayPref.java for more details with regards to valid combinations,
     * functionality, and options.
     * @param hasNodeLosses TRUE if this Node contains loss values.
     * @param hasLossMatrix	TRUE if this CatGraph has a loss matrix assigned to
     * it, FALSE otherwise.
     * @param stream		The stream to be written to.
     * @param dp			The preferences for display.
     */
    // The hasNodeLosses is first because it's non-default here.
    // The default is handled by the virtual base class that calls
    //    the header file, which in turn passes a FALSE here.
    public void display(boolean hasNodeLosses, boolean hasLossMatrix,
    Writer stream, DisplayPref dp) {
        // XStream is a special case--the only option so far where you don't
        // just send something to the MLCOStream.
        //   if (stream.output_type() == XStream) {
        //      process_XStream_display(dp, hasNodeLosses, hasLossMatrix);
        //      return;
        //   }
        try {
            // Other cases are depend only on DisplayPreference
            switch (dp.preference_type()) {
                case  DisplayPref.ASCIIDisplay:
                    // Note that we're calling get_fstream and not get_stream to avoid
                    //   overflow when cout is auto-wrapped (since it's a strstream).
                    //   This means that there is no wrapping here.
                    cGraph.print(stream);
                    stream.flush();
                    break;
                    
                case  DisplayPref.DotPostscriptDisplay:
                    process_DotPostscript_display(stream, dp, hasNodeLosses, hasLossMatrix);
                    break;
                    
                case  DisplayPref.DotGraphDisplay:
                    process_DotGraph_display(stream,dp, hasNodeLosses, hasLossMatrix);
                    break;
                    
                default:
                    Error.fatalErr("CatGraph::display: Unrecognized output type: "
                    + dp.toString());
                    
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
    
    
    /***************************************************************************
  Converts the representation of the graph to dot format and directs it to
the specified stream.
@param stream		The stream to be written to.
@param pref			The preferences for display.
@param hasNodeLosses
@param hasLossMatrix	TRUE if this CatGraph has a loss matrix assigned to
                                        it, FALSE otherwise.
     ***************************************************************************
   protected void convertToDotFormat(Writer stream,
          DisplayPref pref,
          boolean hasNodeLosses,
          boolean hasLossMatrix)
   {
      try
      {
         stream.write(convertToDotFormat(pref,hasNodeLosses,hasLossMatrix));
      } catch(IOException e)
      {
         e.printStackTrace();
      }
   }
     */
    
    /** Returns a representation of the graph to dot format.
     * @param stream		The stream to be written to.
     * @param pref			The preferences for display.
     * @param hasNodeLosses TRUE if this Node contains loss values.
     * @param hasLossMatrix	TRUE if this CatGraph has a loss matrix assigned to
     * it, FALSE otherwise.
     */
    protected void convertToDotFormat(Writer stream,
    DisplayPref pref,
    boolean hasNodeLosses,
    boolean hasLossMatrix) {
        try {
            GetEnv getenv = new GetEnv();
            boolean displayDistr = getenv.get_option_bool("DIST_DISP", defaultDistDisp, distDispHelp, true);
            
            // send header and open brace to stream.
            stream.write("/* Machine generated dot file */ \n\n"
            +"digraph G { \n\n");
            
            
            // Preferences that only make sense for the Postscript Display
            
            if (pref.preference_type() == DisplayPref.DotPostscriptDisplay) {
                process_DotPoscript_preferences(stream, pref);
            }
            
            // We add each node to the dot output.
            Node v = null;
            for(ListIterator NLI = cGraph.nodeIterator() ; NLI.hasNext() ;) {
                v =(Node) NLI.next();
                
                stream.write("/*  node " + v.index() +":  */\n");
                stream.write("node_" + v.index() +" [label=\"" + get_categorizer(v).description());
                
                if (hasNodeLosses) {
                    stream.write("\\nEstimated ");
                    if (hasLossMatrix)
                        stream.write("losses: ");
                    else
                        stream.write("error: ");
                    NodeLoss na = get_categorizer(v) .get_loss();
                    if (Math.abs(na.totalWeight) < MLJ.realEpsilon)
                        stream.write("?");
                    else {
                        double loss = na.totalLoss/  na.totalWeight;
                        stream.write(MLJ.numberToString(loss*100, 2) +"% (" + na.totalWeight +')');
                    }
                }
                
                if (displayDistr && get_categorizer(v).has_distr())
                    stream.write("\\n" + get_categorizer(v).get_distr());
                
                stream.write("\"]\n");
                
                Edge e;
                for(ListIterator ELI = cGraph.edgeIterator() ; ELI.hasNext() ;) {
                    e =(Edge) ELI.next();
                    stream.write("node_" + v.index() +"->" +"node_"
                    + e.target() .index() +" [label=\""
                    +((AugCategory) cGraph.inf(e)) .description() +"\"] \n");
                }
                MLJ.ASSERT(v != null, "CatGraph::convertToDotFormat"
                + "(DisplayPref,boolean,boolean): v equals NULL");
            }
            MLJ.ASSERT(v == null, "CatGraph::convertToDotFormat"
            + "(DisplayPref,boolean,boolean): v does not equal NULL");
            
            stream.write("}\n");
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
    
    /** Gets the preferences from the DisplayPref class. This method applies only to
     * DotPostscript display type.
     * @param stream The Writer to which the CatGraph will be displayed.
     * @param pref The preferences to use in displaying the CatGraph.
     */
    void process_DotPoscript_preferences(Writer stream,
    DisplayPref pref) {
        // Remember: These are preferences that only make sense for the
        // Postscript Display
        float pageSizeX = pref.get_page_size_x();
        float pageSizeY = pref.get_page_size_y();
        float graphSizeX = pref.get_graph_size_x();
        float graphSizeY = pref.get_graph_size_y();
        int orientation;
        orientation = pref.get_orientation();
        int ratio;
        ratio = pref.get_ratio();
        
        try{
            stream.write("page = \"" + pageSizeX + ","
            + pageSizeY + "\";\n"
            + "size = \"" + graphSizeX + ","
            + graphSizeY + "\";\n");
            if (orientation == pref.DisplayLandscape)
                stream.write("orientation = landscape;\n");
            else
                stream.write("orientation = portrait;\n");
            if (ratio == pref.RatioFill)
                stream.write("ratio = fill;\n");
        }catch(IOException e){e.printStackTrace();}
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲男同1069视频| 奇米精品一区二区三区在线观看| 欧美日韩一区不卡| gogogo免费视频观看亚洲一| 韩国精品一区二区| 老司机一区二区| 韩国中文字幕2020精品| 91女人视频在线观看| 欧美色中文字幕| 欧美精品乱码久久久久久按摩| 在线观看一区二区精品视频| 欧美性生活久久| 中文字幕欧美国产| 国产精品美女久久久久久2018| 日本一区二区电影| 麻豆视频一区二区| 成人黄色在线视频| 91浏览器打开| 中文字幕乱码日本亚洲一区二区| 美女尤物国产一区| 欧美日韩色一区| 日韩毛片在线免费观看| 亚洲成a人在线观看| 国产综合久久久久久鬼色| 在线综合视频播放| 国产视频911| 国产精品免费人成网站| 国产福利91精品一区| 99久久99久久精品免费看蜜桃| 91网上在线视频| 国产精品电影院| 青椒成人免费视频| 欧美精品一二三| 天天色综合天天| 国产精品2024| 欧美午夜影院一区| 亚洲午夜久久久久久久久电影院| 麻豆freexxxx性91精品| 91精品一区二区三区在线观看| 午夜久久久久久久久久一区二区| 欧美精品乱码久久久久久| 日韩福利视频导航| 97久久久精品综合88久久| 亚洲欧洲一区二区在线播放| 日本欧美久久久久免费播放网| 欧美日本一区二区三区四区| 中文字幕乱码久久午夜不卡 | 亚洲国产精品精华液ab| 国产成人高清视频| 亚洲女人的天堂| 欧美日韩美少妇| 久久激情五月婷婷| 国产三级精品三级在线专区| 亚洲国产毛片aaaaa无费看| 欧美日韩免费在线视频| 免费久久精品视频| 国产丝袜在线精品| 色综合久久综合网97色综合 | 欧美丝袜丝nylons| 免费日本视频一区| 国产免费成人在线视频| 91美女片黄在线观看| 婷婷中文字幕综合| 中文一区一区三区高中清不卡| 色悠久久久久综合欧美99| 婷婷夜色潮精品综合在线| 国产欧美精品一区二区三区四区| 91免费国产视频网站| 青青国产91久久久久久| 中文字幕一区二区三| 91 com成人网| fc2成人免费人成在线观看播放| 天堂一区二区在线免费观看| 91麻豆国产福利精品| 琪琪久久久久日韩精品| 中文字幕va一区二区三区| 911精品国产一区二区在线| 成人app网站| 韩国女主播成人在线观看| 亚洲一区二区三区中文字幕| 99久久国产综合精品女不卡| 免费高清成人在线| 亚洲精选免费视频| 在线观看视频91| 成人黄页在线观看| 国产在线视频一区二区三区| 亚洲超丰满肉感bbw| 亚洲色图19p| 中文在线一区二区 | 欧美高清hd18日本| 99r精品视频| 国产精品亚洲人在线观看| 午夜亚洲福利老司机| 亚洲三级电影全部在线观看高清| 日韩女优电影在线观看| 麻豆国产精品一区二区三区| 一区二区三区在线观看视频| 欧美亚洲国产bt| caoporm超碰国产精品| 国产乱码一区二区三区| 美女视频黄频大全不卡视频在线播放| 亚洲色图清纯唯美| 国产精品久久久99| 国产精品三级视频| 国产欧美日韩精品a在线观看| 精品1区2区在线观看| 成人国产精品免费观看动漫| 国产一区二区调教| 国产精品网曝门| 精品1区2区在线观看| 精品欧美乱码久久久久久1区2区| 成人av手机在线观看| 国产精品乡下勾搭老头1| 国产最新精品免费| 国内精品国产三级国产a久久| 久久精品国产999大香线蕉| 蜜桃视频第一区免费观看| 日韩精品欧美成人高清一区二区| 亚洲中国最大av网站| 五月天激情综合| 亚洲va国产va欧美va观看| 午夜精品一区二区三区三上悠亚| 亚洲国产婷婷综合在线精品| 日韩电影在线免费| 蜜桃视频第一区免费观看| 国内成人免费视频| 国产精品一卡二| 成人h动漫精品一区二区| 91亚洲精品久久久蜜桃| 在线观看成人免费视频| 欧美日产在线观看| 日韩精品一区国产麻豆| 久久久久久久久99精品| 欧美日韩色一区| 日韩欧美激情四射| 国产视频视频一区| 亚洲欧美aⅴ...| 五月婷婷久久综合| 狠狠色丁香久久婷婷综| gogogo免费视频观看亚洲一| 欧美唯美清纯偷拍| 日韩欧美一级二级| 中文字幕av在线一区二区三区| 亚洲精品日韩综合观看成人91| 亚洲国产成人av网| 国内久久婷婷综合| 91蜜桃免费观看视频| 欧美成人高清电影在线| 亚洲婷婷综合久久一本伊一区| 偷拍与自拍一区| 成人免费黄色大片| 成人黄色免费短视频| 在线看不卡av| 久久精品视频在线免费观看 | 国产精品精品国产色婷婷| 亚洲国产视频一区| 国产精品一区二区黑丝| 欧美亚洲尤物久久| 日本一区二区视频在线观看| 亚洲福利一二三区| 成人免费视频app| 欧美一个色资源| 欧美丝袜第三区| 久久久五月婷婷| 午夜精品爽啪视频| 99视频有精品| 精品伦理精品一区| 樱花影视一区二区| 成人免费看视频| 精品久久人人做人人爱| 一区2区3区在线看| av电影在线不卡| 精品粉嫩aⅴ一区二区三区四区| 亚洲一区二区三区视频在线播放| 国产激情一区二区三区| 欧美电影免费观看高清完整版在| 亚洲激情图片小说视频| 波多野结衣精品在线| 精品国产伦一区二区三区观看体验| 亚洲午夜一区二区| 91免费看视频| 国产精品乱码妇女bbbb| 国产一区二区三区观看| 欧美精品一卡两卡| 午夜精品久久久久久久99水蜜桃| 91亚洲国产成人精品一区二三| 国产欧美一区二区精品性色超碰| 久久超碰97中文字幕| 日韩午夜在线观看| 日韩在线一二三区| 欧美夫妻性生活| 偷拍日韩校园综合在线| 欧美日韩一二三| 日韩精品五月天| 欧美精三区欧美精三区| 日韩国产精品91| 欧美xxxxxxxx| 国产精品1区二区.| 国产精品初高中害羞小美女文| av午夜一区麻豆|