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

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

?? graph.java

?? 本程序是用java語言編寫的數據挖掘分類算法中的決策樹分類方法c4.5程序代碼
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
package shared;
import java.lang.*;
import java.io.*;
import java.util.*;

/** An instance G of the data type graph consists of a list V  of nodes
 * and a list E  of edges (node and edge are item types).
 * Distinct graphs have disjoint node and edge lists.
 * The value of a variable of type node is either the node of some graph, or the
 * special value nil (which is distinct from all nodes), or is undefined
 * (before the first assignment to the variable). A corresponding statement is
 * true for the variables of type edge.
 * <P>
 * A graph with empty node list is called  empty.
 * A pair of nodes (v,w) is associated with every
 * edge; v is called the  source of e and w is called the
 * target of e, and v and w are called  endpoints of e.
 * The edge e is said to be incident to its endpoints.
 * <P>
 * A graph is either  directed or  undirected. The difference between
 * directed and undirected graphs is the way the edges incident to a node
 * are stored and how the concept  adjacent is defined.
 * <P>
 * In directed graphs two lists of edges are associated with every node v:
 * adj_edges(v) = e  v = source(e),
 * i.e., the list of edges starting in v, and
 * in_edges(v) = e  Lvert v = target(e), i.e., the list of
 * edges ending in v.  The list adj_edges(v) is called the adjacency list
 * of node v and the edges in adj_edges(v) are called the edges
 * adjacent to node v. For directed graphs we often use out_edges(v)
 * as a synonym for adj_edges(v).
 * <P>
 * In undirected graphs only the list adj_edges(v) is defined
 * for every every node v. Here it contains all edges incident to v, i.e.,
 * adj_edges(v) = e   v  source(e),target(e).
 * An undirectect graph may not contain selfloops, i.e., it may not contain an
 * edge whose source is equal to its target.
 * <P>
 * In a directed graph an edge is adjacent to its source and in an undirected
 * graph it is adjacent to its source and target. In a directed graph a node w
 * is adjacent to a node v if there is an edge (v,w) E; in an undirected
 * graph w is adjacent to v if there is an edge (v,w) or (w,v) in the
 * graph.
 * <P>
 * A directed graph can be made undirected and vice versa:
 * G.make_undirected() makes the directed graph G undirected by
 * appending for each node v the list in_edges(v) to the list
 * adj_edges(v) (removing selfloops).  Conversely, G.make_directed()
 * makes the undirected graph G directed by splitting for
 * each node v the list adj_edges(v) into the lists out_edges(v) and
 * in_edges(v). Note that these two operations are not exactly inverse to
 * each other.
 * The data type ugraph (cf. section ref{Undirected Graphs)  can only
 * represent undirected graphs.
 * <P>
 * Reversal Information, Maps and Faces
 * The reversal information of an edge e is accessed through G.reversal(e), it has type edge and may or may not be defined (=nil).
 * Assume that G.reversal(e) is defined and let
 * e' = G.reversal(e). Then e = (v,w) and e' = (w,v) for some
 * nodes v and w, G.reversal(e') is defined and e = G.reversal(e'). In other words, reversal deserves its name.
 * <P>
 * We call a directed graph bidirected if for every edge of G the
 * reversed edge also belongs to G and we call a bidirected graph a map
 * if all edges have their reversal information defined. Maps are the data
 * structure of choice for embedded graphs. For an edge e of a map G let
 * face_cycle_succ(e) = cyclic_adj_succ(reversal(e)) and consider the sequence
 * e, face_cycle_succ(e), face_cycle_succ(face_cycle_succ(e)),. The
 * first edge to repeat in this sequence is e (why?) and the set of edges
 * appearing in this sequence is called the face cycle containing e.
 * Each edge is contained in some face cycle and face cycles are pairwise
 * disjoint. Let f be the number of face cycles, n be the number of nodes,
 * m be the number of edges, and let c be the number of connected components.
 * Then g = (m/2 - n - f)/2 + c is called the genus of the map
 * (note that m/2 is the number of edges in the underlying
 * undirected graph). The genus is zero if and only if the map is planar, i.e.,
 * there is an embedding of G into the plane such that for every node v the
 * counter-clockwise ordering of the edges around v agrees with the cyclic
 * ordering of v's adjacency list.
 * <P>
 * If a graph G is a map the faces of G can be constructed explicitely
 * by G.compute_faces(). Afterwards, the faces of G can be traversed
 * by different iterators, e.g., forall_faces(f,G) iterates over
 * all faces , forall_adj_faces(v) iterates over all faces adjacent
 * to node v. By using face maps or arrays (data types face_map
 * and face_array) additional information can be associated with
 * the faces of a graph. Note that any update operation performed on
 * G invalidates the list of faces. See the section on face operations
 * for a complete list of available operations for faces.
 *
 */
