org.apache.lucene.util.automaton.Operations.subsetOf()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.apache.lucene.util.automaton.Operations.subsetOf()方法的一些代码示例,展示了Operations.subsetOf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operations.subsetOf()方法的具体详情如下:
包路径:org.apache.lucene.util.automaton.Operations
类名称:Operations
方法名:subsetOf

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

  1. /** Returns true if these two automata accept exactly the
  2. * same language. This is a costly computation! Both automata
  3. * must be determinized and have no dead states! */
  4. public static boolean sameLanguage(Automaton a1, Automaton a2) {
  5. if (a1 == a2) {
  6. return true;
  7. }
  8. return subsetOf(a2, a1) && subsetOf(a1, a2);
  9. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

  1. /** Returns true if these two automata accept exactly the
  2. * same language. This is a costly computation! Both automata
  3. * must be determinized and have no dead states! */
  4. public static boolean sameLanguage(Automaton a1, Automaton a2) {
  5. if (a1 == a2) {
  6. return true;
  7. }
  8. return subsetOf(a2, a1) && subsetOf(a1, a2);
  9. }

代码示例来源:origin: harbby/presto-connectors

  1. /** Returns true if these two automata accept exactly the
  2. * same language. This is a costly computation! Note
  3. * also that a1 and a2 will be determinized as a side
  4. * effect. Both automata must be determinized and have
  5. * no dead states! */
  6. public static boolean sameLanguage(Automaton a1, Automaton a2) {
  7. if (a1 == a2) {
  8. return true;
  9. }
  10. return subsetOf(a2, a1) && subsetOf(a1, a2);
  11. }

代码示例来源:origin: org.infinispan/infinispan-embedded-query

  1. /** Returns true if these two automata accept exactly the
  2. * same language. This is a costly computation! Note
  3. * also that a1 and a2 will be determinized as a side
  4. * effect. Both automata must be determinized and have
  5. * no dead states! */
  6. public static boolean sameLanguage(Automaton a1, Automaton a2) {
  7. if (a1 == a2) {
  8. return true;
  9. }
  10. return subsetOf(a2, a1) && subsetOf(a1, a2);
  11. }

相关文章