Package org.fastlsh.index

Examples of org.fastlsh.index.InvalidIndexException


     * @throws InvalidIndexException
     * @throws IOException
     */
    public long [] getNeighbors(long id, int beamRadius, int numPermutations) throws InvalidIndexException, IOException
    {
        if(numPermutations > maxPermutations) throw(new InvalidIndexException(reader.rootDir, "Max  available permutations is: " + maxPermutations + ". " + numPermutations + " were requested"));
        TLongHashSet sims = new TLongHashSet();
        if(!reader.permutationIndex.containsKey(id)) return null;
        int [] positions = reader.permutationIndex.get(id);
        if(maxPermutations != positions.length) throw(new InvalidIndexException(reader.rootDir, "Found invalid number of permutations: " + positions.length+ " for input id: " + id));
        for(int i = 0; i < numPermutations; i++)
        {
            getNeighbors(positions[i], beamRadius, permutationLists[i], sims);
        }       
        return sims.toArray();
View Full Code Here

TOP

Related Classes of org.fastlsh.index.InvalidIndexException

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.