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

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

?? catgraph.java

?? java數(shù)據(jù)挖掘算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产精品99久久人人澡| 欧美影院午夜播放| jizzjizzjizz欧美| 91精品办公室少妇高潮对白| 欧美久久久久中文字幕| 精品国内二区三区| 亚洲欧美福利一区二区| 日韩精品乱码av一区二区| 国产成人亚洲综合a∨猫咪| 色狠狠色狠狠综合| 日韩欧美精品在线| 亚洲欧洲成人自拍| 蜜臀久久久久久久| 成人的网站免费观看| 欧美人妇做爰xxxⅹ性高电影| 精品国产凹凸成av人导航| 国产精品嫩草影院av蜜臀| 午夜精品久久久久久久久久久| 成人综合在线观看| 7777精品伊人久久久大香线蕉最新版 | 欧美大尺度电影在线| 国产精品天干天干在观线| 日本女优在线视频一区二区| 国产成a人亚洲精| 欧美精品乱人伦久久久久久| 26uuu亚洲综合色欧美| 一区二区三区欧美| 国产精品小仙女| 6080日韩午夜伦伦午夜伦| √…a在线天堂一区| 日韩和的一区二区| 日本高清不卡视频| 亚洲欧美乱综合| 日韩欧美亚洲一区二区| 午夜婷婷国产麻豆精品| 日本福利一区二区| 色哟哟一区二区| 亚洲高清一区二区三区| 国产在线不卡一区| 欧美色图第一页| 久久夜色精品国产噜噜av| 亚洲成人免费观看| 国模冰冰炮一区二区| 在线观看亚洲一区| 中文字幕精品—区二区四季| 九九热在线视频观看这里只有精品| 9色porny自拍视频一区二区| 欧美精品一区二区三区在线| 天天色 色综合| 欧美亚洲精品一区| 成人免费在线播放视频| 国产精一区二区三区| 538prom精品视频线放| 亚洲综合久久久| 国产99久久久国产精品潘金网站| 日韩一区和二区| 日韩综合在线视频| 色综合久久中文综合久久97| 成人免费在线视频观看| 99精品视频在线免费观看| 久久久久久久电影| 精品一区二区三区免费毛片爱| 91精品国产91综合久久蜜臀| 亚洲国产成人va在线观看天堂| 色婷婷av一区二区| 亚洲日本青草视频在线怡红院| 成人精品视频一区二区三区尤物| 国产丝袜美腿一区二区三区| 国产黑丝在线一区二区三区| 精品国产一区二区三区久久久蜜月| 蜜臀av亚洲一区中文字幕| 欧美精品日韩一区| 美日韩一区二区| 日韩小视频在线观看专区| 青青草伊人久久| 日韩精品一区二区三区四区视频 | 成人一级视频在线观看| 国产婷婷色一区二区三区在线| 国产麻豆一精品一av一免费| 久久久久亚洲蜜桃| 国产一区二区三区四| 国产午夜久久久久| 成人黄色片在线观看| 亚洲丝袜美腿综合| 在线观看三级视频欧美| 亚洲一区二区三区国产| 6080国产精品一区二区| 国产在线精品一区二区| 国产女人18水真多18精品一级做| 国产精品2024| 国产精品乱码人人做人人爱| 日日噜噜夜夜狠狠视频欧美人| 亚洲男人的天堂在线aⅴ视频| 91精品国产综合久久小美女| 欧美一级片在线观看| 成人动漫中文字幕| 国产在线播精品第三| 亚洲激情图片一区| 国产精品日产欧美久久久久| 日韩久久精品一区| 欧美日韩精品是欧美日韩精品| 丰满岳乱妇一区二区三区| 日韩1区2区日韩1区2区| 天天亚洲美女在线视频| 午夜精品福利久久久| 日韩欧美第一区| 欧美性受xxxx| 蜜臀av性久久久久av蜜臀妖精| 久久久精品天堂| 91亚洲男人天堂| 午夜精品一区在线观看| 精品成人佐山爱一区二区| 蜜臀a∨国产成人精品| 日韩一本二本av| 波多野结衣在线aⅴ中文字幕不卡| 洋洋av久久久久久久一区| 这里是久久伊人| 成人做爰69片免费看网站| 亚洲国产毛片aaaaa无费看| 日韩免费看的电影| 91片在线免费观看| 日韩电影在线免费看| 国产精品热久久久久夜色精品三区| 欧美在线观看一区| 国产一区二区三区精品视频| 亚洲曰韩产成在线| 国产日韩一级二级三级| 欧美性xxxxxx少妇| 国产精品123| 无码av中文一区二区三区桃花岛| 国产夜色精品一区二区av| 91美女蜜桃在线| 国产一区在线观看视频| 免费观看在线综合| 久久久久国产精品麻豆| 国产精品亚洲第一区在线暖暖韩国 | 婷婷国产v国产偷v亚洲高清| 国产农村妇女毛片精品久久麻豆| 欧美网站一区二区| 亚洲激情av在线| 久久午夜电影网| caoporm超碰国产精品| 一区二区三区美女视频| 欧美精三区欧美精三区| 日产精品久久久久久久性色| 亚洲精品一线二线三线| 欧美在线免费播放| 成人av电影在线观看| 久久成人羞羞网站| 亚洲福利电影网| 国产日产欧美精品一区二区三区| 欧美日韩国产天堂| 99久久精品免费精品国产| 国产福利91精品一区| 蜜臀99久久精品久久久久久软件| 一区二区三区美女| 中文字幕日韩一区二区| 久久丝袜美腿综合| 日韩久久精品一区| 欧美一区二区啪啪| 欧美午夜精品久久久久久孕妇| 成人ar影院免费观看视频| 激情综合色综合久久| 麻豆国产精品一区二区三区| 亚洲国产精品一区二区久久| 亚洲婷婷国产精品电影人久久| 国产欧美综合在线| 久久品道一品道久久精品| 日韩视频免费观看高清完整版| 欧美日韩一区 二区 三区 久久精品 | 色呦呦日韩精品| av在线播放不卡| 丁香激情综合五月| 国产成人在线视频播放| 国产一区亚洲一区| 国产一区三区三区| 国产成人精品亚洲午夜麻豆| 国内精品免费**视频| 国产一区二区三区香蕉| 国产一区二区精品久久| 国产一区二区不卡老阿姨| 久久精品国产一区二区| 美女网站在线免费欧美精品| 免费在线观看日韩欧美| 蜜臀久久99精品久久久久久9 | 欧美狂野另类xxxxoooo| 91高清在线观看| 在线一区二区三区做爰视频网站| 色综合色综合色综合色综合色综合 | 久久影院午夜片一区| 久久综合av免费| 久久久91精品国产一区二区精品| 久久一二三国产| 欧美激情一区二区三区在线| 国产精品毛片无遮挡高清| 国产精品美女久久久久久久网站| 亚洲欧洲www| 亚洲一区欧美一区| 天天av天天翘天天综合网 | 久久欧美中文字幕|