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

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

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

Operations.isEmpty介绍

[英]Returns true if the given automaton accepts no strings.
[中]如果给定的自动机不接受任何字符串,则返回true。

代码示例

代码示例来源:origin: org.apache.lucene/lucene-core

  1. /**
  2. * Returns a (deterministic) automaton that accepts the intersection of the
  3. * language of <code>a1</code> and the complement of the language of
  4. * <code>a2</code>. As a side-effect, the automata may be determinized, if not
  5. * already deterministic.
  6. * <p>
  7. * Complexity: quadratic in number of states if a2 already deterministic and
  8. * exponential in number of a2's states otherwise.
  9. */
  10. static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
  11. if (Operations.isEmpty(a1) || a1 == a2) {
  12. return Automata.makeEmpty();
  13. }
  14. if (Operations.isEmpty(a2)) {
  15. return a1;
  16. }
  17. return intersection(a1, complement(a2, maxDeterminizedStates));
  18. }

代码示例来源:origin: org.apache.lucene/lucene-core

  1. return isEmpty(a1);

代码示例来源:origin: org.apache.lucene/lucene-core

  1. if (Operations.isEmpty(a)) {
  2. return new Automaton();

代码示例来源:origin: org.apache.lucene/lucene-core

  1. if (Operations.isEmpty(automaton)) {

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

  1. /**
  2. * Returns a (deterministic) automaton that accepts the intersection of the
  3. * language of <code>a1</code> and the complement of the language of
  4. * <code>a2</code>. As a side-effect, the automata may be determinized, if not
  5. * already deterministic.
  6. * <p>
  7. * Complexity: quadratic in number of states if a2 already deterministic and
  8. * exponential in number of a2's states otherwise.
  9. */
  10. static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
  11. if (Operations.isEmpty(a1) || a1 == a2) {
  12. return Automata.makeEmpty();
  13. }
  14. if (Operations.isEmpty(a2)) {
  15. return a1;
  16. }
  17. return intersection(a1, complement(a2, maxDeterminizedStates));
  18. }

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

  1. /**
  2. * Returns a (deterministic) automaton that accepts the intersection of the
  3. * language of <code>a1</code> and the complement of the language of
  4. * <code>a2</code>. As a side-effect, the automata may be determinized, if not
  5. * already deterministic.
  6. * <p>
  7. * Complexity: quadratic in number of states if a2 already deterministic and
  8. * exponential in number of a2's states otherwise.
  9. */
  10. static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
  11. if (Operations.isEmpty(a1) || a1 == a2) {
  12. return Automata.makeEmpty();
  13. }
  14. if (Operations.isEmpty(a2)) {
  15. return a1;
  16. }
  17. return intersection(a1, complement(a2, maxDeterminizedStates));
  18. }

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

  1. /**
  2. * Returns a (deterministic) automaton that accepts the intersection of the
  3. * language of <code>a1</code> and the complement of the language of
  4. * <code>a2</code>. As a side-effect, the automata may be determinized, if not
  5. * already deterministic.
  6. * <p>
  7. * Complexity: quadratic in number of states if a2 already deterministic and
  8. * exponential in number of a2's states otherwise.
  9. */
  10. static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
  11. if (Operations.isEmpty(a1) || a1 == a2) {
  12. return Automata.makeEmpty();
  13. }
  14. if (Operations.isEmpty(a2)) {
  15. return a1;
  16. }
  17. return intersection(a1, complement(a2, maxDeterminizedStates));
  18. }

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

  1. return isEmpty(a1);

代码示例来源:origin: org.apache.lucene/lucene-sandbox

  1. public Query rewrite(IndexReader reader) throws IOException {
  2. if (Operations.isEmpty(det)) {
  3. return new MatchNoDocsQuery();

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

  1. return isEmpty(a1);

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

  1. return isEmpty(a1);

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

  1. if (Operations.isEmpty(a)) {
  2. return new Automaton();

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

  1. if (Operations.isEmpty(a)) {
  2. return new Automaton();

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

  1. if (Operations.isEmpty(a)) {
  2. return new Automaton();

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

  1. if (Operations.isEmpty(automaton)) {

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

  1. if (Operations.isEmpty(automaton)) {

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

  1. if (Operations.isEmpty(automaton)) {

相关文章