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

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

?? catgraph.java

?? ID3 分類決策數(shù)java代碼 需要ID3java代碼公用包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
package id3;
import java.io.*;
import java.util.*;
import shared.*;
import shared.Error;

/** CatGraph is a directed graph whose nodes have references to Categorizers.
 * Edges are labelled with the category number they match. The CatGraph can be
 * either complete or sparse. This is decided at the time of creation and
 * cannot be changed thereafter.								<P>
 *
 * For complete graphs:									<P>
 * Each node's first edge must be labelled either UNKNOWN_CATEGORY_VAL or
 * FIRST_CATEGORY_VAL. Each additional edge must be labelled with the next
 * category in ascending order.								<P>
 *
 * For sparse graphs:									<P>
 * A node may have zero or more children. Detection of a child can be done
 * using the get_child_if_exists() function, which returns a reference to the
 * child node if it exists, and otherwise returns a NULL reference.            <P>
 *
 * @author James Louis	2/25/2001	Ported to Java.
 * @author Jay DeSouza	8/13/97	Added handling for sparse graphs
 * @author Richard Long	8/20/93	Initial revision (.c)
 * @author Richard Long	8/19/93	Initial revision (.h)
 */
public class CatGraph {
    /** The CGraph object containing the graph used for this CatGraph.
     */
    protected CGraph cGraph;
    /** TRUE if the graph is allocated, FALSE if the graph is set to NULL.
     */
    boolean graphAlloc;
    /** TRUE if the graph is sparsely generated.
     */
    boolean isSparse;
    /** Logging options for this class.
     */
    protected LogOptions logOptions = new LogOptions();
    /** Distribution display help string.
     */
    protected String distDispHelp = "This option specifies whether to display the "+
    "distribution of instances of the nodes in the graph while displaying. ";
    /** The default value for distribution display. The default is FALSE.
     */
    protected boolean defaultDistDisp = false;
    
    
    /** Sets the logging level for this object.
     * @param level	The new logging level.
     */
    public void set_log_level(int level){logOptions.set_log_level(level);}
    
    /** Returns the logging level for this object.
     * @return The logging level for this object.
     */
    public int  get_log_level(){return logOptions.get_log_level();}
    
    /** Sets the stream to which logging options are displayed.
     * @param strm	The stream to which logs will be written.
     */
    public void set_log_stream(Writer strm)
    {logOptions.set_log_stream(strm);}
    
    /** Returns the stream to which logs for this object are written.
     * @return The stream to which logs for this object are written.
     */
    public Writer get_log_stream(){return logOptions.get_log_stream();}
    
    /** Returns the LogOptions object for this object.
     * @return The LogOptions object for this object.
     */
    public LogOptions get_log_options(){return logOptions;}
    
    /** Sets the LogOptions object for this object.
     * @param opt	The new LogOptions object.
     */
    public void set_log_options(LogOptions opt)
    {logOptions.set_log_options(opt);}
    
    /** Sets the logging message prefix for this object.
     * @param file	The file name to be displayed in the prefix of log messages.
     * @param line	The line number to be displayed in the prefix of log messages.
     * @param lvl1 The log level of the statement being logged.
     * @param lvl2	The level of log messages being displayed.
     */
    public void set_log_prefixes(String file, int line,int lvl1, int lvl2)
    {logOptions.set_log_prefixes(file, line, lvl1, lvl2);}
    
    /** Constructor.
     * @param isGraphSparse	TRUE if this CatGraph is sparsely populated. FALSE
     * otherwise.
     */
    public CatGraph(boolean isGraphSparse) {
        cGraph = new CGraph();
        isSparse = isGraphSparse;
        graphAlloc = true;
        logOptions = new LogOptions();
        logOptions.LOG(3, "CatGraph::CatGraph(Bool isGraphSparse): isSparse = "
        + isSparse + " is_sparse() = " + is_sparse() + '\n');
    }
    
    /** Constructor.
     * @param aGraph		CGraph on which all operations will take place. It
     * should remain unchanged while a part of this
     * CatGraph object.
     * @param isGraphSparse	TRUE if this CatGraph is sparsely populated. FALSE
     * otherwise.
     */
    public CatGraph(CGraph aGraph, boolean isGraphSparse) {
        cGraph = aGraph;
        isSparse = isGraphSparse;
        graphAlloc = false;
        logOptions = new LogOptions();
        logOptions.LOG(6, "CatGraph::CatGraph(CGraph, Bool): isSparse = "
        + isSparse + " is_sparse() = " + is_sparse() + '\n');
    }
    
