Package edu.umd.hooka.alignment

Examples of edu.umd.hooka.alignment.IndexedFloatArray


    _e = new int[bbLen/4];
    ib.get(_e);
    eLen = _e.length;

    if (_nullValues == null)
      _nullValues = new IndexedFloatArray();
    _nullValues.readFields(in);
 
    bbLen = in.readInt();
    bb=ByteBuffer.allocate(bbLen);
    in.readFully(bb.array());
View Full Code Here


   
  public void readFields(DataInput in) throws IOException {
    int len = in.readInt();
    _data = new IndexedFloatArray[len];
    for (int i = 0; i < len; i++) {
      _data[i] = new IndexedFloatArray();
      _data[i].readFields(in);
    }
  }
View Full Code Here

    while(len < _data.length) {
      if (_data[len] != null) max = len + 1;
      len++;
    }
    out.writeInt(max);
    IndexedFloatArray nullA = new IndexedFloatArray();
    for (int i = 0; i < max; i++) {
      if (_data[i] == null)
        nullA.write(out);
      else
        _data[i].write(out);
    }
  }
View Full Code Here

  }
 
  final private void checkE(int e) {
    if (_data[e] == null) {
      try {
        _data[e] = new IndexedFloatArray();
        FSDataInputStream in = _fs.open(_datapath.suffix(Path.SEPARATOR + "voc_" + e + ".tab"));
        _data[e].readFields(in);
        in.close();
        if (cleared) _data[e].clear();
      } catch (IOException ex) {
View Full Code Here

          float[] probs = new float[numEntries];
          for(PairOfIntFloat pair : indexProbPairs){
            indices[i] = pair.getLeftElement();
            probs[i++] = pair.getRightElement()/sumOfProbs;
          }
          table.set(gerIndex, new IndexedFloatArray(indices, probs, true));
        }
      }

      // dispose all the resources after using them.
      fis.close();
View Full Code Here

    for(int sortedIndex : sortedIndices){
      indices[i]=sortedIndex;
      probs[i]=index2ProbMap.get(sortedIndex);
      i++;
    }     
    table.set(curIndex, new IndexedFloatArray(indices, probs, true));
  }
View Full Code Here

          i=0;
          for ( PairOfIntFloat pair : indexProbPairs ) {
            indices[i] = pair.getLeftElement();
            probs[i++] = pair.getRightElement() / sumOfProbs;
          }        
          table.set(gerIndex, new IndexedFloatArray(indices, probs, true));
        }
      }

      // dispose all the resources after using them.
      inputReader.close();
View Full Code Here

    for(int sortedIndex : sortedIndices){
      indices[i]=sortedIndex;
      probs[i]=index2ProbMap.get(sortedIndex);
      i++;
    }     
    table.set(curIndex, new IndexedFloatArray(indices, probs, true));
  }
View Full Code Here

          float[] probs = new float[numEntries];
          for(PairOfIntFloat pair : indexProbPairs){
            indices[i] = pair.getLeftElement();
            probs[i++] = pair.getRightElement()/sumOfProbs;
          }
          table.set(gerIndex, new IndexedFloatArray(indices, probs, true));
        }
      }

      // dispose all the resources after using them.
      fis.close();
View Full Code Here

    for(int sortedIndex : sortedIndices){
      indices[i]=sortedIndex;
      probs[i]=index2ProbMap.get(sortedIndex);
      i++;
    }     
    table.set(curIndex, new IndexedFloatArray(indices, probs, true));
  }
View Full Code Here

TOP

Related Classes of edu.umd.hooka.alignment.IndexedFloatArray

Copyright © 2018 www.massapicom. 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.