Package org.drools.core.util

Examples of org.drools.core.util.HierarchyEncoder.encode()


    public void testHierEncoderBipartiteInheritance() {
        HierarchyEncoder encoder = new HierarchyEncoderImpl();

        encoder.encode( "R", Collections.EMPTY_LIST );
        encoder.encode( "A1", Arrays.asList( "R" ) );
        encoder.encode( "A2", Arrays.asList( "R" ) );
        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
View Full Code Here


        HierarchyEncoder encoder = new HierarchyEncoderImpl();

        encoder.encode( "R", Collections.EMPTY_LIST );
        encoder.encode( "A1", Arrays.asList( "R" ) );
        encoder.encode( "A2", Arrays.asList( "R" ) );
        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
View Full Code Here

        encoder.encode( "R", Collections.EMPTY_LIST );
        encoder.encode( "A1", Arrays.asList( "R" ) );
        encoder.encode( "A2", Arrays.asList( "R" ) );
        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );
View Full Code Here

        encoder.encode( "R", Collections.EMPTY_LIST );
        encoder.encode( "A1", Arrays.asList( "R" ) );
        encoder.encode( "A2", Arrays.asList( "R" ) );
        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );
View Full Code Here

        encoder.encode( "A1", Arrays.asList( "R" ) );
        encoder.encode( "A2", Arrays.asList( "R" ) );
        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );

        System.out.println( encoder );
View Full Code Here

        encoder.encode( "A2", Arrays.asList( "R" ) );
        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );

        System.out.println( encoder );
View Full Code Here

        encoder.encode( "A3", Arrays.asList( "R" ) );
        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );

        System.out.println( encoder );

        assertEquals( parseBitSet( "0"), encoder.getCode("R"));
View Full Code Here

        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );

        System.out.println( encoder );

        assertEquals( parseBitSet( "0"), encoder.getCode("R"));
        assertEqualsparseBitSet( "1" ), encoder.getCode( "A1" ) );
View Full Code Here

    @Test
    public void testHierEncoderBipartiteInheritanceDiffOrder() {
        HierarchyEncoder encoder = new HierarchyEncoderImpl();

        encoder.encode( "R", Collections.EMPTY_LIST );

        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
View Full Code Here

    public void testHierEncoderBipartiteInheritanceDiffOrder() {
        HierarchyEncoder encoder = new HierarchyEncoderImpl();

        encoder.encode( "R", Collections.EMPTY_LIST );

        encoder.encode( "B1", Arrays.asList( "R" ) );
        encoder.encode( "B2", Arrays.asList( "R" ) );
        encoder.encode( "B3", Arrays.asList( "R" ) );
        encoder.encode( "B4", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B5", Arrays.asList( "B1", "B2", "B3" ) );
        encoder.encode( "B6", Arrays.asList( "B1", "B2", "B3" ) );
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.