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

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

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

Operations.getLiveStates介绍

[英]Returns the set of live states. A state is "live" if an accept state is reachable from it and if it is reachable from the initial state.
[中]返回活动状态集。如果接受状态可以从它访问,并且可以从初始状态访问,则该状态为“活动”。

代码示例

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

/** Returns true if this automaton has any states that cannot
 *  be reached from the initial state or cannot reach an accept state.
 *  Cost is O(numTransitions+numStates). */
public static boolean hasDeadStates(Automaton a) {
 BitSet liveStates = getLiveStates(a);
 int numLive = liveStates.cardinality();
 int numStates = a.getNumStates();
 assert numLive <= numStates: "numLive=" + numLive + " numStates=" + numStates + " " + liveStates;
 return numLive < numStates;
}

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

BitSet liveSet = getLiveStates(a);

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

/** Returns true if this automaton has any states that cannot
 *  be reached from the initial state or cannot reach an accept state.
 *  Cost is O(numTransitions+numStates). */
public static boolean hasDeadStates(Automaton a) {
 BitSet liveStates = getLiveStates(a);
 int numLive = liveStates.cardinality();
 int numStates = a.getNumStates();
 assert numLive <= numStates: "numLive=" + numLive + " numStates=" + numStates + " " + liveStates;
 return numLive < numStates;
}

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

/** Returns true if this automaton has any states that cannot
 *  be reached from the initial state or cannot reach an accept state.
 *  Cost is O(numTransitions+numStates). */
public static boolean hasDeadStates(Automaton a) {
 BitSet liveStates = getLiveStates(a);
 int numLive = liveStates.cardinality();
 int numStates = a.getNumStates();
 assert numLive <= numStates: "numLive=" + numLive + " numStates=" + numStates + " " + liveStates;
 return numLive < numStates;
}

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

/** Returns true if this automaton has any states that cannot
 *  be reached from the initial state or cannot reach an accept state.
 *  Cost is O(numTransitions+numStates). */
public static boolean hasDeadStates(Automaton a) {
 BitSet liveStates = getLiveStates(a);
 int numLive = liveStates.cardinality();
 int numStates = a.getNumStates();
 assert numLive <= numStates: "numLive=" + numLive + " numStates=" + numStates + " " + liveStates;
 return numLive < numStates;
}

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

BitSet liveSet = getLiveStates(a);

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

BitSet liveSet = getLiveStates(a);

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

BitSet liveSet = getLiveStates(a);

相关文章