public class Graph implements ParamTypes{
    private static int node_data_slots = 0;
    private static int edge_data_slots = 0;
    
    private static int after = 0;
    private static int before = 1;
    
    private boolean undirected;
    
    private int max_node_index; //max_n_index //maximal node index
    private int max_edge_index; //max_e_index //maximal edge index
    private int max_face_index; //max_f_index //maximal face index
    
    private int[] data_sz;	//number of additional node/edge/face data slots
    private LinkedList[] free_data;	//list of unused node/edge/face data slots
    private LinkedList[] map_list;  //list of registered node/edge/face maps
    
    /** List of nodes in this graph.
     */    
    protected LinkedList v_list;	//list of all nodes
    private LinkedList v_free;	//list of free nodes
    
    private LinkedList e_list;	//list of all edges
    private LinkedList e_free;	//list of free edges
    private LinkedList h_list;	//list of hidden edges
    
    private LinkedList f_list;	//list of all faces
    private LinkedList f_free;	//list of free faces
    
    private LinkedList v_list_tmp;	//temporary list of nodes
    private LinkedList e_list_tmp;	//temporary list of edges
    private LinkedList f_list_tmp;	//temporary list of faces
    
    private GraphMap FaceOf;
    private GraphMap adj_iterator;
    
    /** The parent graph of this graph.
     */    
    protected Graph parent;
    
    /** Graph map of nodes.
     */    
    protected GraphMap node_data_map;	//GraphMap is originally graph_map
    /** Graph map of edges.
     */    
    protected GraphMap edge_data_map;
    
    private Graph GGG;			//needed for the sort functions
    
    /** Unused data member.
     */    
    public int space;
    
    /** Sorter class for edges.
     */    
    protected class EdgeSorter implements SortFunction{
        /** Compares edges.
         * @param edge1 First edge compared.
         * @param edge2 Second edge compared.
         * @return Always false.
         */        
        public boolean is_less_than(Object edge1, Object edge2){
            return false;
        }
    }
    
    /** Sorter class for nodes.
     */    
    protected class NodeSorter implements SortFunction{
        /** Compares nodes.
         * @param node1 First node compared.
         * @param node2 Second node compared.
         * @return Always false.
         */        
        public boolean is_less_than(Object node1, Object node2){
            return false;
        }
    }
    
    /** Ordering class for this graph.
     */    
    protected class Orderer implements OrderingFunction{
        /** Returns the value of the given object.
         * @param item The object for which a value calculated.
         * @return Always 0.
         */        
        public int order(Object item){
            return 0;
        }
    }
    
    /** Map edge ordering class.
     */    
    protected class MapEdgeOrd1 implements OrderingFunction {
        /** Returns the index value of the source node of the given edge.
         * @param the_item The edge for which a value is requested.
         * @return The index value.
         */        
        public int order(Object the_item){
            return (((Edge)the_item).source().index());
        }
    }
    
