Package org.drools.reteoo

Examples of org.drools.reteoo.BetaNode


        // first share
        AlphaNode alphaNode1_1 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("b"), sp), alphaNode1_1.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "b", "c"), sp), alphaNode1_1.getInferredMask() )
       
        BetaNode betaNode1 = ( BetaNode alphaNode1_1.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("c"), sp), betaNode1.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "b", "c"), sp), betaNode1.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("i"), sp), betaNode1.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("b", "i"), sp), betaNode1.getLeftInferredMask() );       
       
        // second share
        AlphaNode alphaNode1_2 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[1];
        assertEquals( calculatePositiveMask(list("i"), sp), alphaNode1_2.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "b", "i", "s", "j"), sp), alphaNode1_2.getInferredMask() )
       

        BetaNode betaNode2 = ( BetaNode alphaNode1_2.getSinkPropagator().getSinks()[1];       
        assertEqualscalculatePositiveMask(list("s"), sp), betaNode2.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "i", "s"), sp), betaNode2.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("j"), sp), betaNode2.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("b", "j"), sp), betaNode2.getLeftInferredMask() );        
       
        // third share       
        AlphaNode alphaNode1_4 = ( AlphaNode ) alphaNode1_2.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("b"), sp), alphaNode1_4.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "b", "i", "j"), sp), alphaNode1_4.getInferredMask() );         
       

        BetaNode betaNode3 = ( BetaNode alphaNode1_4.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("j"), sp), betaNode3.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "i", "b", "j"), sp), betaNode3.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("k"), sp), betaNode3.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("c", "k"), sp), betaNode3.getLeftInferredMask() );       
    }  
View Full Code Here


        // first share
        AlphaNode alphaNode1_1 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("i"), sp), alphaNode1_1.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "i", "b", "s", "j"), sp), alphaNode1_1.getInferredMask() )
       
        BetaNode betaNode1 = ( BetaNode alphaNode1_1.getSinkPropagator().getSinks()[1];       
        assertEqualscalculatePositiveMask(list("s"), sp), betaNode1.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "i", "s"), sp), betaNode1.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("j"), sp), betaNode1.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("b", "j"), sp), betaNode1.getLeftInferredMask() );       

        // second split, third alpha
        AlphaNode alphaNode1_2 = ( AlphaNode ) alphaNode1_1.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("b"), sp), alphaNode1_2.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "b", "i", "j"), sp), alphaNode1_2.getInferredMask() );

        BetaNode betaNode3 = ( BetaNode alphaNode1_2.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("j"), sp), betaNode3.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "i", "b", "j"), sp), betaNode3.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("k"), sp), betaNode3.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("c", "k"), sp), betaNode3.getLeftInferredMask() );       
    }      
View Full Code Here

        // first split
        AlphaNode alphaNode1_1 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("b"), sp), alphaNode1_1.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "b", "c"), sp), alphaNode1_1.getInferredMask() )
       
        BetaNode betaNode1 = ( BetaNode alphaNode1_1.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("c"), sp), betaNode1.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "b", "c"), sp), betaNode1.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("i"), sp), betaNode1.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("b", "i"), sp), betaNode1.getLeftInferredMask() );       
       
        // fist share, second alpha
        AlphaNode alphaNode1_2 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[1];
        assertEquals( calculatePositiveMask(list("i"), sp), alphaNode1_2.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "i", "b", "j"), sp), alphaNode1_2.getInferredMask() )
       
        AlphaNode alphaNode1_3 = ( AlphaNode ) alphaNode1_2.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("b"), sp), alphaNode1_3.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "i", "b", "j"), sp), alphaNode1_3.getInferredMask() );        
       

        BetaNode betaNode2 = ( BetaNode alphaNode1_3.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("j"), sp), betaNode2.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "i", "b", "j"), sp), betaNode2.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("k"), sp), betaNode2.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("c", "k"), sp), betaNode2.getLeftInferredMask() );        
          
    }        
View Full Code Here

        AlphaNode alphaNode1_1 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("b"), sp), alphaNode1_1.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "b", "c"), sp), alphaNode1_1.getInferredMask() )
       
        // first split
        BetaNode betaNode1 = ( BetaNode alphaNode1_1.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("c"), sp), betaNode1.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "b", "c"), sp), betaNode1.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("i"), sp), betaNode1.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("b", "i"), sp), betaNode1.getLeftInferredMask() );       
       
        // second split
        AlphaNode alphaNode1_2 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[1];
        assertEquals( calculatePositiveMask(list("i"), sp), alphaNode1_2.getDeclaredMask( ) );
        assertEquals( calculatePositiveMask(list("a", "i", "s"), sp), alphaNode1_2.getInferredMask() );          
       

        BetaNode betaNode2 = ( BetaNode alphaNode1_2.getSinkPropagator().getSinks()[0];       
        assertEqualscalculatePositiveMask(list("s"), sp), betaNode2.getRightDeclaredMask() );
        assertEqualscalculatePositiveMask(list("a", "i", "s"), sp), betaNode2.getRightInferredMask() );
       
        assertEqualscalculatePositiveMask(list("j"), sp), betaNode2.getLeftDeclaredMask() );
        assertEqualscalculatePositiveMask(list("b", "j"), sp), betaNode2.getLeftInferredMask() );           
    }   
