Examples of toNativeArray()


Examples of gnu.trove.TIntArrayList.toNativeArray()

                        new Integer(label), record.toString(),
                        record.toString()));
        }
      }
      clusterings[i] =
          new Clustering(instances, subdirs.length, labels.toNativeArray());
    }

    logger.info("\nread " + fi + " objects in " + clusterings.length + " clusterings.");
    try {
      ObjectOutputStream oos =
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

  public static int[] getIds(final IterablePosting ip) throws IOException
  {
    final TIntArrayList ids = new TIntArrayList();
    while(ip.next() != IterablePosting.EOL)
      ids.add(ip.getId());
    return ids.toNativeArray();
  }
 
  /** Get an array of all the ids in a given IterablePosting stream,
   * where the length of the stream is known */
  public static int[] getIds(final IterablePosting ip, final int numPointers) throws IOException
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

          tmpBlocks[j] = previousBlockId = file.readGamma() + previousBlockId;
        }
        blockids.add(tmpBlocks);
      }
    }
    documentTerms[documentTerms.length -1] = blockids.toNativeArray();
    return documentTerms;
  }

}
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

            tmpBlocks[j] = previousBlockId = file.readGamma() + previousBlockId;
          }
          blockids.add(tmpBlocks);
        }
      }
      documentTerms[documentTerms.length-1] = blockids.toNativeArray();
      return documentTerms;
    } catch (IOException ioe) {
      logger.error("Problem reading block inverted index", ioe);
      return null;
    }
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

    doccount++;
    rq.setNumberOfDocumentsAfterFiltering(doccount);
    if (docatnumbers.size() < docids.length)
    {
      //result set is definently shorter, replace with new one
      rq.setResultSet( results.getResultSet(docatnumbers.toNativeArray()));
      rq.getResultSet().setExactResultSize(results.getExactResultSize());
    }
  }
           
        catch(Exception e){}
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

    for (int i : arr2) {
      if (set.contains(i)) {
        list.add(i);
      }
    }
    return list.toNativeArray();
  }

  /**
   * union 2 int[]
   * @param arr1
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

          tmpBlocks[j] = previousBlockId = file.readGamma() + previousBlockId;
        }
        blockids.add(tmpBlocks);
      }
    }
    documentTerms[documentTerms.length -1] = blockids.toNativeArray();
    return documentTerms;
  }
   
  /*public int[][] getNextTerms(BitIndexPointer pointer) throws IOException
  {
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

            tmpBlocks[j] = previousBlockId = file.readGamma() + previousBlockId;
          }
          blockids.add(tmpBlocks);
        }
      }
      documentTerms[documentTerms.length-1] = blockids.toNativeArray();
      return documentTerms;
    } catch (IOException ioe) {
      logger.error("Problem reading block inverted index", ioe);
      return null;
    }
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

      while((line = br.readLine())!= null)
      {
        String[] parts = line.split("\\s+");
        for(String p : parts)
          ids.add(Integer.parseInt(p));
        int[] _tmp = ids.toNativeArray();
        byteOffset = bo.getByteOffset();
        bitOffset = bo.getBitOffset();
        BitFilePosition bp = new FilePosition(byteOffset, bitOffset);
        startOffsets.add(bp);
        //System.err.println(_tmp.length + "@{"+byteOffset+","+bitOffset+"}");
View Full Code Here

Examples of gnu.trove.TIntArrayList.toNativeArray()

    }

    x1.clear();
    y1.clear();
    x1.add(newX.toNativeArray());
    y1.add(newY.toNativeArray());
  }

  /**
   * has optimized toArray() as opposed to the {@link java.util.Collections#emptyList()}
   */
 
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.