當前位置: 首頁>>代碼示例>>Java>>正文


Java UnionFind.find方法代碼示例

本文整理匯總了Java中jpaul.DataStructs.UnionFind.find方法的典型用法代碼示例。如果您正苦於以下問題:Java UnionFind.find方法的具體用法?Java UnionFind.find怎麽用?Java UnionFind.find使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在jpaul.DataStructs.UnionFind的用法示例。


在下文中一共展示了UnionFind.find方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: rewrite

import jpaul.DataStructs.UnionFind; //導入方法依賴的package包/類
public Constraint<V,Info> rewrite(UnionFind<V> uf) {
V vs2 = uf.find(vs);
V vd2 = uf.find(vd);
// remove superfluous constraints
if(vs2.equals(vd2)) return null;
// nothing changed, so why generate a new constraint ?
if(vs.equals(vs2) && vd.equals(vd2)) return this;
return new LtConstraint<V,Info>(vs2, vd2);
   }
 
開發者ID:protegeproject,項目名稱:jpaul,代碼行數:10,代碼來源:LtConstraint.java

示例2: rewrite

import jpaul.DataStructs.UnionFind; //導入方法依賴的package包/類
/** We implemented {@link #rewrite}, {@link #equals}, and {@link
       #hashCode}, such that constraints that are identical after
       variable unification are not duplicated needlessly. */
   public Constraint<SVar<T>,Set<T>> rewrite(UnionFind<SVar<T>> uf) {
SVar<T> vIn1_p  = uf.find(vIn1);
SVar<T> vIn2_p  = uf.find(vIn2);
SVar<T> vDest_p = uf.find(vDest);	
return new IntersectConstraint<T>(vIn1_p, vIn2_p, vDest_p);
   }
 
開發者ID:protegeproject,項目名稱:jpaul,代碼行數:10,代碼來源:IntersectConstraint.java

示例3: rewrite

import jpaul.DataStructs.UnionFind; //導入方法依賴的package包/類
/** We implemented {@link #rewrite}, {@link #equals}, and {@link
       #hashCode}, such that constraints that are identical after
       variable unification are not duplicated needlessly. */
   public Constraint<SVar<T>,Set<T>> rewrite(UnionFind<SVar<T>> uf) {
SVar<T> vIn1_p  = uf.find(vIn1);
SVar<T> vIn2_p  = uf.find(vIn2);
SVar<T> vDest_p = uf.find(vDest);	
return new IntersectConstraint(vIn1_p, vIn2_p, vDest_p);
   }
 
開發者ID:jgaltidor,項目名稱:VarJ,代碼行數:10,代碼來源:IntersectConstraint.java

示例4: rewrite

import jpaul.DataStructs.UnionFind; //導入方法依賴的package包/類
public Constraint<V,Info> rewrite(UnionFind<V> uf) {
V vd2 = uf.find(vd);
// nothing changed, so why generate a new constraint ?
if(vd.equals(vd2)) return this;
return new CtConstraint<V,Info>(ct, vd2);
   }
 
開發者ID:protegeproject,項目名稱:jpaul,代碼行數:7,代碼來源:CtConstraint.java

示例5: rewrite

import jpaul.DataStructs.UnionFind; //導入方法依賴的package包/類
/** We implemented {@link #rewrite}, {@link #equals}, and {@link
       #hashCode}, such that constraints that are identical after
       variable unification are not duplicated needlessly. */
   public Constraint<SVar<T>,Set<T>> rewrite(UnionFind<SVar<T>> uf) {
SVar<T> vIn_p   = uf.find(vIn);
SVar<T> vDest_p = uf.find(vDest);	
return new CtDiffConstraint<T>(vIn_p, ctSet, vDest_p);
   }
 
開發者ID:protegeproject,項目名稱:jpaul,代碼行數:9,代碼來源:CtDiffConstraint.java


注:本文中的jpaul.DataStructs.UnionFind.find方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。