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

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

?? process.java

?? 為了下東西 隨便發了個 datamining 的源代碼
?? JAVA
字號:
/*
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package eti.bi.alphaminer.vo;

import java.util.Vector;

/**
 * Process is a class storing all connections of a case.
 */
public class Process {

	/**
	 * A Vector storing all Connection.
	 */
	private Vector<NodeConnection> m_ConnectionList;

	/**
	 * Constructs a Process.
	 */
	public Process() {
		m_ConnectionList = new Vector<NodeConnection>();
	}

	/**
	 * Returns a Vector containing all Connections.
	 * @return Vector of Connections.
	 */
	public Vector<NodeConnection> getConnectionList() {
		return m_ConnectionList;
	}

	/**
	 * Sets the Vector of Connections.
	 * @param a_List the Vector containing all Connections.
	 */
	public void setConnectionList(Vector<NodeConnection> a_List) {
		m_ConnectionList = a_List;
	}

	/**
	 * Gets tail nodes that are connected to the head node.
	 * @param a_NodeID ID of the head node.
	 * @return Vector storing ID of tail nodes.
	 */
	public Vector<String> getChildrenOfNode(String a_NodeID) {
		Vector<String> children = new Vector<String>();
		NodeConnection con = null;
		for (int i = 0; i < m_ConnectionList.size(); i++) {
			con = m_ConnectionList.elementAt(i);
			if (con.getHeadNodeID().equals(a_NodeID))
				children.addElement(con.getTailNodeID());
		}

		return children;
	}
	
	/**
	 * Returns number of tail nodes that are connected to the head node.
	 * @param a_NodeID ID of the head node.
	 * @return number of tail nodes.
	 */
	public int getNumberOfChildrenOfNode(String a_NodeID)
	{
		Vector<String> children = getChildrenOfNode(a_NodeID);
		if (children==null)
			return 0;
		else
			return children.size();
	}

	/**
	 * Gets head nodes that are connected to the tail node.
	 * @param a_NodeID ID of the tail node.
	 * @return Vector storing ID of head nodes.
	 */
	public Vector<String> getParentsOfNode(String a_NodeID) {
		Vector<String> parents = new Vector<String>();
		NodeConnection con = null;
		for (int i = 0; i < m_ConnectionList.size(); i++) {
			con = m_ConnectionList.elementAt(i);
			if (con.getTailNodeID().equals(a_NodeID))
				parents.addElement(con.getHeadNodeID());
		}

		return parents;
	}

	/**
	 * Returns number of head nodes that are connected to the tail node.
	 * @param a_NodeID ID of the tail node.
	 * @return number of head nodes.
	 */
	public int getNumberOfParentsOfNode(String a_NodeID)
	{
		Vector<String> parents = getParentsOfNode(a_NodeID);
		if (parents==null)
			return 0;
		else
			return parents.size();
	}

	/**
	 * Inserts a Connection between a head node and a tail node in this case.
	 * @param a_HeadNodeID ID of the head node.
	 * @param a_TailNodeID ID of the tail node.
	 * @return true if Connection is aded successfully; false otherwise.
	 */
	public boolean insertConnection(String a_HeadNodeID, int a_HeadChildrenNum, String a_TailNodeID, int a_TailParentsNum) {
		if (isConnectionExisted(a_HeadNodeID, a_TailNodeID))
			return false;
		if (isCyclic(a_HeadNodeID, a_TailNodeID))
			return false;
		if (getNumberOfChildrenOfNode(a_HeadNodeID)>=a_HeadChildrenNum)
			return false;
		if (getNumberOfParentsOfNode(a_TailNodeID)>=a_TailParentsNum)
			return false;
		m_ConnectionList.addElement(new NodeConnection(a_HeadNodeID, a_TailNodeID));
		printDebug();
		return true;
	}

	/**
	 * Remove connections connecting to two nodes.
	 * @param a_HeadNodeID ID of the parent node of the connection.
	 * @param a_TailNodeID ID of the tail node of the connection.
	 */
	public void removeConnectionBetweenNodes(
		String a_HeadNodeID,
		String a_TailNodeID) {
		NodeConnection existingCon = null;
		NodeConnection con = new NodeConnection(a_HeadNodeID, a_TailNodeID);
		for (int i = 0; i < m_ConnectionList.size(); i++) {
			existingCon = m_ConnectionList.elementAt(i);
			if (existingCon.equals(con)) {
				m_ConnectionList.remove(i);
				break;
			}
		}
		printDebug();
	}