    /** Map edge ordering class.
     */    
    protected class MapEdgeOrd2 implements OrderingFunction {
        //needed for make_map() in Graph :JL
        /** Returns the index value of the target node of the given edge.
         * @param the_item The edge for which a value is requested.
         * @return The index value.
         */        
        public int order(Object the_item){
            return (((Edge)the_item).target().index());
        }
    }
    
    //	protected static NodeSorter node_comparer;
    //	protected static EdgeSorter edge_comparer;
    //	protected static Orderer order_alg;
    /** Comparison function for comparing edges.
     */    
    protected SortFunction edge_comparer;
    /** Comparison function for comparing nodes.
     */    
    protected SortFunction node_comparer;
    /** Ordering function for sorts.
     */    
    protected OrderingFunction order_alg;
    /** Map edge ordering instance.
     */    
    protected MapEdgeOrd1   map_edge_ord1;
    /** Map edge ordering instance.
     */    
    protected MapEdgeOrd2   map_edge_ord2;
    
    
    
    /** Constructor.
     */    
    public Graph(){
        int sz1 = node_data_slots;
        int sz2 = edge_data_slots;
        max_node_index = -1;
        max_edge_index = -1;
        max_face_index = -1;
        parent = null;
        undirected = false;
        data_sz = new int[3];
        data_sz[0] = sz1;
        data_sz[1] = sz2;
        data_sz[2] = 0;
        e_list = new LinkedList();
        e_free = new LinkedList();
        h_list = new LinkedList();
        e_list_tmp = new LinkedList();
        v_list = new LinkedList();
        v_free = new LinkedList();
        v_list_tmp = new LinkedList();
        f_list = new LinkedList();
        f_free = new LinkedList();
        f_list_tmp = new LinkedList();
        
        free_data = new LinkedList[3];
        for(int i = 0; i < 3; i++) free_data[i] = new LinkedList();
        while (sz1 != 0) free_data[0].addFirst(new Integer(sz1--));
        while (sz2 != 0) free_data[1].addFirst(new Integer(sz2--));
        map_list = new LinkedList[3];
        for(int i = 0; i < 3; i++) map_list[i] = new LinkedList();
        node_data_map = new GraphMap(this,0);
        edge_data_map = new GraphMap(this,1);
        adj_iterator  = new GraphMap(this,0,0);
        FaceOf = null;
    }
    
    /** Constructor.
     * @param sz1 Number of nodes.
     * @param sz2 Number of Edges.
     */    
    public Graph(int sz1, int sz2){
        max_node_index = -1;
        max_edge_index = -1;
        max_face_index = -1;
        parent = null;
        undirected = false;
        data_sz = new int[3];
        data_sz[0] = sz1;
        data_sz[1] = sz2;
        data_sz[2] = 0;
        free_data = new LinkedList[3];
        while (sz1 != 0) free_data[0].addFirst(new Integer(sz1--));
        while (sz2 != 0) free_data[1].addFirst(new Integer(sz2--));
        map_list = new LinkedList[3];
        node_data_map = new GraphMap(this,0);
        edge_data_map = new GraphMap(this,1);
        adj_iterator = new GraphMap(this,0,0);
        FaceOf = null;
    }
    
    /** SubGraph constructor.
     * @param a Parent graph.
     * @param nl List of nodes for this graph.
     * @param el List of edges for this graph.
     */    
    public Graph(Graph a, LinkedList nl, LinkedList el){
        // construct subgraph (nl,el) of graph a
        
        parent = a;
        Node v,w;
        Edge e;
        Node[] N = new Node[a.max_node_index+1];
        
        //obs		forall(v,nl)
        for(int position = 0; position < nl.size(); position++){
            v = (Node)nl.get(position);
            if (v.graph_of() != parent)
                System.err.println("graph: illegal node in subgraph constructor");	//error_handler 1
            N[position] = new Node(v.getData());
        }
        
        //obs		forall(e,el)
        for(int position = 0; position < el.size(); position++){
            e = (Edge)el.get(position);
            v = e.source();
            w = e.target();
            if ( e.graph_of()!= parent || N[v.index()] == null || N[w.index()] == null )
                System.err.println("graph: illegal edge in subgraph constructor");	//error_handler 1
            
            new_edge(N[v.index()],e,N[w.index()],null,null,after,after);
            //obs			new_edge(N[v.index()],N[w.index()],e);
        }
        undirected = a.undirected;
        N = null;
    }
    
