获取唯一一条最短路径，当然最短路径可能不只一条
@return
967045
public Integer[] getBestPath()
    {
        assert (vertexCount > 2);

        Stack<Integer> stack = new Stack<Integer>();
        int curNode = vertexCount - 1, curIndex = 0;
        QueueElement element;

        element = fromArray[curNode - 1][curIndex].GetFirst();

        stack.push(curNode);
        stack.push(element.from);
        curNode = element.from;

        while (curNode != 0)
        {
            element = fromArray[element.from - 1][element.index].GetFirst();
            stack.push(element.from);
            curNode = element.from;
        }

        return (Integer[]) stack.toArray();
    }
667534
protected int getNextNode()
  {
    if (m_foundLast)
      return DTM.NULL;

    int next = m_iterator.next();
    
    if (m_isFresh)
      m_isFresh = false;

    if (DTM.NULL == next)
      this.m_foundLast = true;

    return next;
  }
81857
public boolean next() {
    if (!isInitialized_) {
      level_ = 0;
      i_ = levels_[level_];
      weight_ = 1;
      isInitialized_ = true;
    } else {
      i_++;
    }
    if (i_ < levels_[level_ + 1]) {
      return true;
    }
    // go to the next non-empty level
    do {
      level_++;
      if (level_ == numLevels_) {
        return false; // run out of levels
      }
      weight_ *= 2;
    } while (levels_[level_] == levels_[level_ + 1]);
    i_ = levels_[level_];
    return true;
  }
1274720
public int totalInstances() {
    int total = 0;
    for(int i = 0; i < confusion.length; i++) {
      for(int j = 0; j < confusion[i].length; j++) {
        total += confusion[i][j];
      }
    }
    return total;
  }
957265
public Object tryGet() {
        Object o = null;

        if (head != null) {
            o = head.getContents();
            head = head.getNext();
            count--;

            if (head == null) {
                tail = null;
                count = 0;
            }
        }

        return o;
    }
149194
public Object previous() {
        Object element = null;
        if (previousElement != null) {
            element = previousElement;
            previousElement = null;
        } else {
            element = getPreviousElement();
            if (element == null) {
                throw new java.util.NoSuchElementException();
            }
        }
        return element;
    }
860268
public final CharSequence getEntry() {
        int index = indexOf(value);
        return index >= 0 && getEntries() != null ? getEntries()[index] : null;
    }
639770
public Iterator iterator() {
        return new Iterator() {
            private ObjectSinkNode currentNode = null;
            private ObjectSinkNode nextNode    = getFirst();

            public boolean hasNext() {
                return (this.nextNode != null);
            }

            public Object next() {
                this.currentNode = this.nextNode;
                if ( this.currentNode != null ) {
                    this.nextNode = this.currentNode.getNextObjectSinkNode();
                } else {
                    throw new NoSuchElementException( "No more elements to return" );
                }
                return this.currentNode;
            }

            public void remove() {
                if ( this.currentNode != null ) {
                    ObjectSinkNodeList.this.remove( this.currentNode );
                    this.currentNode = null;
                } else {
                    throw new IllegalStateException( "No item to remove. Call next() before calling remove()." );
                }
            }
        };
    }
849965
public String currentWord() {
		return wordIndex >= 0 && wordIndex < words.size() ? words.get(wordIndex) : null;
	}
797744
public IntSet.IntIterator iterator()
  {
    if (isEmpty()) {
      return new IntSet.IntIterator()
      {
        @Override
        public void skipAllBefore(int element) {/*empty*/}

        @Override
        public boolean hasNext() {return false;}

        @Override
        public int next() {throw new NoSuchElementException();}

        @Override
        public void remove() {throw new UnsupportedOperationException();}

        @Override
        public IntSet.IntIterator clone() {throw new UnsupportedOperationException();}
      };
    }
    return new BitIterator();
  }
619496
public Object next() throws java.util.NoSuchElementException {
        Object element = null;
        if (nextElement != null) {
            element = nextElement;
            nextElement = null;
        } else {
            element = getNextElement();
            if (element == null) {
                throw new java.util.NoSuchElementException();
            }
        }
        return element;
    }
1095678
public final Optional<T> first() {
        Iterator<T> iterator = this.iterator();
        return iterator.hasNext()
                ? Optional.of(iterator.next())
                : empty();
    }
1166599
public Sentence next() throws IOException
    {
        gisb.clear();
        int c, pos = -1;
        
        while ( (c = readNext()) != -1 ) {
            //clear the whitespace of the begainning
            if ( StringUtil.isWhitespace(c) ) continue;
            if ( c == '\n' || c == '\t' || c == '…' ) continue;
            if ( StringUtil.isCnPunctuation(c) ) {
                switch ( (char)c ) {
                case '“':
                case '【':
                case '（':
                case '《':
                case '｛':
                    break;
                default: continue;
                }
            }
            
            if ( StringUtil.isEnPunctuation(c)) {
                switch ( (char)c ) {
                case '"':
                /*case '[':
                case '(':
                case '{':
                case '<':*/
                    break;
                default: continue;
                }
            }
             
            pos = idx;
            gisb.clear().append((char)c);
            
            while ( (c = readNext()) != -1 ) {
                boolean endTag = false;
                
                /*
                 * here, define the sentence end tag
                 * punctuation like the following:
                 * .。\n;；?？!！:： 
                */
                switch ((char)c) {
                case '"': gisb.append('"'); readUntil('"');  break;
                case '“': gisb.append('“'); readUntil('”');  break;
                case '【': gisb.append('【'); readUntil('】'); break;
                case '《': gisb.append('《'); readUntil('》'); break;
                case '.': {
                    int chr = readNext();
                    gisb.append((char)c);
                    if ( StringUtil.isEnLetter(chr) )  {
                        reader.unread(chr);
                        continue;
                    } else {
                        endTag = true;
                    }
                    
                    break;
                }
                case '。':
                case ';':
                case '；':
                case '?':
                case '？':
                case '!':
                case '！':
                case '…': {
                    endTag = true;
                    gisb.append((char)c);
                    break;
                }
                case ':':
                case '：':
                case '\n': {
                    endTag = true;
                    break;
                }
                default:
                    gisb.append((char)c);
                }
                
                if ( endTag ) break;
            }

            //clear the whitespace from the back
            for ( int i = gisb.length() - 1; i >= 0; i-- ) {
                char chr = gisb.charAt(i);
                if ( chr == ' ' || chr == '\t' ) gisb.deleteCharAt(i);
                else break;
            }
            
            if ( gisb.length() <= 1 ) continue;
            return new Sentence(gisb.toString(), pos);
        }
                
        return null;
    }
804086
public String next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }

        String next = this.next;
        this.next = fetchNext();

        return next;
    }
186616
public synchronized List<E> getAll() {
		ArrayList<E> list = new ArrayList<E>();

		for (E element : listElements) {
			if (element != null) {
				list.add(element);
			}
		}

		return list;
	}
487373
@Override
	public T get() {
		T result = reference.get();

		if (result == null) {
			result = init();
			if (false == reference.compareAndSet(null, result)) {
				// 其它线程已经创建好此对象
				result = reference.get();
			}
		}

		return result;
	}
609021
public String nextString()
    {
        char[] buffer = new char[nextInt()];
        for (int i = 0; i < buffer.length; ++i)
        {
            buffer[i] = nextChar();
        }
        return new String(buffer);
    }