当前位置: 首页>>代码示例>>Java>>正文


Java Node.getRepresentativeElement方法代码示例

本文整理汇总了Java中org.semanticweb.owlapi.reasoner.Node.getRepresentativeElement方法的典型用法代码示例。如果您正苦于以下问题:Java Node.getRepresentativeElement方法的具体用法?Java Node.getRepresentativeElement怎么用?Java Node.getRepresentativeElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.semanticweb.owlapi.reasoner.Node的用法示例。


在下文中一共展示了Node.getRepresentativeElement方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSimilarityMaxIC

import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
public ScoreAttributeSetPair getSimilarityMaxIC(OWLNamedIndividual i,
		OWLNamedIndividual j) {
	Set<Node<OWLClass>> atts = getInferredAttributes(i);
	atts.retainAll(getInferredAttributes(j)); // intersection

	ScoreAttributeSetPair best = new ScoreAttributeSetPair(0.0);
	for (Node<OWLClass> n : atts) {
		OWLClass c = n.getRepresentativeElement();
		Double ic = this.getInformationContentForAttribute(c);
		if (Math.abs(ic - best.score) < 0.001) {
			// tie for best attribute
			best.addAttributeClass(c);
		}
		if (ic > best.score) {
			best = new ScoreAttributeSetPair(ic, c);
		}
	}
	return best;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:20,代码来源:SimpleOwlSim.java

示例2: ancsProperBitmapCachedModifiable

import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
public EWAHCompressedBitmap ancsProperBitmapCachedModifiable(OWLClass c) {
	if (properSuperclassBitmapMap != null && properSuperclassBitmapMap.containsKey(c)) {
		return properSuperclassBitmapMap.get(c);
	}
	
	Set<Integer> ancsInts = new HashSet<Integer>();
	for (Node<OWLClass> anc : reasoner.getSuperClasses(c, false)) {
		// TODO - verify robust for non-Rep elements
		OWLClass ac = anc.getRepresentativeElement();
		if (ac.equals(thing))
			continue;
		Integer ix = classIndex.get(ac);
		if (ix == null) {
			msg("??"+anc);
		}
		ancsInts.add(ix.intValue());
	}


	//msg(c + " ancs = "+caints.size());
	EWAHCompressedBitmap bm = bm(ancsInts);
	if (properSuperclassBitmapMap == null)
		properSuperclassBitmapMap = new HashMap<OWLClass,EWAHCompressedBitmap>();
	properSuperclassBitmapMap.put(c, bm);
	return bm;		
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:27,代码来源:SimSpeedTest.java

示例3: dumpClassHierarchy

import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private void dumpClassHierarchy(Node<OWLClass> cls, int level, boolean showBottomNode) {
    if (!showBottomNode && cls.isBottomNode()) {
        return;
    }
    printIndent(level);
    OWLClass representative = cls.getRepresentativeElement();
    System.out.println(getEquivalentClasses(representative));
    for (Node<OWLClass> subCls : getSubClasses(representative, true)) {
        dumpClassHierarchy(subCls, level + 1, showBottomNode);
    }
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:12,代码来源:StructuralReasoner2.java

示例4: dumpObjectPropertyHierarchy

import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private void dumpObjectPropertyHierarchy(Node<OWLObjectPropertyExpression> cls, int level, boolean showBottomNode) {
    if (!showBottomNode && cls.isBottomNode()) {
        return;
    }
    printIndent(level);
    OWLObjectPropertyExpression representative = cls.getRepresentativeElement();
    System.out.println(getEquivalentObjectProperties(representative));
    for (Node<OWLObjectPropertyExpression> subProp : getSubObjectProperties(representative, true)) {
        dumpObjectPropertyHierarchy(subProp, level + 1, showBottomNode);
    }
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:12,代码来源:StructuralReasoner2.java

示例5: dumpDataPropertyHierarchy

import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private void dumpDataPropertyHierarchy(Node<OWLDataProperty> cls, int level, boolean showBottomNode) {
    if (!showBottomNode && cls.isBottomNode()) {
        return;
    }
    printIndent(level);
    OWLDataProperty representative = cls.getRepresentativeElement();
    System.out.println(getEquivalentDataProperties(representative));
    for (Node<OWLDataProperty> subProp : getSubDataProperties(representative, true)) {
        dumpDataPropertyHierarchy(subProp, level + 1, showBottomNode);
    }
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:12,代码来源:StructuralReasoner2.java

示例6: renderAttributes

import org.semanticweb.owlapi.reasoner.Node; //导入方法依赖的package包/类
private String renderAttributes(Set<Node<OWLClass>> atts,
		OWLPrettyPrinter owlpp) {
	List<String> s = new ArrayList<String>();
	for (Node<OWLClass> n : atts) {
		OWLClass c = n.getRepresentativeElement();
		s.add(owlpp.render(c));
	}
	return (StringUtils.join(s, " | "));
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:10,代码来源:Sim2CommandRunner.java


注:本文中的org.semanticweb.owlapi.reasoner.Node.getRepresentativeElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。