	/**
	 * Remove connections connecting to a specific node.
	 * @param a_NodeID ID of the specified node.
	 */
	public void removeConnectionOfNode(String a_NodeID) {
		NodeConnection existingCon = null;
		for (int i = 0; i < m_ConnectionList.size(); i++) {
			existingCon = m_ConnectionList.elementAt(i);
			if (existingCon.containNode(a_NodeID)) {
				m_ConnectionList.remove(i);
				i--;
			}
		}
		printDebug();
	}

	/**
	 * Checks if a connection between two nodes exists.
	 * @param a_HeadNodeID ID of the head node.
	 * @param a_TailNodeID ID of the tail node.
	 * @return true if the connection or the reverse connection of the two nodes
	 * exists; false otherwise.
	 */
	private boolean isConnectionExisted(
		String a_HeadNodeID,
		String a_TailNodeID) {
		NodeConnection con = new NodeConnection(a_HeadNodeID, a_TailNodeID);
		NodeConnection existingCon = null;
		for (int i = 0; i < m_ConnectionList.size(); i++) {
			existingCon = m_ConnectionList.elementAt(i);
			if (existingCon.equals(con) || existingCon.equalsReverse(con))
				return true;
		}
		return false;
	}

	/**
	 * Check if the connection between the head and the tail nodes produces a cyclic path.
	 * @param a_HeadNodeID ID of the head node.
	 * @param a_TailNodeID ID of the tail node.
	 * @return true if the connection causes a cyclic path; false otherwise.
	 */
	private boolean isCyclic(String a_HeadNodeID, String a_TailNodeID) {
		Vector<String> nodes = getParentsOfNode(a_HeadNodeID);
		for (int i = 0; i < nodes.size(); i++) {
			if (nodes.elementAt(i).equals(a_TailNodeID))
				return true;
			else
				return isCyclic(nodes.elementAt(i), a_TailNodeID);
		}
		return false;
	}