    /** Checks if this CatGraph is sparsely populated.
     * @return TRUE if this CatGraph is sparsely populated.
     */
    public boolean is_sparse() {
        return isSparse;
    }
    
    /** Returns the number of Nodes in this CatGraph.
     * @return The number of Nodes in this CatGraph.
     */
    public int num_nodes() {
        return cGraph.number_of_nodes();
    }
    
    /** Returns the number of leaves in this CatGraph.
     * @return The number of leaves in this CatGraph.
     */
    public int num_leaves() {
        return cGraph.num_leaves();
    }
    
    /** Returns the CGraph stored in this CatGraph object.
     * @return The CGraph stored in this CatGraph object.
     */
    public CGraph get_graph() {
        return cGraph;
    }
    
    /** Returns the number of attributes stored in this CatGraph.
     * @return The number of attributes stored in this CatGraph.
     * @param maxAttr	The maximum number of attributes stored in the CatGraph.
     */
    public int num_attr(int maxAttr) {
        return cGraph.num_attr(logOptions.get_log_options() , maxAttr);
    }
    
    /** Creates a new Node.
     * @return The new Node.
     * @param cat		The Categorizer to be stored in the new Node.
     * @param level The level for the new node placement.
     */
    public Node create_node(NodeCategorizer[] cat, int level) {
        NodeInfo nodeInfo = cGraph.get_prototype() .create_my_type(level);
        nodeInfo.set_categorizer(cat);
        MLJ.ASSERT(cat[0] == null, "CatGraph::create_node: cat != NULL");
        return cGraph.new_node(nodeInfo);
    }
    
    /** Creates a directed Edge from Node "from" to Node "to". Assigns the Edge
     * the value "edgeLabel" and gets ownership of the AugCategory.             <P>
     * For non-sparse graphs:                                                 <BR>
     * The category given must be the category following the category for
     * the previous Edge.                                                       <BR>
     * The first Edge must have label UNKNOWN_CATEGORY_VAL or
     * FIRST_CATEGORY_VAL.
     *
     * @param from		The Node that is the source of the directed Edge.
     * @param to		The Node that is the destination of the directed Edge.
     * @param edgeLabel	The category to be assigned to the new Edge.
     */
    public void connect(Node from,Node to,
    AugCategory edgeLabel) {
        // grab these values in advance.  Makes debugging easier too.
        NodeInfo fromInfo =(NodeInfo) get_graph() .entry(from);
        NodeInfo toInfo =(NodeInfo) get_graph() .entry(to);
        NodeCategorizer fromCat = fromInfo.get_categorizer();
        NodeCategorizer toCat = toInfo.get_categorizer();
        
        if (!fromCat.in_graph())
            Error.fatalErr("CatGraph::connect: the \'from\' node "
            +fromCat.description()
            + " is not in the graph");
        if (!toCat.in_graph())
            Error.fatalErr("CatGraph::connect: the \'to\' node "
            +toCat.description()
            + " is not in the graph");
        logOptions.LOG(8, "CatGraph::connect: isSparse = " +isSparse
        + " is_sparse() = " +is_sparse()
        + " !is_sparse() = " +!is_sparse() + '\n');
        if (!is_sparse()) {
            if (from.outdeg() == 0 && edgeLabel.num() != Globals.FIRST_CATEGORY_VAL &&
            edgeLabel.num() != Globals.UNKNOWN_CATEGORY_VAL)
                Error.fatalErr("CatGraph::connect: The first edge must have label "
                +Globals.FIRST_CATEGORY_VAL+ " or "
                +Globals.UNKNOWN_CATEGORY_VAL+ ".  Given label was " +edgeLabel.num());
            if (from.outdeg() != 0 &&
            edgeLabel.num() != ((AugCategory) cGraph.inf(from.last_adj_edge())) .num() + 1)
                Error.fatalErr("CatGraph::connect: Edge label "
                + ((AugCategory) cGraph.inf(from.last_adj_edge())) .num() + 1
                + " must follow edge label "
                + ((AugCategory) cGraph.inf(from.last_adj_edge())) .num()
                + "; got edge label " + edgeLabel.num());
        }
        for(Edge edgePtr = from.First_Adj_Edge(0) ; edgePtr != null ; edgePtr = edgePtr.Succ_Adj_Edge(from))
            if ((cGraph.inf(edgePtr)) == edgeLabel) {
                Error.err("CatGraph::connect: Attempting to add a duplicate edge: "
                +edgeLabel
                + ".  Edge " + (cGraph.inf(edgePtr)) + " already exists. ");
            }
        cGraph.new_edge(from, to, edgeLabel);
        edgeLabel = null;
    }
    
