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

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

?? catgraph.java

?? java數據挖掘算法
?? 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一区二区三区免费野_久草精品视频
日韩综合小视频| 国产精品电影院| 日本不卡中文字幕| 制服丝袜日韩国产| 狠狠色丁香久久婷婷综| 久久综合久久综合久久| 成人免费三级在线| 亚洲欧美偷拍三级| 欧美撒尿777hd撒尿| 亚洲18色成人| 久久久久国产精品人| 成人免费高清在线| 亚洲成人av一区| 欧美成人艳星乳罩| 成人福利电影精品一区二区在线观看| 国产精品久久久久久久第一福利| 在线亚洲一区观看| 奇米影视7777精品一区二区| 精品国产区一区| 99综合影院在线| 日韩一区欧美二区| 国产欧美日韩另类一区| 91美女福利视频| 美日韩黄色大片| 中文字幕一区二区三中文字幕| 91福利国产精品| 狠狠色丁香久久婷婷综合_中| 成人欧美一区二区三区1314| 欧美日韩国产三级| 国产**成人网毛片九色| 亚洲国产成人av| 中文字幕av不卡| 欧美久久久影院| 成人丝袜18视频在线观看| 日韩1区2区日韩1区2区| 国产精品的网站| 精品少妇一区二区三区| 在线观看欧美日本| 丁香婷婷综合色啪| 男女性色大片免费观看一区二区 | 欧美色精品天天在线观看视频| 日韩中文字幕亚洲一区二区va在线 | 欧美性猛片xxxx免费看久爱| 久久97超碰色| 亚洲v中文字幕| 中文字幕一区二区在线观看| 欧美v日韩v国产v| 欧美亚洲高清一区| av激情综合网| 国内精品写真在线观看| 天堂va蜜桃一区二区三区| 中文字幕一区二区三中文字幕| 欧美精品一区二区不卡| 欧美熟乱第一页| 91猫先生在线| av午夜精品一区二区三区| 国产精品综合网| 久久国产成人午夜av影院| 午夜精品免费在线| 夜夜嗨av一区二区三区四季av| 久久精品视频在线看| 欧美电视剧免费全集观看| 欧美久久久久久蜜桃| 欧美日韩三级视频| 色呦呦日韩精品| 91麻豆国产福利在线观看| www.欧美亚洲| 成人a免费在线看| 成人一区二区在线观看| 国产精品中文字幕一区二区三区| 极品销魂美女一区二区三区| 老司机精品视频一区二区三区| 五月婷婷色综合| 午夜精品一区二区三区免费视频| 亚洲成人1区2区| 亚洲国产aⅴ成人精品无吗| 亚洲激情中文1区| 亚洲自拍都市欧美小说| 亚洲综合激情网| 亚洲成人激情综合网| 亚洲福利视频三区| 日韩综合在线视频| 久久精品国产一区二区三| 韩国欧美国产一区| 国内欧美视频一区二区| 粉嫩绯色av一区二区在线观看| 国产激情视频一区二区在线观看| 国产精一品亚洲二区在线视频| 国产成人自拍网| 99久久精品免费观看| 在线观看欧美日本| 欧美二区乱c少妇| 欧美一卡二卡在线| 亚洲精品在线观看网站| 国产亚洲欧洲一区高清在线观看| 国产欧美综合在线观看第十页| 中文在线免费一区三区高中清不卡| 国产欧美精品日韩区二区麻豆天美| 亚洲国产精品ⅴa在线观看| 亚洲欧洲综合另类在线| 日韩专区一卡二卡| 国产精选一区二区三区| 日本久久一区二区| 欧美高清dvd| 久久婷婷国产综合国色天香| 国产精品久久久久影视| 亚洲国产另类精品专区| 久久精品久久精品| 成人av午夜电影| 欧美在线高清视频| 精品国产百合女同互慰| 综合色中文字幕| 免费不卡在线观看| a在线播放不卡| 欧美日韩免费电影| 国产亚洲短视频| 亚洲韩国精品一区| 国产精品一区二区在线观看网站 | 日本丶国产丶欧美色综合| 欧美肥妇毛茸茸| 亚洲欧洲日韩女同| 奇米影视一区二区三区小说| 99免费精品在线| 日韩午夜电影在线观看| 亚洲天堂久久久久久久| 麻豆成人综合网| jvid福利写真一区二区三区| 在线播放91灌醉迷j高跟美女| 国产亚洲一区二区在线观看| 午夜欧美视频在线观看 | 久久99久久久欧美国产| 99久久夜色精品国产网站| 精品国产亚洲在线| 午夜欧美在线一二页| 97久久精品人人做人人爽50路| 日韩欧美不卡在线观看视频| 一区二区三区欧美日韩| 国产成人免费在线视频| 欧美一区二区三区在线看| 亚洲狼人国产精品| 国产成人精品午夜视频免费| 欧美一级一级性生活免费录像| 亚洲欧美色综合| 不卡视频在线看| 久久久一区二区三区捆绑**| 爽爽淫人综合网网站| 91美女片黄在线观看| 国产精品久久国产精麻豆99网站| 久久成人免费电影| 欧美高清你懂得| 亚洲国产欧美在线| 色综合中文综合网| 成人性生交大合| 久久亚洲精品国产精品紫薇| 日本不卡一二三区黄网| 欧美精品在线视频| 亚洲小少妇裸体bbw| 色94色欧美sute亚洲13| 国产精品夫妻自拍| 不卡的看片网站| 中日韩免费视频中文字幕| 国产毛片精品一区| 久久综合九色综合欧美亚洲| 六月丁香婷婷久久| 精品免费日韩av| 精品一区二区三区欧美| 日韩一级视频免费观看在线| 日本女优在线视频一区二区| 717成人午夜免费福利电影| 丝袜美腿亚洲色图| 欧美一区二区三级| 美女视频网站黄色亚洲| 欧美一区二区成人| 久久精品999| 久久久一区二区三区捆绑**| 国产精品18久久久久久久久| 国产精品沙发午睡系列990531| 丁香一区二区三区| 亚洲日本va午夜在线电影| 色又黄又爽网站www久久| 亚洲午夜久久久久| 91精品国产综合久久久久久久久久 | 欧美三区免费完整视频在线观看| 亚洲在线视频免费观看| 欧美日韩国产高清一区二区 | 亚洲午夜羞羞片| 91精品国产色综合久久| 国产一区二区毛片| 国产精品成人在线观看| 91麻豆免费在线观看| 亚洲一区二区三区在线播放| 欧美日韩国产精品自在自线| 久久99国产精品尤物| 国产精品久久久久久久久果冻传媒| 99re热这里只有精品免费视频| 亚洲一级电影视频| 欧美va亚洲va| 一本大道久久a久久综合| 青青草原综合久久大伊人精品优势| 精品国产伦一区二区三区观看体验|