    /** SubGraph constructor.
     * @param G Parent graph.
     * @param el List of Edges for this graph.
     */    
    public Graph(Graph G, LinkedList el){
        // construct subgraph of graph G with edge set el
        Node  v,w;
        Edge  e;
        Node[] N = new Node[G.max_node_index+1];
        for(ListIterator nodes = G.v_list.listIterator(); nodes.hasNext();){
            v =(Node)nodes.next();
            N[v.index()] = null;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
九色综合狠狠综合久久| 一区二区三区在线视频观看| 久久精品久久99精品久久| 制服丝袜亚洲色图| 久草中文综合在线| 欧美韩国日本不卡| 成人av在线一区二区| 日韩理论在线观看| 欧美中文字幕亚洲一区二区va在线 | 国产日产欧美一区二区三区| 福利一区在线观看| 成人欧美一区二区三区黑人麻豆 | 麻豆精品精品国产自在97香蕉| 91精品国产色综合久久久蜜香臀| 免播放器亚洲一区| 欧美国产日韩亚洲一区| 91黄色小视频| 毛片av中文字幕一区二区| 欧美极品aⅴ影院| 欧美在线一区二区三区| 美腿丝袜一区二区三区| 国产日韩精品视频一区| 欧美亚洲国产一区二区三区va| 麻豆91在线观看| 国产精品理论在线观看| 欧美三级在线看| 国产一区二区三区av电影 | 在线观看一区日韩| 国内精品免费在线观看| 国产精品乱人伦| 欧美裸体一区二区三区| 风间由美一区二区三区在线观看| 亚洲精品中文在线观看| 精品成a人在线观看| 91小视频在线| 国产在线视频精品一区| 亚洲精品老司机| 国产午夜精品一区二区| 欧美人与z0zoxxxx视频| 99re成人精品视频| 国产一区二区在线看| 亚洲五月六月丁香激情| 欧美国产在线观看| 欧美成人三级电影在线| 欧美色大人视频| www..com久久爱| 蜜桃av一区二区| 亚洲成人你懂的| 最近日韩中文字幕| 国产欧美日韩精品a在线观看| 欧美日韩精品电影| 99精品一区二区| 国产精品99久久久久久宅男| 免费成人在线观看视频| 亚洲国产另类精品专区| 亚洲人成在线观看一区二区| 欧美精品一区二区高清在线观看| 欧美日韩五月天| 一本色道**综合亚洲精品蜜桃冫 | 99久久免费视频.com| 国产成人精品三级麻豆| 理论电影国产精品| 日韩国产在线观看一区| 亚洲一区二区在线观看视频| 日韩伦理av电影| 中文字幕视频一区二区三区久| 久久影音资源网| 精品国产伦一区二区三区观看体验| 欧美日韩你懂的| 欧美喷潮久久久xxxxx| 欧美日韩一区高清| 欧美日韩一区视频| 欧美无砖专区一中文字| 色婷婷av一区二区三区大白胸 | 日韩欧美激情四射| 777午夜精品视频在线播放| 欧美精品一卡两卡| 欧美日韩国产天堂| 欧美日产在线观看| 337p亚洲精品色噜噜| 欧美一区二区三区免费在线看| 欧美日本在线视频| 欧美一区二区三区免费观看视频 | 精品国产亚洲在线| 精品动漫一区二区三区在线观看| xvideos.蜜桃一区二区| wwwwww.欧美系列| 久久久久一区二区三区四区| 久久嫩草精品久久久久| 欧美极品少妇xxxxⅹ高跟鞋| 自拍偷拍亚洲欧美日韩| 亚洲成人免费av| 蜜桃av一区二区在线观看| 国产一区 二区| www.成人在线| 欧美视频在线播放| 欧美一区二区免费| 久久久久久久久99精品| 亚洲欧洲一区二区在线播放| 亚洲人成在线观看一区二区| 亚欧色一区w666天堂| 麻豆精品视频在线观看视频| 国产一区二区三区精品视频| caoporen国产精品视频| 欧美午夜宅男影院| 日韩一区二区三区高清免费看看| 久久青草欧美一区二区三区| 中文字幕中文乱码欧美一区二区| 亚洲妇女屁股眼交7| 国产综合一区二区| 色综合天天做天天爱| 欧美日韩激情一区二区三区| 欧美精品一区在线观看| 国产精品视频麻豆| 日韩avvvv在线播放| 国产精品一级片在线观看| 91理论电影在线观看| 欧美一区二区成人6969| 国产精品麻豆视频| 日本va欧美va精品发布| 99视频热这里只有精品免费| 91精品久久久久久蜜臀| 中文字幕亚洲一区二区va在线| 日本免费在线视频不卡一不卡二| 国产高清精品在线| 91.com视频| 亚洲人吸女人奶水| 国产高清在线精品| 91精品国产91热久久久做人人| 中文欧美字幕免费| 日韩激情中文字幕| 91小视频免费看| 国产日韩欧美电影| 日本不卡高清视频| 91免费观看国产| 国产欧美精品日韩区二区麻豆天美| 亚洲国产成人精品视频| 成人在线视频一区二区| 日韩女同互慰一区二区| 一区二区三区在线免费播放| 国产九九视频一区二区三区| 欧美日本国产视频| 一区二区视频在线看| 国产精品12区| 久久一二三国产| 日韩电影在线观看电影| 欧美在线视频全部完| 国产精品乱码一区二区三区软件 | 欧美一级高清片在线观看| 亚洲最新视频在线观看| av不卡在线播放| 国产欧美一区二区在线观看| 蜜臀精品久久久久久蜜臀 | 精品久久国产字幕高潮| 日韩高清不卡一区二区| 在线观看91视频| 一区二区三区欧美在线观看| 成人中文字幕合集| 国产精品美女久久久久高潮| 国产精品88888| 久久午夜电影网| 国产一区在线精品| 精品国产1区2区3区| 精品一区二区三区在线观看国产| 欧美丰满一区二区免费视频 | 精品久久久久一区二区国产| 日韩福利电影在线观看| 欧美一级黄色大片| 美脚の诱脚舐め脚责91| 日韩欧美视频在线| 秋霞电影一区二区| 欧美成人性战久久| 国产一区二区网址| 久久精品亚洲一区二区三区浴池 | 99re免费视频精品全部| 成人欧美一区二区三区| 色综合久久综合网97色综合 | 99热精品一区二区| **网站欧美大片在线观看| av一区二区三区| 亚洲三级电影网站| 欧洲精品在线观看| 午夜精品在线视频一区| 欧美一级欧美一级在线播放| 国产一区二区视频在线播放| 国产欧美一区二区在线| aa级大片欧美| 亚洲bt欧美bt精品| 精品人在线二区三区| 国产乱淫av一区二区三区| 国产精品另类一区| 欧美午夜精品久久久久久超碰| 麻豆成人91精品二区三区| 国产日韩欧美亚洲| 91年精品国产| 美脚の诱脚舐め脚责91| 中文字幕+乱码+中文字幕一区| 91蝌蚪porny九色| 日韩av中文字幕一区二区| 久久精品亚洲精品国产欧美|