Package edu.umd.hooka.alignment

Examples of edu.umd.hooka.alignment.IndexedFloatArray


          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

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

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

      indices[i]=sortedIndex;
      probs[i]=index2ProbMap.get(sortedIndex);
      logger.debug("Added: "+indices[i]+" with prob: "+probs[i]);
      i++;
    }
    table.set(curIndex, new IndexedFloatArray(indices, probs, true));
    logger.debug(table.get(curIndex));

    return indices.length;
  }
View Full Code Here

    for (Map.Entry<Integer, FloatWritable> p : data.entrySet()) {
      indices[c] = p.getKey();
      values[c] = p.getValue().get();
      c++;
    }
    return new IndexedFloatArray(indices, values);
  }
View Full Code Here

  }

  public TTable_monolithic(int[] e, int[] ef, int maxF) {
    _ef = ef;
    _e = e;
    _nullValues = new IndexedFloatArray(maxF + 1);
    eLen = _e.length;
    indexLen = _ef.length;
    _values = new float[indexLen];
  }
View Full Code Here

  }

  public TTable_monolithic(int[] e, int[] ef, int maxF, FileSystem fs, Path p) {
    _ef = ef;
    _e = e;
    _nullValues = new IndexedFloatArray(maxF + 1);
    eLen = _e.length;
    indexLen = _ef.length;
    _values = new float[indexLen];
    _fs = fs;
    _datapath = p;
View Full Code Here

  }
 
  public void setNullDistribution(float[] x) {
    myLogger.setLevel(Level.DEBUG);
    myLogger.debug("Length of input array is " + x.length);
    _nullValues = new IndexedFloatArray(x.length);
    _nullValues.set(0, 0.0f);
    for(int i=1; i<x.length; i++)
      _nullValues.set(i, x[i]);
  }
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.