本文整理了Java中org.apache.lucene.util.automaton.Operations.complement()
方法的一些代码示例,展示了Operations.complement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Operations.complement()
方法的具体详情如下:
包路径:org.apache.lucene.util.automaton.Operations
类名称:Operations
方法名:complement
[英]Returns a (deterministic) automaton that accepts the complement of the language of the given automaton.
Complexity: linear in number of states if already deterministic and exponential otherwise.
[中]返回接受给定自动机语言补码的(确定性)自动机。
复杂性:如果已经确定,则状态数为线性,否则为指数。
代码示例来源:origin: org.apache.lucene/lucene-core
/**
* Returns a (deterministic) automaton that accepts the intersection of the
* language of <code>a1</code> and the complement of the language of
* <code>a2</code>. As a side-effect, the automata may be determinized, if not
* already deterministic.
* <p>
* Complexity: quadratic in number of states if a2 already deterministic and
* exponential in number of a2's states otherwise.
*/
static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
if (Operations.isEmpty(a1) || a1 == a2) {
return Automata.makeEmpty();
}
if (Operations.isEmpty(a2)) {
return a1;
}
return intersection(a1, complement(a2, maxDeterminizedStates));
}
代码示例来源:origin: org.apache.lucene/lucene-core
break;
case REGEXP_COMPLEMENT:
a = Operations.complement(
exp1.toAutomatonInternal(automata, automaton_provider,
maxDeterminizedStates),
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
/**
* Returns a (deterministic) automaton that accepts the intersection of the
* language of <code>a1</code> and the complement of the language of
* <code>a2</code>. As a side-effect, the automata may be determinized, if not
* already deterministic.
* <p>
* Complexity: quadratic in number of states if a2 already deterministic and
* exponential in number of a2's states otherwise.
*/
static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
if (Operations.isEmpty(a1) || a1 == a2) {
return Automata.makeEmpty();
}
if (Operations.isEmpty(a2)) {
return a1;
}
return intersection(a1, complement(a2, maxDeterminizedStates));
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
/**
* Returns a (deterministic) automaton that accepts the intersection of the
* language of <code>a1</code> and the complement of the language of
* <code>a2</code>. As a side-effect, the automata may be determinized, if not
* already deterministic.
* <p>
* Complexity: quadratic in number of states if a2 already deterministic and
* exponential in number of a2's states otherwise.
*/
static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
if (Operations.isEmpty(a1) || a1 == a2) {
return Automata.makeEmpty();
}
if (Operations.isEmpty(a2)) {
return a1;
}
return intersection(a1, complement(a2, maxDeterminizedStates));
}
代码示例来源:origin: harbby/presto-connectors
/**
* Returns a (deterministic) automaton that accepts the intersection of the
* language of <code>a1</code> and the complement of the language of
* <code>a2</code>. As a side-effect, the automata may be determinized, if not
* already deterministic.
* <p>
* Complexity: quadratic in number of states if a2 already deterministic and
* exponential in number of a2's states otherwise.
*/
static public Automaton minus(Automaton a1, Automaton a2, int maxDeterminizedStates) {
if (Operations.isEmpty(a1) || a1 == a2) {
return Automata.makeEmpty();
}
if (Operations.isEmpty(a2)) {
return a1;
}
return intersection(a1, complement(a2, maxDeterminizedStates));
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
break;
case REGEXP_COMPLEMENT:
a = Operations.complement(
exp1.toAutomatonInternal(automata, automaton_provider,
maxDeterminizedStates),
代码示例来源:origin: harbby/presto-connectors
break;
case REGEXP_COMPLEMENT:
a = Operations.complement(
exp1.toAutomatonInternal(automata, automaton_provider,
maxDeterminizedStates),
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
break;
case REGEXP_COMPLEMENT:
a = Operations.complement(
exp1.toAutomatonInternal(automata, automaton_provider,
maxDeterminizedStates),
内容来源于网络,如有侵权,请联系作者删除!