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

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

?? catgraph.java

?? java數據挖掘算法
?? 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一区二区三区免费野_久草精品视频
国产资源在线一区| 国产亚洲欧美在线| 一区二区在线观看不卡| 99国产精品国产精品毛片| 国产精品理论片在线观看| 99re视频精品| 一区二区久久久久| 欧美日韩1区2区| 蜜臀91精品一区二区三区| 精品日韩av一区二区| 国产成人综合精品三级| 国产精品久久久久久久久久免费看 | 国产日产精品1区| aa级大片欧美| 亚洲成人午夜影院| 日韩午夜小视频| 国产精品77777竹菊影视小说| 国产精品色哟哟| 欧美丝袜丝交足nylons图片| 久久国产日韩欧美精品| 中文字幕一区三区| 欧美日本在线播放| 国产不卡高清在线观看视频| 亚洲乱码国产乱码精品精小说 | 精品一区二区三区免费播放| 国产精品午夜久久| 91精品国产综合久久香蕉麻豆| 国产精品影视在线观看| 亚洲一区二区欧美| 久久一区二区三区四区| 色一区在线观看| 久久精品国产成人一区二区三区 | 欧美日韩一区高清| 国产精品综合在线视频| 一区二区成人在线视频| 日韩一区二区在线观看| 色婷婷国产精品综合在线观看| 日韩黄色一级片| 国产欧美一区二区三区网站| 欧美亚洲动漫精品| 大白屁股一区二区视频| 日韩高清在线不卡| 亚洲欧美激情插| 国产色产综合产在线视频| 欧美人体做爰大胆视频| 97久久超碰国产精品电影| 精品午夜久久福利影院| 午夜精品福利久久久| 最新日韩在线视频| 精品久久久三级丝袜| 在线观看精品一区| 高清国产一区二区三区| 奇米亚洲午夜久久精品| 亚洲一区在线看| 亚洲成av人片在线| 中文字幕一区不卡| 欧美激情中文不卡| 久久久久久亚洲综合影院红桃| 欧美男男青年gay1069videost | 欧美色综合网站| 91丨porny丨国产入口| 国产福利一区二区三区在线视频| 美女被吸乳得到大胸91| 日韩国产欧美三级| 亚洲国产精品尤物yw在线观看| 1024亚洲合集| 日韩美女视频一区| 亚洲欧洲日韩在线| 国产午夜精品久久久久久久| 久久―日本道色综合久久| 91精品国产高清一区二区三区蜜臀| 在线看一区二区| 欧美图片一区二区三区| 在线视频观看一区| 欧美日韩精品系列| 欧美日韩国产另类一区| 欧美精品丝袜中出| 91精品国产综合久久精品性色| 欧美日韩高清在线播放| 欧美日韩国产综合一区二区| 日本道精品一区二区三区| 色综合久久久网| 在线免费一区三区| 欧美日韩情趣电影| 91精品国产91综合久久蜜臀| 67194成人在线观看| 日韩欧美你懂的| 精品国产免费一区二区三区四区 | 久久精品视频免费| 国产精品萝li| 亚洲精品欧美在线| 亚洲成人激情综合网| 免费在线观看一区| 国产精品一区二区无线| 波多野结衣视频一区| 色综合色综合色综合 | 日韩激情av在线| 国产综合色视频| 99久久久无码国产精品| 欧美中文字幕一区二区三区亚洲| 欧美一级一区二区| 2020国产精品| 亚洲少妇30p| 日韩成人精品在线观看| 国产高清无密码一区二区三区| 成人美女视频在线观看| 欧美在线999| 精品成人私密视频| 亚洲激情自拍偷拍| 久久91精品久久久久久秒播| 高清在线观看日韩| 欧美二区乱c少妇| 国产婷婷精品av在线| 亚洲成人www| 成人久久18免费网站麻豆| 3d动漫精品啪啪一区二区竹菊| 久久久久99精品一区| 亚洲国产美女搞黄色| 国产专区欧美精品| 色综合欧美在线| 精品国产1区2区3区| 亚洲美女一区二区三区| 久久精品国产久精国产| 在线观看视频一区| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲成人1区2区| 丁香一区二区三区| 日韩亚洲欧美高清| 亚洲精品国产一区二区三区四区在线| 免费人成精品欧美精品| 91天堂素人约啪| 久久亚洲一级片| 天堂在线亚洲视频| 日本韩国欧美三级| 国产精品视频观看| 韩国视频一区二区| 9191精品国产综合久久久久久| 中文字幕在线观看不卡| 精品综合久久久久久8888| 欧美三级日韩三级| 中文字幕亚洲精品在线观看| 久久99热99| 欧美精品亚洲一区二区在线播放| 成人欧美一区二区三区白人| 国产乱子伦视频一区二区三区| 欧美一级精品在线| 亚洲va国产天堂va久久en| 91欧美一区二区| 亚洲欧洲国产日本综合| 91毛片在线观看| 国产精品成人免费| 国产 欧美在线| 国产欧美精品一区二区色综合朱莉| 另类小说视频一区二区| 91精品福利在线一区二区三区| 亚洲福利国产精品| 欧美性一二三区| 一区二区三区电影在线播| 色婷婷国产精品| 一区二区三区在线观看视频| 99久久99久久精品国产片果冻| 亚洲国产成人在线| 不卡的av网站| 中文字幕在线不卡一区| 99re热这里只有精品视频| 成人欧美一区二区三区视频网页| 不卡的电影网站| 亚洲欧美日韩国产综合在线| 91成人国产精品| 香蕉av福利精品导航| 91精品国产色综合久久不卡电影| 婷婷国产在线综合| 91精品国产福利在线观看 | 国产乱码精品一区二区三| 久久久久国产精品麻豆| 成人午夜碰碰视频| 国产精品美女久久久久久久久| 成人av免费在线播放| 亚洲色图欧洲色图| 欧美优质美女网站| 日本欧美加勒比视频| 26uuu久久天堂性欧美| 成人免费毛片片v| 亚洲免费在线观看视频| 欧美系列亚洲系列| 日本sm残虐另类| 精品久久久久久久人人人人传媒| 国产一区在线不卡| 日韩美女视频一区二区| 欧美日韩激情一区二区| 久久精品国产99久久6| 欧美极品aⅴ影院| 在线观看成人小视频| 久久精品国产77777蜜臀| 欧美激情综合网| 欧美日产国产精品| 国产福利一区二区三区视频在线 | 久久久久久97三级| 不卡的av网站| 日本女人一区二区三区|