    /** Returns the number of children the specified Node has.
     * @return The number of children the specified Node has.
     * @param parent	The specified Node.
     */
    public int num_children(Node parent) {
        return parent.outdeg();
    }
    
    /** Returns the NodeCategorizer stored in the specified Node.
     * @return The NodeCategorizer stored in the specified Node.
     * @param nodePtr The Node containing the NodeCategorizer.
     */
    public NodeCategorizer get_categorizer(Node nodePtr) {
        return((NodeInfo) cGraph.inf(nodePtr)) .get_categorizer();
    }
    
    /** Checks if specified Node is in this NatGraph object.
     * @return TRUE if the Node is a node that is in the CatGraph. Otherwise,
     * returns FALSE.
     * @param node			The Node to be looked for.
     * @param fatalOnFalse	TRUE if an error message should be displayed if the
     * specified Node is not in the CatGraph, FALSE
     * otherwise.
     */
    public boolean check_node_in_graph(Node node,
    boolean fatalOnFalse) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区不卡在线观看 | 午夜伦理一区二区| www..com久久爱| 亚洲欧美另类综合偷拍| 欧美中文字幕一区二区三区亚洲| 国产精品久久久久久一区二区三区 | 暴力调教一区二区三区| 亚洲一区在线视频观看| 26uuuu精品一区二区| 色综合久久久久久久久| 久久国产夜色精品鲁鲁99| 中文字幕免费不卡在线| 欧美二区乱c少妇| 成人夜色视频网站在线观看| 亚洲美女在线一区| 久久精品亚洲国产奇米99| 欧美卡1卡2卡| 在线观看一区不卡| 成人精品一区二区三区四区 | 中文在线一区二区| 欧美日韩亚洲高清一区二区| a4yy欧美一区二区三区| 精品一区二区三区免费视频| 亚洲午夜精品在线| 亚洲女同女同女同女同女同69| 精品国产乱码久久久久久久久 | 色久综合一二码| 国产v综合v亚洲欧| 成人中文字幕电影| 成人av网站免费观看| a亚洲天堂av| 色综合天天综合色综合av | 国产91精品露脸国语对白| 精品午夜久久福利影院| 久久国产三级精品| 麻豆成人综合网| 国产成人aaaa| 94-欧美-setu| 91精品欧美一区二区三区综合在 | 国产欧美一二三区| 中文字幕第一区二区| 亚洲精品免费看| 午夜视频久久久久久| 久久精品国产一区二区三区免费看| 日韩福利视频网| 国产精品77777| 欧美午夜精品理论片a级按摩| 欧美精选一区二区| 欧美国产成人精品| 丝袜美腿高跟呻吟高潮一区| 美日韩一级片在线观看| 色综合久久中文综合久久97| 日韩欧美国产麻豆| 亚洲日穴在线视频| 久久99久久精品欧美| 96av麻豆蜜桃一区二区| 2020日本不卡一区二区视频| 亚洲日本青草视频在线怡红院| 婷婷久久综合九色国产成人| 成人午夜在线播放| 久久青草国产手机看片福利盒子| 亚洲一区二区美女| 日本久久一区二区三区| 日本一区二区免费在线观看视频| 石原莉奈在线亚洲三区| 欧美性感一类影片在线播放| 国产精品久久久久久久久免费樱桃| 日韩av在线播放中文字幕| 在线中文字幕一区二区| 亚洲另类色综合网站| 91免费看`日韩一区二区| 久久伊99综合婷婷久久伊| 蜜臀av一区二区| 欧美一区二区播放| 激情综合一区二区三区| 精品美女在线播放| 国产精品亚洲人在线观看| 欧美不卡视频一区| 国产一区二区在线影院| 久久看人人爽人人| 99这里都是精品| 亚洲伊人色欲综合网| 欧美一区二区日韩一区二区| 另类小说综合欧美亚洲| 国产欧美精品国产国产专区| 不卡在线视频中文字幕| 综合久久国产九一剧情麻豆| 日本乱人伦aⅴ精品| 蜜芽一区二区三区| 亚洲欧美综合色| 欧美日本视频在线| 国产成人一级电影| 丝袜a∨在线一区二区三区不卡| 欧美一级二级三级乱码| jiyouzz国产精品久久| 麻豆视频一区二区| 亚洲色图一区二区| 久久影院午夜片一区| 欧美日韩五月天| 99久久久国产精品| 精品无人码麻豆乱码1区2区 | 国产成人一区二区精品非洲| 亚洲一区二区三区视频在线播放 | 久久综合999| 欧美私人免费视频| 色综合久久久久| av一本久道久久综合久久鬼色| 免费欧美日韩国产三级电影| 夜夜亚洲天天久久| 亚洲精品中文在线| 亚洲久草在线视频| 亚洲日本在线a| 夜夜揉揉日日人人青青一国产精品 | 亚洲欧美日韩人成在线播放| 久久精品一区二区三区四区| www久久精品| xf在线a精品一区二区视频网站| 欧美成人猛片aaaaaaa| 欧美一区二区三区视频在线| 666欧美在线视频| 日韩精品专区在线影院观看| 欧美一区二区成人6969| 日韩免费看的电影| 欧美激情在线观看视频免费| 久久九九99视频| 一区二区三区中文字幕电影| 亚洲国产精品久久一线不卡| 免费在线看一区| 成人毛片老司机大片| 欧美特级限制片免费在线观看| 欧美理论片在线| 久久精品一区二区三区不卡牛牛| 国产午夜三级一区二区三| 有坂深雪av一区二区精品| 日韩成人免费看| 色又黄又爽网站www久久| 日韩一本二本av| 一区二区三区在线观看国产| 久久精品国产999大香线蕉| www.久久久久久久久| 4438x亚洲最大成人网| 国产精品视频在线看| 日韩精品免费专区| 色综合久久久久久久久久久| 精品国产乱码久久久久久闺蜜| 亚洲天天做日日做天天谢日日欢| 日本三级韩国三级欧美三级| 色诱视频网站一区| 国产精品人妖ts系列视频| 美腿丝袜一区二区三区| 欧美亚洲综合色| 亚洲尤物视频在线| 在线免费观看视频一区| 国产精品久久久久9999吃药| 粉嫩aⅴ一区二区三区四区五区| 日韩三级精品电影久久久| 亚洲不卡一区二区三区| 91国偷自产一区二区开放时间| 国产精品网站在线| 高清国产一区二区| 亚洲精品乱码久久久久久久久 | 日本一区二区免费在线| 懂色av一区二区三区免费看| 国产午夜精品久久久久久免费视 | 精品久久久久久亚洲综合网| 日韩av中文字幕一区二区三区| 91麻豆精品国产| 精品一区二区三区影院在线午夜 | 国产精品久久免费看| 国产麻豆一精品一av一免费| 国产精品久久久久影视| 日本精品裸体写真集在线观看| 亚洲综合男人的天堂| 欧美二区在线观看| 国产麻豆精品在线观看| 中文字幕中文字幕一区二区 | 精品嫩草影院久久| 99久久精品一区| 九九久久精品视频| 亚洲男同性恋视频| 精品久久久久一区二区国产| 91蜜桃视频在线| 国产一区二区伦理片| 一区二区三区精密机械公司| 久久久噜噜噜久久中文字幕色伊伊| 成人av网站在线| 久久成人免费网站| 亚洲精品乱码久久久久久| 国产亚洲欧洲一区高清在线观看| 色综合天天综合在线视频| 国产一区二区调教| 麻豆精品一区二区三区| 亚洲国产一区二区a毛片| 最新热久久免费视频| 国产欧美一区二区精品性| 久久夜色精品一区| 国产日韩欧美精品一区| 久久久久久久久蜜桃| 欧美xfplay| 久久免费美女视频|