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

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

?? catgraph.java

?? 數據倉庫挖掘與開發 ID3算法實現代碼
?? 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) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本一区二区三区dvd视频在线| 日韩亚洲欧美成人一区| 午夜伊人狠狠久久| 一区二区三区四区不卡视频| 亚洲欧美欧美一区二区三区| 一色桃子久久精品亚洲| 综合av第一页| 亚洲成av人在线观看| 日韩精品一级二级| 免费日韩伦理电影| 激情成人午夜视频| av激情综合网| 在线免费观看日韩欧美| 欧美日韩一区二区电影| 日韩午夜av电影| 日本一区二区三区久久久久久久久不 | 欧美高清性hdvideosex| 欧美高清精品3d| 精品久久一区二区三区| 国产日韩三级在线| 亚洲午夜在线视频| 久久 天天综合| 国产成人99久久亚洲综合精品| eeuss鲁片一区二区三区| 色综合网站在线| 91麻豆精品91久久久久同性| 精品国精品国产| 日韩理论片中文av| 亚洲成人免费在线| 国产精品影视天天线| 欧美综合亚洲图片综合区| 欧美一区二区观看视频| 国产情人综合久久777777| 亚洲免费观看高清| 美洲天堂一区二卡三卡四卡视频| 国产乱对白刺激视频不卡| 99国产精品99久久久久久| 欧美蜜桃一区二区三区| 久久久99久久精品欧美| 亚洲综合激情网| 国产盗摄女厕一区二区三区| 欧美午夜精品一区二区三区| 久久久国产综合精品女国产盗摄| 亚洲综合免费观看高清在线观看| 日本va欧美va精品| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 欧美三级三级三级| 国产喷白浆一区二区三区| 亚洲一区在线看| 成人高清免费观看| 精品国产一区二区三区久久影院| 一区二区三区波多野结衣在线观看| 激情久久五月天| 777xxx欧美| 伊人婷婷欧美激情| 国产 欧美在线| 欧美电影免费观看高清完整版在| 亚洲在线观看免费| 成人av电影免费在线播放| 久久在线免费观看| 蜜桃视频在线观看一区| 欧美三级乱人伦电影| 亚洲色图第一区| 福利91精品一区二区三区| 日韩一区二区免费视频| 亚洲国产裸拍裸体视频在线观看乱了| 成人一区二区三区中文字幕| 欧美tickle裸体挠脚心vk| 免费成人深夜小野草| 777精品伊人久久久久大香线蕉| 亚洲精品乱码久久久久久久久| 成人精品鲁一区一区二区| 久久综合九色综合97婷婷女人| 免费成人在线播放| 日韩欧美一区二区不卡| 青青青伊人色综合久久| 日韩一区二区电影| 日韩av成人高清| 日韩女优毛片在线| 精品一区二区免费视频| 精品美女在线观看| 国产麻豆午夜三级精品| 精品第一国产综合精品aⅴ| 久久99精品久久久久久动态图| 欧美一区二区人人喊爽| 麻豆专区一区二区三区四区五区| 欧美一区二区福利在线| 韩国三级在线一区| 久久久久久久久久看片| 国产98色在线|日韩| 亚洲视频在线一区二区| 欧洲激情一区二区| 午夜精品福利一区二区三区av| 欧美日韩精品一区二区在线播放| 日韩影院在线观看| 精品国一区二区三区| 国产精品一区不卡| 亚洲少妇30p| 4438亚洲最大| 国产在线精品国自产拍免费| 国产精品美女久久久久久久| 91高清在线观看| 视频一区二区三区入口| 国产亚洲欧洲一区高清在线观看| 波多野结衣中文字幕一区二区三区| 亚洲美女免费在线| 欧美不卡视频一区| 成人小视频免费在线观看| 亚洲国产婷婷综合在线精品| 日韩一区二区在线观看视频播放| 国产一区二区三区久久久| 亚洲欧美日韩一区| 欧美一级二级在线观看| 91理论电影在线观看| 免费av网站大全久久| 中文字幕巨乱亚洲| 在线不卡免费av| 不卡在线观看av| 免费观看在线色综合| 亚洲欧美一区二区三区极速播放 | 美女网站一区二区| 亚洲精品日韩专区silk| 亚洲精品一区二区三区香蕉| 一本大道av一区二区在线播放| 激情综合一区二区三区| 亚洲大片免费看| 中文字幕一区二区三区不卡 | 日韩欧美自拍偷拍| 91网页版在线| 国产精品一区二区黑丝| 五月婷婷另类国产| 亚洲综合在线第一页| 国产亚洲成av人在线观看导航| 欧美日本免费一区二区三区| 99久久久精品| 国产精品一区三区| 免费成人在线视频观看| 午夜久久久影院| 亚洲视频电影在线| 国产精品久久久久久福利一牛影视 | 久久伊99综合婷婷久久伊| 91精品国产91久久综合桃花| 欧美视频一区二区三区在线观看| 懂色av噜噜一区二区三区av| 国内一区二区在线| 另类成人小视频在线| 欧美aaaaa成人免费观看视频| 亚洲成人免费电影| 亚洲成人自拍网| 亚洲一区电影777| 亚洲女爱视频在线| 亚洲特黄一级片| 亚洲色图清纯唯美| 亚洲精品成人a在线观看| 亚洲精品日韩一| 一区二区在线电影| 亚洲综合免费观看高清完整版 | 狠狠色狠狠色综合系列| 精品亚洲porn| 国产在线一区二区综合免费视频| 久久精品国产一区二区| 免费xxxx性欧美18vr| 极品少妇xxxx精品少妇| 国产成人免费视频一区| 99久久er热在这里只有精品15 | 亚洲一区二区成人在线观看| 亚洲激情自拍视频| 亚洲成a人v欧美综合天堂| 日韩高清电影一区| 激情综合网最新| 成人精品gif动图一区| av电影天堂一区二区在线观看| 91丨九色丨蝌蚪富婆spa| 精品视频在线免费观看| 欧美一级国产精品| 国产亚洲短视频| 伊人夜夜躁av伊人久久| 日韩1区2区3区| 国产激情一区二区三区| 99久久精品免费看国产免费软件| 在线观看日韩电影| 欧美大片一区二区| 自拍偷在线精品自拍偷无码专区 | 中文字幕成人在线观看| 亚洲精品美腿丝袜| 看片的网站亚洲| 成人久久视频在线观看| 欧美综合天天夜夜久久| 精品国一区二区三区| 亚洲免费观看视频| 久久99精品久久久久久久久久久久| 成人福利电影精品一区二区在线观看| 色av成人天堂桃色av| 精品精品欲导航| 亚洲毛片av在线| 国产美女视频一区| 欧美日本高清视频在线观看| 国产精品国产三级国产有无不卡 | 成人性生交大片免费看视频在线| 欧美视频在线观看一区|