本文整理了Java中org.apache.lucene.util.automaton.Operations.subsetOf()
方法的一些代码示例,展示了Operations.subsetOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operations.subsetOf()
方法的具体详情如下:
包路径:org.apache.lucene.util.automaton.Operations
类名称:Operations
方法名:subsetOf
[英]Returns true if the language of a1
is a subset of the language of a2
. Both automata must be determinized and must have no dead states.
Complexity: quadratic in number of states.
[中]如果a1
的语言是[$1$]语言的子集,则返回true。这两个自动机都必须是确定的,并且必须没有死态。
复杂性:状态数为二次。
代码示例来源:origin: org.apache.lucene/lucene-core
/** Returns true if these two automata accept exactly the
* same language. This is a costly computation! Both automata
* must be determinized and have no dead states! */
public static boolean sameLanguage(Automaton a1, Automaton a2) {
if (a1 == a2) {
return true;
}
return subsetOf(a2, a1) && subsetOf(a1, a2);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
/** Returns true if these two automata accept exactly the
* same language. This is a costly computation! Both automata
* must be determinized and have no dead states! */
public static boolean sameLanguage(Automaton a1, Automaton a2) {
if (a1 == a2) {
return true;
}
return subsetOf(a2, a1) && subsetOf(a1, a2);
}
代码示例来源:origin: harbby/presto-connectors
/** Returns true if these two automata accept exactly the
* same language. This is a costly computation! Note
* also that a1 and a2 will be determinized as a side
* effect. Both automata must be determinized and have
* no dead states! */
public static boolean sameLanguage(Automaton a1, Automaton a2) {
if (a1 == a2) {
return true;
}
return subsetOf(a2, a1) && subsetOf(a1, a2);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
/** Returns true if these two automata accept exactly the
* same language. This is a costly computation! Note
* also that a1 and a2 will be determinized as a side
* effect. Both automata must be determinized and have
* no dead states! */
public static boolean sameLanguage(Automaton a1, Automaton a2) {
if (a1 == a2) {
return true;
}
return subsetOf(a2, a1) && subsetOf(a1, a2);
}
内容来源于网络,如有侵权,请联系作者删除!