Package org.drools.util

Examples of org.drools.util.HierarchyEncoderImpl.superset()


                String x = "" + (char) j;
                String y = "" + (char) k;
                BitSet xcode = encoder.getCode( x );
                BitSet ycode = encoder.getCode( y );

                int subOf = encoder.superset( xcode, ycode );

                if ( x.equals( y ) ) {
                    assertEquals( 0, subOf );
                } else if ( sups[ j - 'A' ].contains( y ) ) {
                    assertEquals( 1, subOf );
View Full Code Here


        BitSet b = encoder.getCode( "B" );
        BitSet c = encoder.getCode( "C" );
        BitSet d = encoder.getCode( "D" );
        BitSet e = encoder.getCode( "E" );

        assertTrue( encoder.superset( b, a ) > 0 );
        assertTrue( encoder.superset( c, a ) > 0 );
        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );
View Full Code Here

        BitSet c = encoder.getCode( "C" );
        BitSet d = encoder.getCode( "D" );
        BitSet e = encoder.getCode( "E" );

        assertTrue( encoder.superset( b, a ) > 0 );
        assertTrue( encoder.superset( c, a ) > 0 );
        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
View Full Code Here

        BitSet d = encoder.getCode( "D" );
        BitSet e = encoder.getCode( "E" );

        assertTrue( encoder.superset( b, a ) > 0 );
        assertTrue( encoder.superset( c, a ) > 0 );
        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
View Full Code Here

        BitSet e = encoder.getCode( "E" );

        assertTrue( encoder.superset( b, a ) > 0 );
        assertTrue( encoder.superset( c, a ) > 0 );
        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
        assertTrue( encoder.superset( e, c ) < 0 );
View Full Code Here

        assertTrue( encoder.superset( b, a ) > 0 );
        assertTrue( encoder.superset( c, a ) > 0 );
        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
        assertTrue( encoder.superset( e, c ) < 0 );
        assertTrue( encoder.superset( e, d ) < 0 );
View Full Code Here

        assertTrue( encoder.superset( c, a ) > 0 );
        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
        assertTrue( encoder.superset( e, c ) < 0 );
        assertTrue( encoder.superset( e, d ) < 0 );
        assertTrue( encoder.superset( e, e ) == 0 );
View Full Code Here

        assertTrue( encoder.superset( d, a ) > 0 );
        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
        assertTrue( encoder.superset( e, c ) < 0 );
        assertTrue( encoder.superset( e, d ) < 0 );
        assertTrue( encoder.superset( e, e ) == 0 );

    }
View Full Code Here

        assertTrue( encoder.superset( d, b ) > 0 );
        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
        assertTrue( encoder.superset( e, c ) < 0 );
        assertTrue( encoder.superset( e, d ) < 0 );
        assertTrue( encoder.superset( e, e ) == 0 );

    }
View Full Code Here

        assertTrue( encoder.superset( d, c ) > 0 );

        assertTrue( encoder.superset( e, a ) < 0 );
        assertTrue( encoder.superset( e, b ) < 0 );
        assertTrue( encoder.superset( e, c ) < 0 );
        assertTrue( encoder.superset( e, d ) < 0 );
        assertTrue( encoder.superset( e, e ) == 0 );

    }

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.