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

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

?? catgraph.java

?? 數(shù)據(jù)倉庫挖掘與開發(fā) ID3算法實現(xiàn)代碼
?? 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一区二区三区免费野_久草精品视频
亚洲麻豆国产自偷在线| 91丝袜美女网| 精品国精品国产尤物美女| 日本欧美韩国一区三区| 欧美一卡二卡在线观看| 激情亚洲综合在线| 欧美国产成人在线| 91在线观看成人| 午夜一区二区三区视频| 日韩一区二区精品在线观看| 国内久久精品视频| 国产精品女主播av| 欧美性生活久久| 日韩二区三区四区| 国产拍欧美日韩视频二区| 91网站在线播放| 亚洲综合一二三区| 5月丁香婷婷综合| 青娱乐精品在线视频| 日韩欧美一区中文| 免费成人av在线| 久久精品一级爱片| 91麻豆精东视频| 亚洲精品乱码久久久久久| 欧美日韩视频在线观看一区二区三区| 亚洲大片免费看| 精品乱人伦小说| 国产精品影视网| 国产精品久久国产精麻豆99网站| 97se亚洲国产综合自在线不卡| 中文字幕日韩av资源站| 欧美影院精品一区| 麻豆精品一区二区av白丝在线| 亚洲精品一区在线观看| 成人av网在线| 五月激情六月综合| 久久日韩精品一区二区五区| 波多野结衣亚洲| 亚洲444eee在线观看| 26uuu国产电影一区二区| 成人午夜电影网站| 亚洲综合精品久久| 精品久久久网站| 成人aaaa免费全部观看| 肉丝袜脚交视频一区二区| 久久久不卡网国产精品二区 | 91在线视频免费91| 亚洲国产你懂的| 精品国产乱码久久久久久蜜臀| 99免费精品在线观看| 视频一区二区三区入口| 国产欧美日韩一区二区三区在线观看| 日本精品一区二区三区四区的功能| 日韩精品久久理论片| 国产精品福利一区二区| 777色狠狠一区二区三区| 成人av在线播放网址| 日韩国产精品大片| 亚洲欧美怡红院| 精品国产免费人成在线观看| 日本高清不卡在线观看| 国产精品综合一区二区| 亚洲最大成人综合| 精品久久久久久久久久久久久久久久久 | 国产三级一区二区| 在线播放视频一区| 99精品偷自拍| 国产99久久久国产精品| 美女脱光内衣内裤视频久久影院| 亚洲精品日产精品乱码不卡| 国产欧美精品一区二区色综合朱莉| 欧美日韩国产另类一区| 91丨九色丨蝌蚪富婆spa| 国产一区二区不卡| 一区二区三区在线视频观看| 亚洲国产精品成人综合色在线婷婷| 欧美日韩激情一区| 在线观看亚洲专区| av爱爱亚洲一区| 成人做爰69片免费看网站| 久久av老司机精品网站导航| 亚洲不卡一区二区三区| 夜夜嗨av一区二区三区四季av | 中文字幕中文乱码欧美一区二区 | 青青草国产精品97视觉盛宴| 中文字幕综合网| 国产精品无码永久免费888| 久久综合色8888| 日韩三级在线免费观看| 91麻豆精品国产91久久久更新时间| 色菇凉天天综合网| 欧美性猛交xxxx黑人交| 91国模大尺度私拍在线视频| 91麻豆精品视频| 欧美在线看片a免费观看| 色综合天天综合网国产成人综合天 | 色av一区二区| 不卡一区二区中文字幕| 国产91对白在线观看九色| 国产一区二区三区免费在线观看| 久久疯狂做爰流白浆xx| 亚洲第一会所有码转帖| 欧美三级日韩在线| 亚洲国产精品久久不卡毛片| 自拍偷自拍亚洲精品播放| 欧美激情一区不卡| 国产精品久久久久久久久免费丝袜| 国产亚洲欧美中文| 国产精品三级av在线播放| 国产精品无人区| 自拍av一区二区三区| 亚洲一区二区四区蜜桃| 亚洲成年人影院| 极品尤物av久久免费看| 国产精品66部| 色婷婷av一区二区三区gif| 欧美色图片你懂的| 日韩精品在线一区| 国产日本欧洲亚洲| 一区二区在线看| 日韩国产高清在线| 国产一区二区成人久久免费影院| 风间由美一区二区三区在线观看| 91蜜桃网址入口| 欧美日韩精品一区视频| 51午夜精品国产| 精品久久久久久亚洲综合网| 国产精品久久久久婷婷二区次| 亚洲手机成人高清视频| 亚洲h精品动漫在线观看| 免费在线观看日韩欧美| 国产91丝袜在线观看| 在线观看一区日韩| 精品sm捆绑视频| 亚洲欧美日韩在线不卡| 天天做天天摸天天爽国产一区| 国产精品一二三区在线| 色综合久久久久综合| 精品国产人成亚洲区| 亚洲精品水蜜桃| 黑人巨大精品欧美黑白配亚洲| 91在线你懂得| 欧美不卡一二三| 一区二区不卡在线播放| 韩国午夜理伦三级不卡影院| 色老汉一区二区三区| 精品国产a毛片| 亚洲第一成年网| 不卡av电影在线播放| 精品剧情在线观看| 亚洲一区精品在线| 成人国产在线观看| 日韩欧美色综合网站| 一区二区三区日韩精品| 国产一区二区三区在线观看免费| 色婷婷久久一区二区三区麻豆| 久久久久久久久97黄色工厂| 日本在线不卡一区| 日本黄色一区二区| 国产精品卡一卡二| 黄网站免费久久| 欧美一级黄色录像| 午夜精品久久久久久| 一本久久综合亚洲鲁鲁五月天 | 精品视频一区二区三区免费| 欧美一卡二卡在线| 亚洲一区欧美一区| aaa亚洲精品| 国产校园另类小说区| 蜜臀91精品一区二区三区| 色久综合一二码| 成人免费视频在线观看| 高清不卡在线观看av| 欧美精品一区二| 极品美女销魂一区二区三区免费| 欧美亚洲综合网| 一区二区三区日韩| 色欧美片视频在线观看| 亚洲欧洲韩国日本视频| 国产精品正在播放| 中文字幕精品一区二区三区精品| 国产真实精品久久二三区| 日韩精品一区国产麻豆| 麻豆久久久久久久| 欧美mv和日韩mv国产网站| 日本vs亚洲vs韩国一区三区二区 | 91免费精品国自产拍在线不卡| 精品少妇一区二区| 国产真实乱对白精彩久久| 91精品国产福利在线观看 | 色婷婷综合激情| 亚洲丝袜制服诱惑| 91麻豆国产香蕉久久精品| 亚洲国产日韩精品| 欧美视频一区二区在线观看| 一区二区三区高清在线| 欧美日韩免费一区二区三区 | 精品在线播放午夜| 国产色产综合产在线视频| 成人污污视频在线观看|