	private void printDebug() {
		for (int i = 0; i < m_ConnectionList.size(); i++) {
		}
	}	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区二区三区忘忧草| 大白屁股一区二区视频| 欧美视频日韩视频在线观看| 亚洲欧美另类在线| 欧美中文字幕一区二区三区亚洲| 亚洲午夜在线电影| 日韩欧美国产系列| 国产成人综合精品三级| 国产精品视频看| 91福利视频久久久久| 日韩精品欧美精品| 久久久久99精品国产片| 成人福利视频网站| 亚洲综合在线电影| 精品欧美乱码久久久久久1区2区| 国产一区 二区 三区一级| 国产精品三级视频| 欧美日韩国产综合视频在线观看| 美女mm1313爽爽久久久蜜臀| 国产精品视频你懂的| 欧美精品免费视频| 国产激情精品久久久第一区二区 | 最新日韩av在线| 欧美日韩亚洲综合在线| 韩国在线一区二区| 亚洲精品高清在线| 久久夜色精品一区| 在线精品视频免费播放| 欧美日韩久久久| 国产麻豆精品在线| 亚洲精品欧美激情| 久久久久久久综合| 欧美日韩一本到| 99久久精品国产一区| 美女视频一区二区| 亚洲精品久久7777| 国产亚洲精品7777| 8x福利精品第一导航| 99久久精品免费| 国产一区二区影院| 日韩成人一级片| 亚洲免费观看视频| 久久众筹精品私拍模特| 欧美在线视频日韩| 成人av在线资源| 韩国女主播成人在线观看| 亚洲自拍欧美精品| 中文字幕一区二区不卡| 久久久久亚洲综合| 欧美日韩国产小视频在线观看| 国产aⅴ精品一区二区三区色成熟| 午夜精品久久久久久久99樱桃| 国产视频不卡一区| 精品日韩99亚洲| 欧美一区二区三区电影| 欧美揉bbbbb揉bbbbb| av电影天堂一区二区在线观看| 精品亚洲国内自在自线福利| 天天免费综合色| 亚洲午夜一二三区视频| 亚洲激情第一区| 中文字幕亚洲电影| 国产精品视频看| 中文字幕欧美日韩一区| 精品粉嫩超白一线天av| 日韩欧美一级二级| 欧美一区二区国产| 午夜久久久久久电影| 一区二区国产盗摄色噜噜| 亚洲精品久久嫩草网站秘色| 亚洲色图另类专区| 一区在线播放视频| 成人欧美一区二区三区| 中文字幕亚洲视频| 亚洲精品中文在线观看| 亚洲日本乱码在线观看| 亚洲视频中文字幕| 一区二区三区91| 亚洲国产精品自拍| 亚洲最大成人网4388xx| 香蕉久久一区二区不卡无毒影院| 一区二区三区高清在线| 亚洲精品国产无天堂网2021| 亚洲男人的天堂在线aⅴ视频 | www久久精品| 久久综合资源网| 欧美国产日韩一二三区| 国产精品久久久久久久久免费相片| 中文欧美字幕免费| 亚洲精品菠萝久久久久久久| 亚洲一本大道在线| 奇米色777欧美一区二区| 老司机精品视频在线| 国产高清久久久| 91日韩精品一区| 欧美裸体bbwbbwbbw| 日韩欧美一区在线| 国产欧美精品日韩区二区麻豆天美| 国产欧美日韩在线观看| 亚洲欧洲综合另类在线| 亚洲电影你懂得| 国内精品免费**视频| 成人av电影免费在线播放| 在线观看日韩高清av| 日韩亚洲欧美高清| 国产精品免费av| 亚洲午夜久久久久中文字幕久| 日韩电影免费一区| 成人激情图片网| 欧美精品第1页| 中文字幕乱码一区二区免费| 亚洲精品日韩一| 激情五月婷婷综合| 欧美在线色视频| 精品欧美一区二区久久| 亚洲欧美日韩国产中文在线| 日韩av电影免费观看高清完整版 | 91精品国产色综合久久久蜜香臀| 精品入口麻豆88视频| 国产精品白丝在线| 蜜臀av在线播放一区二区三区| 东方欧美亚洲色图在线| 欧美午夜一区二区三区免费大片| 亚洲精品一区二区三区福利| 日韩理论电影院| 精品一区二区在线免费观看| eeuss鲁片一区二区三区在线观看| 欧美乱熟臀69xxxxxx| 国产一区亚洲一区| 欧美亚洲综合一区| 中文乱码免费一区二区| 蜜臀久久99精品久久久久宅男 | 五月激情综合色| 成人黄色免费短视频| 欧美一卡2卡三卡4卡5免费| 亚洲视频每日更新| 国产精品一二一区| 在线成人午夜影院| 亚洲精品水蜜桃| 成人综合激情网| 日韩欧美国产系列| 日韩电影免费在线| 欧美日韩亚州综合| 亚洲另类中文字| 成人av资源站| 国产精品全国免费观看高清 | 亚洲成人免费视频| 一本色道a无线码一区v| 国产精品美女久久久久久久| 精品一区二区三区欧美| 91精品麻豆日日躁夜夜躁| 一区二区三区在线视频观看58| 成人在线综合网| 欧美国产精品v| 国产99久久久国产精品| 欧美精品一区二区三区四区| 青青草伊人久久| 欧美精品在线一区二区| 亚洲bt欧美bt精品| 欧美日韩一区中文字幕| 亚洲欧美日韩人成在线播放| 色综合一区二区| 亚洲日本一区二区| 97超碰欧美中文字幕| 中文字幕中文字幕一区二区 | 国产精品亚洲一区二区三区在线 | 99久久伊人精品| 日本一区二区三区在线不卡| 国产精品18久久久久久vr| 精品国产乱码久久久久久1区2区 | 国产日韩欧美一区二区三区乱码| 免费成人美女在线观看.| 日韩欧美的一区| 精品一区二区免费视频| 久久久久久毛片| 豆国产96在线|亚洲| 亚洲欧美一区二区在线观看| 91国产免费看| 丝袜诱惑亚洲看片| 日韩精品一区二区在线| 黄色成人免费在线| 中文字幕第一区二区| 一本大道久久a久久精二百| 亚洲综合色噜噜狠狠| 欧美绝品在线观看成人午夜影视| 日韩精品1区2区3区| 久久久久久久久久看片| 成人一区在线看| 亚洲午夜在线视频| 欧美xxxxx牲另类人与| 国产成人av电影在线播放| 亚洲欧洲性图库| 欧美日韩精品一区二区在线播放| 蜜臀av性久久久久蜜臀av麻豆| 久久久五月婷婷| 99精品欧美一区二区三区小说| 亚洲一区二区三区四区在线免费观看| 欧美精品久久99| 成人精品在线视频观看| 亚洲小说欧美激情另类|