Examples of resetQuick()


Examples of gnu.trove.TIntArrayList.resetQuick()

      if (lattices.get(i) == null) { continue; }
      SumLattice lattice = lattices.get(i);
      FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput();
      gammas = lattice.getGammas();
      for (int ip = 0; ip < fvs.size(); ++ip) {
        cache.resetQuick();
        FeatureVector fv = fvs.getFeatureVector(ip);
        int fi;
        for (int loc = 0; loc < fv.numLocations(); loc++) {
          fi = fv.indexAtLocation(loc);
          // binary constraint features
View Full Code Here

Examples of gnu.trove.TIntArrayList.resetQuick()

      if (lattices.get(i) == null) { continue; }
      SumLattice lattice = lattices.get(i);
      FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput();
      gammas = lattice.getGammas();
      for (int ip = 0; ip < fvs.size(); ++ip) {
        cache.resetQuick();
        FeatureVector fv = fvs.getFeatureVector(ip);
        int fi;
        for (int loc = 0; loc < fv.numLocations(); loc++) {
          fi = fv.indexAtLocation(loc);
          // binary constraint features
View Full Code Here

Examples of gnu.trove.TIntArrayList.resetQuick()

      if (lattices.get(i) == null) { continue; }
      FeatureVectorSequence fvs = (FeatureVectorSequence)lattices.get(i).getInput();
      SumLattice lattice = lattices.get(i);
      xis = lattice.getXis();
      for (int ip = 1; ip < fvs.size(); ++ip) {
        cache.resetQuick();
        FeatureVector fv = fvs.getFeatureVector(ip);
        int fi;
        for (int loc = 0; loc < fv.numLocations(); loc++) {
          fi = fv.indexAtLocation(loc);
          // binary constraint features
View Full Code Here

Examples of gnu.trove.list.array.TCharArrayList.resetQuick()

    int intervalSum = 0;
    // divide the interval data
    for (int i = 0; i < inNodes.size(); i++) {
      TCharArrayList list = labels[inNodes.get(i)].getLabelValue();
      intervalSum += list.size();
      list.resetQuick();
      // add at least one char for each interval
      list.add(intervalChars.removeAt(intervalChars.size() - 1));
    }

    // divide the rest of the data
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.resetQuick()

            && ((isFirstMandatory && isSecondMandatory) || (!isFirstMandatory && !isSecondMandatory))
            && !graph.isNeighbours(u, v)
            && weights[u] <= weights[v]) {
          // scan the lists

          list2.resetQuick();
          for (int d = 0; d < graph.deg(v); d++) {
            list2.add(graph.getNeighbor(v, d));
          }
          list2.sort();
          boolean contains = true;
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.resetQuick()

  public void removeEdge(int from, int to) {
    // if the size is one, then it is a new leaf
    final TIntArrayList fromOutList = this.outAdjLists.get(from);
    if (fromOutList.size() == 1) {
      this.numOfLeaves++;
      fromOutList.resetQuick();
    } else {
      int index = this.getNeighborIx(from, to);
      // switch the out edge in the list
      fromOutList.set(index, fromOutList.get(fromOutList.size() - 1));
      fromOutList.removeAt(index);
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.resetQuick()

  private void removeInEdge(int from, int to) {
    final TIntArrayList toInList = this.inAdjLists.get(to);
    final TIntArrayList toInIndexList = this.inToOutNeighborIx.get(to);
    if (inAdjLists.get(to).size() == 1) {
      toInList.resetQuick();
      toInIndexList.resetQuick();
    } else {
      int index = -1;
      for (int i = 0; i < toInList.size() && index == -1; i++) {
        if (toInList.get(i) == from) {
          index = i;
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.resetQuick()

   *            second node
   */
  public void removeEdge(int u, int v) {
    final TIntArrayList uList = this.adjLists.get(u);
    if (uList.size() == 1) {
      uList.resetQuick();
    } else {
      int index = this.getNeighborIx(u, v);
      // switch the out edge in the list
      uList.set(index, uList.get(uList.size() - 1));
      uList.removeAt(index);
View Full Code Here

Examples of gnu.trove.list.array.TIntArrayList.resetQuick()

      uList.set(index, uList.get(uList.size() - 1));
      uList.removeAt(index);
    }
    final TIntArrayList vList = this.adjLists.get(v);
    if (vList.size() == 1) {
      vList.resetQuick();
    } else {
      int index = this.getNeighborIx(v, u);
      // switch the out edge in the list
      vList.set(index, vList.get(vList.size() - 1));
      vList.removeAt(index);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.