Package com.anjlab.sat3

Examples of com.anjlab.sat3.Helper


        if (cts.size() < 2)
        {
            throw new IllegalArgumentException("Unification is a q-ary operation where q should be > 1");
        }

        VarPairsIndex index = VarPairsIndexFactory.getInstance().buildIndex(cts);
       
        unify(index, ((ICompactTripletsStructureHolder) cts.get(0)).getCTS().getPermutation(), cts, 1);
    }
View Full Code Here


                            4, 6, 7));
       
        //  Full index should be built prior to partial
        VarPairsIndexFactory.getInstance().buildIndex(cts);
       
        VarPairsIndex index = VarPairsIndexFactory.getInstance().
            buildPartialIndex(cts, (ICompactTripletsStructureHolder) cts.get(0), 0, 0);
       
        index.forEachPair(new LongObjectProcedure()
        {
            public boolean apply(long key, Object value)
            {
                int varName1_ = (int) (key >> 21);
                int varName2_ = (int) (key & 0x1FFFFF);

                System.out.println(varName1_+ ", " + varName2_);
               
                LongArrayList tiers = (LongArrayList) value;
                for (int i = 0; i < tiers.size(); i++)
                {
                    long formulaAndTierIndex = tiers.get(i);
                    int formulaIndex = (int)(formulaAndTierIndex >> 32);
                    int tierIndex = (int)(formulaAndTierIndex & 0x00000000FFFFFFFFL);

                    ICompactTripletsStructure formula = (ICompactTripletsStructure)cts.get(formulaIndex);
                    ITier tier = formula.getTier(tierIndex);
                    System.out.println(tier);
                    Helper.prettyPrint(formula);
                }
               
                return true;
            }
        });
       
        assertEquals(4, index.pairs().size());
    }
View Full Code Here

TOP

Related Classes of com.anjlab.sat3.Helper

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.