View Full Code Here

        ObjectTypeNode otnA = getObjectTypeNode(kbase, "A" );
        ObjectTypeNode otnC = getObjectTypeNode(kbase, "C" );
        List<String> sp = getSettableProperties(wm, otnA);

        BetaNode betaNodeA = ( BetaNode ) otnA.getSinkPropagator().getSinks()[0];
        assertEquals( calculatePositiveMask(list("i", "b", "c"), sp), betaNodeA.getRightDeclaredMask() );
        assertEquals( calculatePositiveMask(list("i", "b", "c"), sp), betaNodeA.getRightInferredMask() );
        assertEquals( Long.MAX_VALUE, betaNodeA.getLeftDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNodeA.getLeftInferredMask() );

        BetaNode betaNodeC = ( BetaNode ) otnC.getSinkPropagator().getSinks()[0];
        assertEquals( 0L, betaNodeC.getRightDeclaredMask() );
        assertEquals( 0L, betaNodeC.getRightInferredMask() );
        assertEquals( calculatePositiveMask(list("k"), sp), betaNodeC.getLeftDeclaredMask() );
        assertEquals( calculatePositiveMask(list("a", "k"), sp), betaNodeC.getLeftInferredMask() );
    }
View Full Code Here

        ReteooWorkingMemoryInterface wm = ((StatefulKnowledgeSessionImpl)kbase.newStatefulKnowledgeSession()).session;
       
        ObjectTypeNode otn = getObjectTypeNode(kbase, "Cheese" );
        assertNotNull( otn );

        BetaNode betaNode = ( BetaNode ) otn.getSinkPropagator().getSinks()[0];
       
        assertEquals( Long.MAX_VALUE, betaNode.getRightDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getRightInferredMask() );
    }   
View Full Code Here

        AlphaNode alphaNode = ( AlphaNode ) otn.getSinkPropagator().getSinks()[0];
        assertEquals( Long.MAX_VALUE, alphaNode.getDeclaredMask() );
        assertEquals( Long.MAX_VALUE, alphaNode.getInferredMask() );
       
        BetaNode betaNode = ( BetaNode ) alphaNode.getSinkPropagator().getSinks()[0];
       
        assertEquals( Long.MAX_VALUE, betaNode.getRightDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getRightInferredMask() );
   
View Full Code Here

       
        ObjectTypeNode otn = getObjectTypeNode(kbase, "InitialFactImpl" );
        assertNotNull( otn );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otn.getSinkPropagator().getSinks()[0];
        BetaNode betaNode = ( BetaNode ) liaNode.getSinkPropagator().getSinks()[1];
       
        assertEquals( Long.MAX_VALUE, betaNode.getLeftDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getLeftInferredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getRightDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getRightInferredMask() );               
   
View Full Code Here

       
        ObjectTypeNode otn = getObjectTypeNode(kbase, "Person" );
        assertNotNull( otn );
       
        LeftInputAdapterNode liaNode = ( LeftInputAdapterNode ) otn.getSinkPropagator().getSinks()[0];
        BetaNode betaNode = ( BetaNode ) liaNode.getSinkPropagator().getSinks()[1];
       
        assertEquals( Long.MAX_VALUE, betaNode.getLeftDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getLeftInferredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getRightDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode.getRightInferredMask() );               
    }   
View Full Code Here

        // first share
        AlphaNode alphaNode1_1 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[0];
        assertEquals( Long.MAX_VALUE, alphaNode1_1.getDeclaredMask() );
        assertEquals( Long.MAX_VALUE, alphaNode1_1.getInferredMask() )
       
        BetaNode betaNode1 = ( BetaNode ) alphaNode1_1.getSinkPropagator().getSinks()[0];
       
        assertEquals( Long.MAX_VALUE, betaNode1.getRightDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode1.getRightInferredMask() );
       
       
        // second share
        AlphaNode alphaNode1_2 = ( AlphaNode ) alphaNode1.getSinkPropagator().getSinks()[1];
        assertEquals( Long.MAX_VALUE, alphaNode1_2.getDeclaredMask() );
        assertEquals( Long.MAX_VALUE, alphaNode1_2.getInferredMask() )
       
        BetaNode betaNode2 = ( BetaNode ) alphaNode1_2.getSinkPropagator().getSinks()[0];
       
        assertEquals( Long.MAX_VALUE, betaNode2.getRightDeclaredMask() );
        assertEquals( Long.MAX_VALUE, betaNode2.getRightInferredMask() );
    }      
View Full Code Here

TOP

Related Classes of org.drools.reteoo.BetaNode

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.