Package edu.ucla.sspace.index

Examples of edu.ucla.sspace.index.TernaryPermutationFunction


        String permutationFuncProp =
            properties.getProperty(PERMUTATION_FUNCTION_PROPERTY);
        permutationFunc = (permutationFuncProp != null)
            ? loadPermutationFunction(permutationFuncProp)
            : new TernaryPermutationFunction();

        RandomIndexVectorGenerator indexVectorGenerator =
            new RandomIndexVectorGenerator(vectorLength, properties);

        String useSparseProp =
View Full Code Here


     */
    @SuppressWarnings("unchecked")
    private static PermutationFunction<TernaryVector> loadPermutationFunction(
            String className) {
        if (className == null)
            return new TernaryPermutationFunction();
        try {
            Class clazz = Class.forName(className);
            return (PermutationFunction<TernaryVector>)(clazz.newInstance());
        } catch (Exception e) {
            // catch all of the exception and rethrow them as an error
View Full Code Here

        String permutationFuncProp =
            properties.getProperty(PERMUTATION_FUNCTION_PROPERTY);
        permutationFunc = (permutationFuncProp != null)
            ? loadPermutationFunction(permutationFuncProp)
            : new TernaryPermutationFunction();

        RandomIndexVectorGenerator indexVectorGenerator =
            new RandomIndexVectorGenerator(vectorLength, properties);

        String useSparseProp =
View Full Code Here

            if (!argOptions.hasOption('P'))
                return null;

            if (!argOptions.hasOption('p'))
                return new DefaultDependencyPermutationFunction<TernaryVector>(
                        new TernaryPermutationFunction());
            Class clazz = Class.forName(argOptions.getStringOption('p'));
            Constructor<?> c = clazz.getConstructor(PermutationFunction.class);               
            return (DependencyPermutationFunction<TernaryVector>)
                c.newInstance(new TernaryPermutationFunction());
        } catch (Exception e) {
            throw new Error(e);
        }
    }
View Full Code Here

        String permutationFuncProp =
            properties.getProperty(PERMUTATION_FUNCTION_PROPERTY);
        permutationFunc = (permutationFuncProp != null)
            ? loadPermutationFunction(permutationFuncProp)
            : new TernaryPermutationFunction();

        RandomIndexVectorGenerator indexVectorGenerator =
            new RandomIndexVectorGenerator(vectorLength, properties);

        String useSparseProp =
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.index.TernaryPermutationFunction

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.